Bug 763890 (GLUSTER-2158)

Summary: checksum computation needs to be changed
Product: [Community] GlusterFS Reporter: Pranith Kumar K <pkarampu>
Component: glusterdAssignee: bugs <bugs>
Status: CLOSED EOL QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: mainlineCC: amukherj, asengupt, bugs, chrisw, gluster-bugs, jdarcy, rwheeler
Target Milestone: ---Keywords: FutureFeature, Triaged
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-10-22 15:46:38 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:

Description Pranith Kumar K 2010-11-27 02:35:41 UTC
checksum computation needs to change to accommodate the changing options in the new versions, so that a peer running old version can be probed.

Comment 1 Jeff Darcy 2012-02-10 21:48:21 UTC
Yes, there are multiple problems with this code.

(1) A new info file will be generated when syncing from a peer, possibly ending up with different contents than the just-fetched version (if the generating function adds more lines than before).  This can cause a checksum mismatch relative to the peer you fetched from, which never had a reason to re-generate its copy and corresponding checksum.

(2) Compute_checksum is just a really weak checksum function.  It amounts to a simple XOR with 1-3 bits shifted, which is inappropriate for human-readable-text input.  We should use a standard checksum/hash with better mixing.

(3) Compute_checksum is always called with GF_CHECKSUM_BUF_SIZE=1024 for the size, often using more bytes than were actually read.  The extra bytes will be zero, so they'll have no effect on the output (see previous point).

(4) The use of 0xbabeb00b as a checksum seed might be considered inappropriate.

There was a user in IRC today who was getting checksum mismatches, probably - but not certainly - due to issue 1 above.  If you'd like to brainstorm about what a more robust checksum approach might look like, I'd be glad to help.

Comment 2 Amar Tumballi 2013-02-26 10:30:14 UTC
any action on this? taking off KP from this.

Comment 3 Atin Mukherjee 2015-08-07 06:40:20 UTC
I don't think this is an issue any more. Avra to reconfirm and then we can close it.

Comment 4 Kaleb KEITHLEY 2015-10-22 15:46:38 UTC
because of the large number of bugs filed against mainline version\ is ambiguous and about to be removed as a choice.

If you believe this is still a bug, please change the status back to NEW and choose the appropriate, applicable version for it.

Comment 5 Red Hat Bugzilla 2023-09-14 01:26:38 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days