Bug 580246 - tar-in command hangs if uploading more than available space
Summary: tar-in command hangs if uploading more than available space
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libguestfs
Version: unspecified
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Richard W.M. Jones
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-04-07 19:50 UTC by Richard W.M. Jones
Modified: 2010-04-30 23:46 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-04-08 09:21:35 UTC


Attachments (Terms of Use)

Description Richard W.M. Jones 2010-04-07 19:50:00 UTC
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 20:56:42 UTC
Patch posted upstream:
https://www.redhat.com/archives/libguestfs/2010-April/msg00038.html

Comment 2 Richard W.M. Jones 2010-04-07 21:38:52 UTC
Ignore comment 1.

Comment 3 Richard W.M. Jones 2010-04-08 08:02:09 UTC
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 09:21:35 UTC
ACKed and upstream here:
http://git.annexia.org/?p=libguestfs.git;a=commitdiff;h=07f4b20ae959069fca41756b0dc103ec5fa99754

Comment 5 Richard W.M. Jones 2010-04-08 14:30:50 UTC
Fixed in 1.3.1.

Comment 6 Fedora Update System 2010-04-09 14:10:02 UTC
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 07:43:36 UTC
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 23:46:46 UTC
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.