On Thu, Apr 29, 2010 at 09:48:28AM +0200, "Paweł Hajdan, Jr." wrote:
> On 4/29/10 9:41 AM, Robin H. Johnson wrote:
> > On Thu, Apr 29, 2010 at 09:06:51AM +0200, "Paweł Hajdan, Jr." wrote:
> >> What actions would you suggest?
> > Have your user do a binary search of the ccache dir to find which cache
> > file is causing the problem, by restoring from his backup then renaming
> > half the directories each time.
>
> It may be difficult, see
> <https://bugs.gentoo.org/show_bug.cgi?id=316657#c8>. Do we have some
> docs on the web with detailed instructions how to do that?
It's a depth-2, hex-fanout directory structure.
$CCACHE_DIR/[0-9a-f]/[0-9a-f].
Just start with renaming/moving subsets of half of the directories in
the first level, until you hit the problem.
Alternatively, turn on the ccache debug log, using CCACHE_LOGFILE in
make.conf, AND set MAKEOPTS=-j1, and just rename the filenames it points
out to trace which of them is the problem.
>
> > ccache itself hasn't been the problem, but unreliable hardware has.
> > Provably by removing the corrupt cache files, then running with ccache a
> > few more times, and having everything work perfectly.
> I see. However, I'd consider not detecting the corruption a bug.
How would it know that the file was corrupted after close? The only
possible way would be changing the format or adding another file with
the expected hash of the result file.
Patches accepted, but I think users just need to take a LOT more care of
their hardware.
--
Robin Hugh Johnson
Gentoo Linux: Developer, Trustee & Infrastructure Lead
E-Mail : robbat2@gentoo.org
GnuPG FP : 11AC BA4F 4778 E3F6 E4ED F38E B27B 944E 3488 4E85
Don't use ccache. We (speaking as a former gnome herd member) have had
countless unexplained bugs due to ccache.
Now, the gnome procedure for build failures is to ask users to first
disable distcc and ccache before trying to reproduce the bug, and that
solves nearly all the weird issues that no-one else can reproduce.
Bottom line, unless you're building the same code over and over again,
don't use ccache. And even if you are, don't use it, its cache is just
too easily broken.
Not that countless. Personal experience reports one bug in 8 years of
use... Just as was previously mentioned in this thread:
* check your hardware
* know your FEATURES and howto test failures when some are enabled
it's just like any package failing with some gcc/linked/whatever flag,
you just don't stop using that flag where it works just because of one
package, nor do you stop using gcc.
--
Gilles Dartiguelongue <eva@gentoo.org>
Gentoo
04-30-2010, 04:34 PM
"Robin H. Johnson"
ccache causing problems
On Fri, Apr 30, 2010 at 01:02:48AM +0200, Gilles Dartiguelongue wrote:
> it's just like any package failing with some gcc/linked/whatever flag,
> you just don't stop using that flag where it works just because of one
> package, nor do you stop using gcc.
And for anybody that thinks they have a bug in ccache triggered by some
package.
1. backup the contents of your ccache.
2. Clear the cache.
3. Build once to populate the cache.
4. Build again to build against the cache (once or twice, should have
identical results).
If step 4 passes, you know you had corruption in your cache.
If step 4 fails, then I'm interested in where it failed, esp. if you can
run the entire process again and repeat the problem on demand.
Note however, that while I have a high level of trust in ccache, I do
think there are more latent bugs in distcc.
--
Robin Hugh Johnson
Gentoo Linux: Developer, Trustee & Infrastructure Lead
E-Mail : robbat2@gentoo.org
GnuPG FP : 11AC BA4F 4778 E3F6 E4ED F38E B27B 944E 3488 4E85
05-03-2010, 08:49 AM
Peter Hjalmarsson
ccache causing problems
fre 2010-04-30 klockan 16:34 +0000 skrev Robin H. Johnson:
> Note however, that while I have a high level of trust in ccache, I do
> think there are more latent bugs in distcc.
>
Heh, yeah. I have had problems with ccache having broken cache (i.e.
stuff breaks, removing the cache and it unbreaks) on different
computers, but since I stopped use distcc together with it I have had no
such problems anymore.
Still since those experiences I always start with trying without ccache
when I hit strange bugs.