snappy-c icon indicating copy to clipboard operation
snappy-c copied to clipboard

sgverify fails

Open edenhill opened this issue 8 years ago • 0 comments

When updating librdkafka's copy of snappy-c from 711c52b7ef94c8e5c600571987fbe5769070b884 to 8015f2d28739b9a6076ebaa6c53fe27bc238d219 snappy compression stopped working for me. Since librdkafka uses the SG/iovec interface I turned to sgverify to see if there's been a regression. It turns out I can't run sgverify succesfully on the latest master, it always fails with a large number of error messages, like:

$ ./sgverify ./sgverify | head
uncompression of ./sgverify failed: Input/output error
compressed sg 0 does not match
46480: 0 vs 8b
46481: 0 vs 10
46482: 0 vs 31
46483: 0 vs c0
46484: 0 vs e8
46485: 0 vs d7
46486: 0 vs fa
46487: 0 vs ff
....continues...

After a bit of git bisect I found that due to bad handling of snappy_uncompress_iov() return value errors were not really reported by sgverify before version ec2b3ca1af04264b6f488452972f0dd32a06a394.

Which leads to the question: did sgverify ever work? Maybe I'm just not using it right.

edenhill avatar Nov 06 '15 14:11 edenhill