-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
--script-sh breaks with /dev/null or closed stdin #33
Comments
lmb
added a commit
to cilium/ebpf
that referenced
this issue
May 21, 2021
To work around a qemu bug [1] we redirect stdin of virtme-run from /dev/zero. This has the possible downside that a read from /dev/zero always returns data. This means that anything reading stdin in the VM will get a bunch of garbage. Detect a closed stdin and replace it with an empty fifo. 1: amluto/virtme#33
lmb
added a commit
to cilium/ebpf
that referenced
this issue
May 26, 2021
To work around a qemu bug [1] we redirect stdin of virtme-run from /dev/zero. This has the possible downside that a read from /dev/zero always returns data. This means that anything reading stdin in the VM will get a bunch of garbage. Detect a closed stdin and replace it with an empty fifo. 1: amluto/virtme#33
Might this problem be resolved by #80? |
@lmb would you try using https://github.com/arighi/virtme and checking if the problem is gone? |
I don't really have a way to reproduce this anymore, sorry :( |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is probably an upstream QEMU bug, but I think it'd be good to try and find a work around. The following command hangs indefinitely:
If I change
virtme-init
to strace what is happening, I can see that the script is hanging on writing "foo". Removing< /dev/null
makes everything work again.Usually I wouldn't care, but Docker also redirects stdin to
/dev/null
. On previous QEMU versions it was possible to work around this by closing stdin via0<&-
, but as of 3.1.0 this breaks.There is a work-around however:
This might end up flooding stdin with zeros, so I'm not sure what the implications of this are.
cat | virtme-run
doesn't work, since cat just exits due to stdin being/dev/null
, which leads to stdin to QEMU being closed.virtme-init
or similar?/dev/zero
?The text was updated successfully, but these errors were encountered: