Gentoo Archives: gentoo-dev

From: "Robin H. Johnson" <robbat2@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] ccache causing problems
Date: Thu, 29 Apr 2010 08:33:24
Message-Id: robbat2-20100429T075409-410878356Z@orbis-terrarum.net
In Reply to: Re: [gentoo-dev] ccache causing problems by "Paweł Hajdan
1 On Thu, Apr 29, 2010 at 09:48:28AM +0200, "Paweł Hajdan, Jr." wrote:
2 > On 4/29/10 9:41 AM, Robin H. Johnson wrote:
3 > > On Thu, Apr 29, 2010 at 09:06:51AM +0200, "Paweł Hajdan, Jr." wrote:
4 > >> What actions would you suggest?
5 > > Have your user do a binary search of the ccache dir to find which cache
6 > > file is causing the problem, by restoring from his backup then renaming
7 > > half the directories each time.
8 >
9 > It may be difficult, see
10 > <https://bugs.gentoo.org/show_bug.cgi?id=316657#c8>. Do we have some
11 > docs on the web with detailed instructions how to do that?
12 It's a depth-2, hex-fanout directory structure.
13 $CCACHE_DIR/[0-9a-f]/[0-9a-f].
14
15 Just start with renaming/moving subsets of half of the directories in
16 the first level, until you hit the problem.
17
18 Alternatively, turn on the ccache debug log, using CCACHE_LOGFILE in
19 make.conf, AND set MAKEOPTS=-j1, and just rename the filenames it points
20 out to trace which of them is the problem.
21
22 >
23 > > ccache itself hasn't been the problem, but unreliable hardware has.
24 > > Provably by removing the corrupt cache files, then running with ccache a
25 > > few more times, and having everything work perfectly.
26 > I see. However, I'd consider not detecting the corruption a bug.
27 How would it know that the file was corrupted after close? The only
28 possible way would be changing the format or adding another file with
29 the expected hash of the result file.
30
31 Patches accepted, but I think users just need to take a LOT more care of
32 their hardware.
33
34 --
35 Robin Hugh Johnson
36 Gentoo Linux: Developer, Trustee & Infrastructure Lead
37 E-Mail : robbat2@g.o
38 GnuPG FP : 11AC BA4F 4778 E3F6 E4ED F38E B27B 944E 3488 4E85