cmdlib.sh: feed /dev/zero as qemu stdin#3793
Merged
jlebon merged 2 commits intocoreos:mainfrom May 8, 2024
Merged
Conversation
|
Skipping CI for Draft Pull Request. |
Member
Author
|
/test all |
Member
Author
|
/retest |
Member
Author
|
/test all |
Member
Author
|
/test rhcos |
Member
Author
|
/test all |
This reverts commit 79b15c8. I found a workaround for the issue that prompted that commit. See next commit.
This is a follow-up to 79b15c8 ("cmdlib.sh: go back to using `tail -F` for command output") which was subsequently reverted. To summarize, it seems like in QEMU v8.2 (in f40), the guest sometimes would hang when writing over virtio-serial if the device is hooked up to the QEMU's stdio. In testing, removing the `<&-` hack to close QEMU's stdin fixed it for CoreOS CI but not Prow: coreos#3785 (comment) I think I've narrowed it down to CoreOS CI (i.e. Jenkins) allocating a tty and Prow not. When stdin is not a tty, QEMU would immediately gets EOF if it tries to read anything. I'm not sure exactly what happens, but I think the virtio-serial hang is linked to this (even though there's no userspace code in the guest trying to read from the virtio-serial port). Work around this by explicitly feeding `/dev/zero` to QEMU's stdin.
Member
Author
|
/test all |
tail -F for command output"/dev/zero as qemu stdin
Member
Author
|
OK sweet! CI is happy. 🎉 Yes, I should try to get a minimal reproducer of the underlying issue and file a bug at some point, but... time. :( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a follow-up to 79b15c8 ("cmdlib.sh: go back to using
tail -Ffor command output") which was subsequently reverted.
To summarize, it seems like in QEMU v8.2 (in f40), the guest sometimes
would hang when writing over virtio-serial if the device is hooked up to
the QEMU's stdio.
In testing, removing the
<&-hack to close QEMU's stdin fixed it forCoreOS CI but not Prow:
#3785 (comment)
I think I've narrowed it down to CoreOS CI (i.e. Jenkins) allocating a
tty and Prow not. When stdin is not a tty, QEMU would immediately gets
EOF if it tries to read anything. I'm not sure exactly what happens, but
I think the virtio-serial hang is linked to this (even though there's no
userspace code in the guest trying to read from the virtio-serial port).
Work around this by explicitly feeding
/dev/zeroto QEMU's stdin.