Bug 10053 - ccache alters max cache size by itself
Summary: ccache alters max cache size by itself
Status: RESOLVED WORKSFORME
Alias: None
Product: ccache
Classification: Unclassified
Component: ccache (show other bugs)
Version: 3.1.9
Hardware: IA64 Linux
: P5 normal
Target Milestone: ---
Assignee: Joel Rosdahl
QA Contact: Joel Rosdahl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-29 16:40 UTC by Rob Chansky
Modified: 2014-04-09 19:13 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rob Chansky 2013-07-29 16:40:21 UTC
I run 'ccache -M 10G' to set ccache's max cache size, and I notice after a few days of coding and compiling that it's set back to 1G. I run 'ccache -M 0' to remove the max cache size restriction, and I find a few days later it's set back to 1G. Unless I'm nuts, it seems to be setting its own max cache size.

The filesystem with the cache is 500G and 18% full. 

Thank you.
Comment 1 Joel Rosdahl 2013-08-08 20:31:58 UTC
Hi Rob,

I have no good idea about why that happens for you; I haven't heard about the symptom before.

The cache max size setting is stored in the "stats" files found in the 16 C/X/stats files, where C is the ccache directory (defaults to ~/.ccache) and X is a hexadecimal digit. The fifteenth number in any of the files tells the size (divide it by 65536 and you get the size in GiB).

Which file system are you using?
Comment 2 Rob Chansky 2013-08-08 23:22:03 UTC
Thanks for responding. ccache is a great program that saves us a lot of
time here. I'm just using ext4. After happening twice, the problem hasn't
recurred, and I'm wondering if I might have tweaked something
accidentally--who knows how. If it occurs again, I'll let you know.

Thanks again,
Rob



On Thu, Aug 8, 2013 at 2:31 PM, <samba-bugs@samba.org> wrote:

> https://bugzilla.samba.org/show_bug.cgi?id=10053
>
> --- Comment #1 from Joel Rosdahl <joel@rosdahl.net> 2013-08-08 20:31:58
> UTC ---
> Hi Rob,
>
> I have no good idea about why that happens for you; I haven't heard about
> the
> symptom before.
>
> The cache max size setting is stored in the "stats" files found in the 16
> C/X/stats files, where C is the ccache directory (defaults to ~/.ccache)
> and X
> is a hexadecimal digit. The fifteenth number in any of the files tells the
> size
> (divide it by 65536 and you get the size in GiB).
>
> Which file system are you using?
>
> --
> Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email
> ------- You are receiving this mail because: -------
> You reported the bug.
>
Comment 3 Rob Chansky 2013-12-12 18:15:50 UTC
I finally figured out what was going on here. 

A part of my make process has to be run by root. That would leave root-owned 'stats' files in my ccache, and then the next time I tried to build as myself, ccache is unable to read those files, so it created new ones with apparently a default cache size that is far, far too small for this project. 

So ultimately it was my fault. 

Still, it'd be an improvement if ccache showed me an error in this situation. Thanks for all the hard work, your project saves me a ton of waiting.