Bug 580246 - tar-in command hangs if uploading more than available space
tar-in command hangs if uploading more than available space
Status: CLOSED UPSTREAM
Product: Virtualization Tools
Classification: Community
Component: libguestfs (Show other bugs)
unspecified
All Linux
low Severity medium
: ---
: ---
Assigned To: Richard W.M. Jones
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-04-07 15:50 EDT by Richard W.M. Jones
Modified: 2010-04-30 19:46 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-04-08 05:21:35 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Richard W.M. Jones 2010-04-07 15:50:00 EDT
Description of problem:

If you use a command such as 'tar-in' (or 'tgz-in') and upload more
data than you have available space, libguestfs hangs.

Example reproducer:

$ rm -f test.img
$ truncate -s 10M test.img
$ tar cf test.tar test.img
$ ls -l test.{img,tar}
-rw-rw-r--. 1 rjones rjones 10485760 2010-04-07 20:46 test.img
-rw-rw-r--. 1 rjones rjones 10496000 2010-04-07 20:46 test.tar
$ guestfish -a test.img \
    run : mkfs ext3 /dev/sda : mount /dev/sda / : tar-in test.tar /
[hangs]

To see what's going on, add the -v option to the above guestfish
command.  The last messages are:

receive_file: got chunk: cancel = 0, len = 8192, buf = 0x5d3d640
receive_file: got chunk: cancel = 0, len = 8192, buf = 0x5d3d640
receive_file: got chunk: cancel = 0, len = 8192, buf = 0x5d3d640
receive_file: got chunk: cancel = 0, len = 8192, buf = 0x5d3d640
receive_file: got chunk: cancel = 0, len = 8192, buf = 0x5d3d640
receive_file: got chunk: cancel = 0, len = 8192, buf = 0x5d3d640
receive_file: got chunk: cancel = 0, len = 8192, buf = 0x5d3d640
receive_file: got chunk: cancel = 0, len = 2048, buf = 0x5d3be40
receive_file: got chunk: cancel = 0, len = 0, buf = (nil)
tar: Exiting with failure status due to previous errors
recv_from_daemon: 0x27f9ef0 g->state = 3, size_rtn = 0x7fff119f1c3c, buf_rtn = 0x7fff119f1c30
[hangs]

Version-Release number of selected component (if applicable):

1.0.89

How reproducible:

Always.

Steps to Reproduce:
1. See above.
2.
3.
  
Actual results:


Expected results:


Additional info:
Comment 1 Richard W.M. Jones 2010-04-07 16:56:42 EDT
Patch posted upstream:
https://www.redhat.com/archives/libguestfs/2010-April/msg00038.html
Comment 2 Richard W.M. Jones 2010-04-07 17:38:52 EDT
Ignore comment 1.
Comment 3 Richard W.M. Jones 2010-04-08 04:02:09 EDT
Two-part patch to fix this posted upstream:
https://www.redhat.com/archives/libguestfs/2010-April/msg00043.html
Comment 4 Richard W.M. Jones 2010-04-08 05:21:35 EDT
ACKed and upstream here:
http://git.annexia.org/?p=libguestfs.git;a=commitdiff;h=07f4b20ae959069fca41756b0dc103ec5fa99754
Comment 5 Richard W.M. Jones 2010-04-08 10:30:50 EDT
Fixed in 1.3.1.
Comment 6 Fedora Update System 2010-04-09 10:10:02 EDT
libguestfs-1.2.1-1.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/libguestfs-1.2.1-1.fc13
Comment 7 Fedora Update System 2010-04-13 03:43:36 EDT
libguestfs-1.2.2-1.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/libguestfs-1.2.2-1.fc13
Comment 8 Fedora Update System 2010-04-30 19:46:46 EDT
libguestfs-1.2.2-1.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.

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