An open API service indexing awesome lists of open source software.

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

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
```