Bug 969845 - upload to a directory occasionally hangs instead of failing
Summary: upload to a directory occasionally hangs instead of failing
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libguestfs
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Richard W.M. Jones
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-06-02 16:59 UTC by Richard W.M. Jones
Modified: 2013-06-02 18:16 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-06-02 18:16:37 UTC
Embargoed:


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

Description Richard W.M. Jones 2013-06-02 16:59:24 UTC
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 17:03:23 UTC
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 17:29:49 UTC
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 17:34:12 UTC
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 18:16:37 UTC
Fixed upstream in commit 697b0f89fed04a4017e033861a9eaaa40b3270d9.


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