Red Hat Bugzilla – Bug 969845
upload to a directory occasionally hangs instead of failing
Last modified: 2013-06-02 14:16:37 EDT
Created attachment 756038 [details]
Description of problem:
See attached test script. This test script creates a directory
and then uploads a file to this directory (to the directory itself,
not inside the directory). Obviously this should fail since
you can't upload to a directory. And usually it does fail. However
once in a while (very rarely) it hangs.
Version-Release number of selected component (if applicable):
100% reproducible using the test script, although the actual
failure is very rare.
Steps to Reproduce:
1. Run attached test script.
2. Observe that after a while the spinner will hang.
3. Rerun with LIBGUESTFS_DEBUG=1 to get more detail.
Hangs. During the hang, no %CPU is used and there is no output.
Should run forever.
Created attachment 756042 [details]
Log with LIBGUESTFS_TRACE=1 LIBGUESTFS_DEBUG=1
This is a log when running upload-test.pl with both trace and
Also I am running:
qemu-1.5.0-1.fc18.x86_64 [self-compiled from Rawhide]
Also happens with upstream qemu from git (fixed because there's
currently an unrelated bug in qemu).
Also happens with qemu 1.5.0-4 [self-compiled from Rawhide]
Does not happen with $g->upload is replaced by $g->write,
indicating this is probably a protocol synchronization error
related to FileIn & error handling.
Fixed upstream in commit 697b0f89fed04a4017e033861a9eaaa40b3270d9.