Bug 969845 - upload to a directory occasionally hangs instead of failing
upload to a directory occasionally hangs instead of failing
Status: CLOSED UPSTREAM
Product: Virtualization Tools
Classification: Community
Component: libguestfs (Show other bugs)
unspecified
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Richard W.M. Jones
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-02 12:59 EDT by Richard W.M. Jones
Modified: 2013-06-02 14:16 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-06-02 14:16:37 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
upload-test.pl (1.06 KB, application/x-perl)
2013-06-02 12:59 EDT, Richard W.M. Jones
no flags Details
Log with LIBGUESTFS_TRACE=1 LIBGUESTFS_DEBUG=1 (1.28 MB, text/plain)
2013-06-02 13:03 EDT, Richard W.M. Jones
no flags Details

  None (edit)
Description Richard W.M. Jones 2013-06-02 12:59:24 EDT
Created attachment 756038 [details]
upload-test.pl

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):

libguestfs 1.23.1

How reproducible:

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.

Actual results:

Hangs.  During the hang, no %CPU is used and there is no output.

Expected results:

Should run forever.
Comment 1 Richard W.M. Jones 2013-06-02 13:03:23 EDT
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
debug enabled.

Also I am running:
kernel-3.9.4-200.fc18.x86_64
libvirt-daemon-1.0.5.1-1.fc20.x86_64
qemu-1.5.0-1.fc18.x86_64 [self-compiled from Rawhide]
Comment 2 Richard W.M. Jones 2013-06-02 13:29:49 EDT
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]
Comment 3 Richard W.M. Jones 2013-06-02 13:34:12 EDT
Does not happen with $g->upload is replaced by $g->write,
indicating this is probably a protocol synchronization error
related to FileIn & error handling.
Comment 4 Richard W.M. Jones 2013-06-02 14:16:37 EDT
Fixed upstream in commit 697b0f89fed04a4017e033861a9eaaa40b3270d9.

Note You need to log in before you can comment on or make changes to this bug.