You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
--script-sh breaks with /dev/null or closed stdin #33
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:
$ virtme-run --show-boot-console --kimg linux-5.2-rc4.bz --script-sh "echo foo" < /dev/null
...
[ 2.121087] virtme-init: udev is done
[ 2.237338] ip (184) used greatest stack depth: 12488 bytes left
[ 2.246030] virtme-init: starting script
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 via 0<&-, but as of 3.1.0 this breaks.
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.
Is there a way to fix this behaviour from virtme-init or similar?
If not, is there a better work around than /dev/zero?
Activity
run-tests: use empty fifo instead of /dev/zero if stdin is /dev/null
run-tests: use empty fifo instead of /dev/zero if stdin is /dev/null
zevweiss commentedon Jan 17, 2023
Might this problem be resolved by #80?
marcosps commentedon Apr 13, 2023
@lmb would you try using https://github.com/arighi/virtme and checking if the problem is gone?
lmb commentedon Apr 17, 2023
I don't really have a way to reproduce this anymore, sorry :(