Bug 763162 (GLUSTER-1430) - encoding of readdirp response fails occasionally
Summary: encoding of readdirp response fails occasionally
Keywords:
Status: CLOSED DUPLICATE of bug 763154
Alias: GLUSTER-1430
Product: GlusterFS
Classification: Community
Component: protocol
Version: mainline
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Raghavendra G
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-08-25 07:05 UTC by Raghavendra G
Modified: 2015-12-01 16:45 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Anand Avati 2010-08-25 04:42:00 UTC
PATCH: http://patches.gluster.com/patch/4282 in master (storage/posix: calculate the correct size of each dirent in readdir/readdirp.)

Comment 1 Raghavendra G 2010-08-25 07:05:57 UTC
When readdirp is done on a directory (one example is during afr self heal)  containing large number of files, encoding of response fails. This is because of iobuf size (into which msg is encoded) being less than the size of the response being encoded. Though readdirp call has size argument set to maximum iobuf size (which is page-size), posix_readdir/readdirp does not calculate the correct size of each entry, thereby resulting in a response bigger than iobuf size. Also, since the entire response is sent in a single iobuf (atleast on sockets), caller of readdirp should also make sure the iobuf can hold the rpc and procedure headers along with direntries.

Comment 2 Anush Shetty 2010-08-25 07:35:31 UTC
This patch successfully triggers self-heal (Bug #1365) and all the files are restored in the backend. But there is a mismatch in md5sum of the directories. The mismatch is seen only in the backend which got self-healed. 

root@pitta:/mnt/gluster# arequal-checksum /mnt/exportnew1/hello2/ 

Entry counts
Regular files   : 10000
Directories     : 1
Symbolic links  : 0
Other           : 0
Total           : 10001

Metadata checksums
Regular files   : 3e9
Directories     : 24d74c
Symbolic links  : 3e9
Other           : 3e9

Checksums
Regular files   : 31e5447350a0c582c4f8f2ae5f51a8e1
Directories     : 30301e31
Symbolic links  : 0
Other           : 0
Total           : f51db6dd3fc17352
root@pitta:/mnt/gluster# arequal-checksum /mnt/gluster/hello2/ 

Entry counts
Regular files   : 10000
Directories     : 1
Symbolic links  : 0
Other           : 0
Total           : 10001

Metadata checksums
Regular files   : 3e9
Directories     : 24d74c
Symbolic links  : 3e9
Other           : 3e9

Checksums
Regular files   : 71b0553083fcdbca65c470265c2bd165
Directories     : 30301e31
Symbolic links  : 0
Other           : 0
Total           : 14742516efe7149e

Comment 3 Raghavendra G 2010-09-03 04:19:01 UTC

*** This bug has been marked as a duplicate of bug 1422 ***


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