Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 892275

Summary: checksums-out fail to compute the checksums of all regular files in directory
Product: Red Hat Enterprise Linux 7 Reporter: Mohua Li <moli>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED CURRENTRELEASE QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: high    
Version: 7.0CC: bfan, leiwang, lkong, wshi
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libguestfs-1.22.4-1.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 895904 (view as bug list) Environment:
Last Closed: 2014-06-13 10:16:37 UTC Type: Bug
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: 895904    
Bug Blocks:    

Description Mohua Li 2013-01-06 09:18:15 UTC
Description of problem:

checksums-out fail to compute the checksums of all regular files in directo
ry, but the checksum works fine,

><fs> checksums-out crc /test  file
libguestfs: trace: checksums_out "crc" "/test" "file"
libguestfs: send_to_daemon: 64 bytes: 00 00 00 3c | 20 00 f5 f5 | 00 00 00 =
04 | 00 00 00 f4 | 00 00 00 0
0 | ...
guestfsd: main_loop: new request, len 0x3c
cd find && xargs -type f -print0 | /sysroot/testDescription of problem:

libguestfs: recv_from_daemon: 40 bytes: 20 00 f5 f5 | 00 00 00 04 | 00 00 0=
0 f4 | 00 00 00 01 | 00 12 34
 05 | ...
sh: line 0: cd: find: No such file or directory
/test: Success
guestfsd: main_loop: proc 244 (checksums_out) took 0.00 seconds
libguestfs: recv_from_daemon: 8 bytes: 00 00 00 01 | 00 00 00 00 |
libguestfs: error: file receive cancelled by daemon
libguestfs: error: file: error in chunked encoding
libguestfs: trace: checksums_out =3D -1 (error)


the folder test is like below,

><fs> ls /test
libguestfs: trace: ls =3D ["file_ascii", "subdir"]
file_ascii
subdir




Version-Release number of selected component (if applicable):
libguestfs-1.20.1-4.el7.x86_64

How reproducible:
always

Steps to Reproduce:
1. prepare some file like above
2.  checksums-out crc /test  file
3.
 
Actual results:


Expected results:


Additional info:

Comment 5 Lingfei Kong 2013-12-06 09:36:37 UTC
Can reproduce with libguestfs-1.20.1-4.el7

Steps to reproduce:
1. 
#guestfish -a RHEL-Server-6.5-64-hvm.raw
><fs> run
><fs> list-filesystems 
/dev/sda1: ext4
/dev/VolGroup/lv_root: ext4
/dev/VolGroup/lv_swap: swap
><fs> mount /dev/sda1 /
><fs> mkdir /test

2. Upload some files to /test/
><fs> upload testfile /test/testfile
><fs> upload anaconda-ks.cfg /test/anaconda-ks.cfg
><fs> ls /test/
anaconda-ks.cfg
testfile

3. 
><fs> checksums-out crc /test  chkfile
libguestfs: trace: checksums_out "crc" "/test" "chkfile"
libguestfs: send_to_daemon: 64 bytes: 00 00 00 3c | 20 00 f5 f5 | 00 00 00 04 | 00 00 00 f4 | 00 00 00 00 | ...
guestfsd: main_loop: proc 1 (mount) took 0.04 seconds
guestfsd: main_loop: new request, len 0x3c
cd find && xargs -type f -print0 | /sysroot/test -0 cksum
libguestfs: recv_from_daemon: 40 bytes: 20 00 f5 f5 | 00 00 00 04 | 00 00 00 f4 | 00 00 00 01 | 00 12 34 13 | ...
sh: line 0: cd: find: No such file or directory
/test: Success
libguestfs: recv_from_daemon: 8 bytes: 00 00 00 01 | 00 00 00 00 | 
libguestfs: error: file receive cancelled by daemon
libguestfs: error: chkfile: error in chunked encoding
libguestfs: trace: checksums_out = -1 (error)


4. Check chkfile on your local host 
#cat chkfile 

command checksums-out failed. 



---------------------------------
Verified with libguestfs-1.22.6-15.el7

Steps to verify:
1. 
#guestfish -a RHEL-Server-6.5-64-hvm.raw
><fs> run
><fs> list-filesystems 
/dev/sda1: ext4
/dev/VolGroup/lv_root: ext4
/dev/VolGroup/lv_swap: swap
><fs> mount /dev/sda1 /
><fs> mkdir /test

2. Upload some files to /test/
><fs> upload testfile /test/testfile
><fs> upload anaconda-ks.cfg /test/anaconda-ks.cfg
><fs> ls /test/
anaconda-ks.cfg
testfile

3. 
><fs> checksums-out crc /test  chkfile
libguestfs: trace: checksums_out "crc" "/test" "chkfile"
guestfsd: main_loop: new request, len 0x3c
cd /sysroot/test && find -type f -print0 | xargs -0 cksum
guestfsd: main_loop: proc 244 (checksums_out) took 0.01 secondslibguestfs: trace: checksums_out = 0


4. Check chkfile on your local host
#cat chkfile 
3742591781 6615 ./testfile
962200688 4337 ./anaconda-ks.cfg

5. On you local host use 'cksum' to check 
#cksum testfile 
3742591781 6615 testfile
#cksum anaconda-ks.cfg 
962200688 4337 anaconda-ks.cfg


command checksums-out works well, and the result is correct according to step 5. So, bug is fixed.

Comment 6 Ludek Smid 2014-06-13 10:16:37 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.