Cache bug: cached patches truncated to nearest 1024-byte boundary

Konstantin Ryabitsev mricon at kernel.org
Wed Jun 11 21:46:08 CEST 2014


Hi, all:

It looks like cached patches are truncated to the nearest 1024-byte
boundary in the patch body. E.g.:

> mricon at nikko:[/tmp]$ wget -O no-cache "http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/patch/?id=6e1b4fdad5157bb9e88777d525704aba24389bee"
...
> 2014-06-11 15:34:51 (80.4 MB/s) - ‘no-cache’ saved [4767]

Patch is complete, without truncation. Next hit, with cache in place:

> mricon at nikko:[/tmp]$ wget -O yes-cache "http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/patch/?id=6e1b4
> fdad5157bb9e88777d525704aba24389bee"
...
> 2014-06-11 15:35:01 (17.0 MB/s) - ‘yes-cache’ saved [4096/4096]

Length truncated to 4096. The cache on disk looks truncated as well, so
the bug must me during the process of saving cache. The same is true for
larger patches:

> mricon at nikko:[/tmp]$ wget -O no-cache "http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/patch/?id=2840c566e95599cd60c7143762ca8b49d9395050"
...
> 2014-06-11 15:41:33 (1.07 MB/s) - ‘no-cache’ saved [979644]

979644 bytes with a cache-miss

> mricon at nikko:[/tmp]$ wget -O yes-cache "http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/patch/?id=2840c
> 566e95599cd60c7143762ca8b49d9395050"
...
> 2014-06-11 15:41:46 (1.05 MB/s) - ‘yes-cache’ saved [978944]

978944 (956KB exactly) with a cache-hit

I've verified this on our other installations and it would appear to
affect them all, not just git.kernel.org systems. Only patches appear to
be truncated -- all other cache files look sane.

This is causing us some grief, so a quickfix would be greatly appreciated!

Best,
-- 
Konstantin Ryabitsev
Senior Systems Administrator
Linux Foundation Collab Projects
Montréal, Québec

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 538 bytes
Desc: OpenPGP digital signature
URL: <http://lists.zx2c4.com/pipermail/cgit/attachments/20140611/661a816d/attachment.asc>


More information about the CGit mailing list