Subject: Re: bug#59078: [PATCH] lint: Split the derivation lint checker by system.

From: Ludovic Courtès <[email-masked]>
Date: Mon, 14 Nov 2022 13:51:37 +0100

Hi!

Christopher Baines <[email-masked]> skribis:

> Ludovic Courtès <[email-masked]> writes:

[...]

>> The ‘derivation’ checker was added for this purpose: making sure that a
>> package’s derivation can be computed for all the supported systems.
>> Previously it was easy to overlook that kind of breakage.
>>
>> I think it’s important to keep a ‘derivation’ checker that does this.
>
> What aspect of it do you think is important?

I meant that it’s important to have a single ‘derivation’ checker that
checks derivations for all the supported systems.  Packagers should be
able to run ‘guix lint -c derivation PKG’ and be confident that it’s
fine for all systems.

>> Now, the memory consumption you report is unacceptable and this needs to
>> be addressed.
>>
>> Most (all?) caches are now per-session (associated with
>> <store-connection>).  Since ‘guix lint’ uses a single session, those
>> caches keep growing because there’s no eviction mechanism in place.
>>
>> A hack like the one below should work around that.  Could you check how
>> well it works for you?
>
> I tried in the Guix Data Service processing packages in chunks of 1000
> plus closing the store connection after each batch,

How was it implemented?  Was it after the caches came into
<store-connection>?

> and that led to a heap size of 3090MiB. But this is still higher than
> 1778MiB heap usage I got just by splitting the derivation linter.

I didn’t take the time to do it, but it would be nice to see, with the
patch I gave, how ‘guix lint -c derivations’ behaves.

Thanks,
Ludo’.