Index | Thread | Search

From:
Caspar Schutijser <caspar@schutijser.com>
Subject:
Re: sccache lifetime & ports infrastructure ?
To:
Landry Breuil <landry@openbsd.org>
Cc:
ports@openbsd.org, caspar@openbsd.org
Date:
Sun, 21 Jan 2024 16:16:56 +0100

Download raw body.

Thread
  • Caspar Schutijser:

    sccache lifetime & ports infrastructure ?

On Tue, Dec 26, 2023 at 08:15:55AM +0100, Landry Breuil wrote:
> Le Sat, Dec 23, 2023 at 04:09:19PM +0100, Caspar Schutijser a écrit :
> > On Sat, Dec 23, 2023 at 09:07:24AM +0100, Landry Breuil wrote:
> > > hi,
> > > 
> > > sending to ports@ for more ideas, devel/sccache works pretty great here,
> > > but for now its client/server model has some issues. from my
> > > understanding, a server is spawned at the first invocation of sccache,
> > > and it runs forever
> > 
> > The running forever should only happen if SCCACHE_IDLE_TIMEOUT is
> > set to 0, as far as I understand. Source:
> > https://github.com/mozilla/sccache/blob/main/docs/Configuration.md
> > 
> > > , or until it had nothing to do and
> > > SCCACHE_IDLE_TIMEOUT expired.
> > > 
> > > i've seen at occasion the make process 'waiting' at the end of the
> > > build, from my understanding because sccache was used and thus a server
> > > was spawned, and the server was still running.  manually killing the
> > > server process allows make build to finish and proceed with make fake.
> > 
> > Does make wait indefinitely or does it succesfully finish after some
> > time?
> 
> i think it finishes, but after the timeout. if a rust file was built
> recently, you end up waiting for nothing..
> 
> > And when you see this problematic behavior, did you set a custom value
> > for SCCACHE_IDLE_TIMEOUT? Did you use any other SCCACHE-related
> > environment variables? I can't remember seeing this behavior myself
> > and I haven't changed SCCACHE_IDLE_TIMEOUT. So I wonder what the
> > relevant difference is between our setups.
> 
> i have SCCACHE_ENV=SCCACHE_CACHE_SIZE="25G" SCCACHE_IDLE_TIMEOUT=1200
> , i'll remove the last one, but im pretty sure if you build a single
> rust port you might see sccache hanging around at the end, waiting for
> the timeout.. which would make sense after all. i dont understand why
> the make process waits for it since its not a child of make anymore.

Apologies for the late answer.

I've tried it a couple of times but I can't reproduce it here...
Really strange. To be clear: I *do* see one sccache process (the
server) still running when a Rust port is done compiling, but
"make package" completes normally without waiting for that process to
exit. I've tried it with the benchmarks/hyperbench and x11/xcolor ports.
Can you try with those ports as well to see if you see the behavior
there? I can try it with a Mozilla too but then I need to write a little
script so that I can verify that the process indeed prevents it from
continuing, while not having to sit behind my screen all the time to
wait for it to happen.

Caspar