Bug 584228
Summary: | tgz-in/tar-in command hang when run with a vfat img | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Community] Virtualization Tools | Reporter: | Pengzhen Cao <pcao> | ||||||
Component: | libguestfs | Assignee: | Richard W.M. Jones <rjones> | ||||||
Status: | CLOSED UPSTREAM | QA Contact: | |||||||
Severity: | high | Docs Contact: | |||||||
Priority: | high | ||||||||
Version: | unspecified | CC: | mbooth, virt-maint | ||||||
Target Milestone: | --- | ||||||||
Target Release: | --- | ||||||||
Hardware: | All | ||||||||
OS: | Linux | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | |||||||||
: | 584243 (view as bug list) | Environment: | |||||||
Last Closed: | 2011-07-14 19:06:29 UTC | Type: | --- | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Bug Depends On: | 576879, 627835 | ||||||||
Bug Blocks: | 584243 | ||||||||
Attachments: |
|
Description
Pengzhen Cao
2010-04-21 03:42:45 UTC
I noticed there are two git commits on Apr.8th that changed the tar-in behavior: 07f4b20ae959069fca41756b0dc103ec5fa99754 de7ef2a0fdcbcddfd35ecb8ee2804e1ca0968454 one comment is: "(b) Use write instead of fwrite to write out the tar file. This is just because the error handling of write seems to be better specified and easier to use." Is this changeset that fix the hang issue? But do we need to throw out error message like" libguestfsd: error: tgz-in: tar subcommand failed on directory: /" when run with vfat images? I think we should not do chown on vfat images. Created attachment 407990 [details]
tar-in behavior with latest v1.3.4 git version
add log file of tgz-in behaviour with latest v1.3.4 libguestfs
I think this is an instance of bug 576879. 'tar-in' generally fails if the target is a vfat partition. The reason is that the 'tar' command tries to change the ownership of files to match what is in the tarball (ie. calling chown(2)), but vfat doesn't support chown and gives an error. This is further compounded by the fact that we still don't handle errors in upload/*-in commands properly, which is bug 576879. *** Bug 584243 has been marked as a duplicate of this bug. *** Reproducer: guestfish -N fs:vfat:1G -m /dev/sda1 upload /tmp/libguestfs-1.3.13.tar.gz / (where /tmp/libguestfs-1.3.13.tar.gz is any largish tarball) Created attachment 415350 [details]
Log file from guestfish -v output
The reproducer in comment 5 is *WRONG*. It contains an error because the command should be "tar-in" or "tgz-in", not "upload". A corrected reproducer is: guestfish -N fs:vfat:1G -m /dev/sda1 tgz-in /tmp/libguestfs-1.3.13.tar.gz / (where again "/tmp/libguestfs-1.3.13.tar.gz" is any tarball which is large but much smaller than 1G). In the error case, this hangs. In the fixed case, this does not hang but will either succeed (if tar in the daemon is ignoring UIDs like a good boy) or will give a suitable error message and not lose protocol synch. Note that for me this is all fixed by the patch series discussed in https://bugzilla.redhat.com/show_bug.cgi?id=576879#c9 https://bugzilla.redhat.com/show_bug.cgi?id=576879#c10 This fix is included in libguestfs 1.9.12. I've tested this again with libguestfs 1.11.16 and it is fixed. |