https://github.com/mkroening/unikraft-virtio_ring-error-repro
Reproduction of a Unikraft virtio_ring error
https://github.com/mkroening/unikraft-virtio_ring-error-repro
unikraft virtio
Last synced: 18 days ago
JSON representation
Reproduction of a Unikraft virtio_ring error
- Host: GitHub
- URL: https://github.com/mkroening/unikraft-virtio_ring-error-repro
- Owner: mkroening
- Created: 2023-07-14T07:51:34.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-07-14T12:05:13.000Z (almost 2 years ago)
- Last Synced: 2025-04-14T20:15:50.244Z (18 days ago)
- Topics: unikraft, virtio
- Language: C
- Homepage: https://github.com/unikraft/unikraft/issues/853
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Unikraft `virtio_ring.c` Error Reproduction
This repository reproduces the https://github.com/unikraft/unikraft/issues/853 `virtio_ring.c` error:
```terminal
Waiting for connections!
Writing!
Half-time break!
Break over!
[ 3.335716] ERR: [libkvmvirtio] Available descriptor:0, Request2
[ 3.338315] ERR: [libkvmvirtio] Available descriptor:0, Request2
Written everything!
Client served!
Waiting for connections!
```This is a minimal server-client setup.
The server transmits 128 MiB to the client.
In the middle of the transmission, the server makes a short break.
Then the transmission continues, resulting in the error.The error relies on a race condition.
It may trigger more or less often depending on:
- The size of the unikernel (e.g. adding musl to the binary makes it more frequent).
- The size of the buffer (bigger transmissions tend to cause errors more reliable).
- The pause (without pauses inbetween transmissions, the error won't show up).
- The speed of the QEMU network device (user mode emulation does not show the error, TAP devices do).# How to Reproduce
0. Make sure to check out the submodules for Unikraft and lwIP sources.
```bash
git submodule init
```
1. Setup the TAP device.
```bash
sudo ./setup_tap.sh
```
2. Start the server using Unikraft.
```bash
./run_server.sh
```
3. From another terminal, start the client.
```bash
./run_client.sh
```