Project

General

Profile

Actions

Bug #13713

closed

Ceph CRC32 algorithm appears broken

Added by Chris Holcombe over 8 years ago. Updated over 8 years ago.

Status:
Rejected
Priority:
High
Assignee:
-
Category:
-
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
Regression:
Severity:
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

I was looking at wireshark packets and I wanted to see if I could verify the crc checksums that Ceph is generating and receiving. The code shows that Ceph is using the castagnoli crc32 variant. I wasn't able to reproduce the checksum so I fell back to looking at Ceph's unit tests and tried to reproduce this: https://github.com/ceph/ceph/blob/master/src/test/common/test_crc32c.cc#L21

I have example code here in Rust: https://gist.github.com/cholcombe973/b0846a814be0a9e885f8
and in Python that produce different results: https://gist.github.com/cholcombe973/a0af818d212e58ae151c

Is the unit test for this file using generated output from the crc32 algorithm in the code base or a known good hash?

I'm guessing I am doing something wrong here but I'm not entirely sure what.

Actions

Also available in: Atom PDF