Saturday, December 23, 2023

Re: sccache lifetime & ports infrastructure ?

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?

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.

Caspar

> not a big deal when you do something else, but annoying when you need a
> package *now* :)
>
> looking at the processes, the sccache process is reparented to init...
> so why is make waiting at the end ?
>
> root 1 0.0 0.0 952 480 ?? I Thu08AM 0:00.02 /sbin/init
> landry 15309 6.3 0.1 133596 39540 ?? S 8:59AM 0:17.13 -/usr/local/bin/sccache
>
> some ideas:
> - call sccache --stop-server at the end of make build ?
> - have some magic during the invocation so the make process doesnt wait for it ?
> - have sccache run as an rc.d daemon so that make doesnt need to start one ?
>
> Landry

No comments:

Post a Comment