Subject: Re: bug#30290: guix-daemon slows to a crawl when a substitute server is offline

From: zimoun <[email-masked]>
Date: Wed, 18 Aug 2021 13:19:14 +0200

Hi Maxim,

Reading the discussion…

On Tue, 13 Jul 2021 at 10:49, zimoun <[email-masked]> wrote:

> What is the status of this old bug#30290 [1]?
>
> 1: <http://issues.guix.gnu.org/issue/30290>
>
> On Wed, 09 Jun 2021 at 23:34, zimoun <[email-masked]> wrote:
>> On Wed, 24 Mar 2021 at 22:55, zimoun <[email-masked]> wrote:
>>> On Mon, 29 Jan 2018 at 22:07, Maxim Cournoyer <[email-masked]>
>>> wrote:
>>>> When a substitute server used by guix-daemon is offline, the daemon will
>>>> keep attempting to connect to it, even when it shouldn't need any data
>>>> (ran 'sudo guix system reconfigure my-config.scm' multiple times in a
>>>> row.
>>>>
>>>> With the disconnected server (bayfront in my case), that command would
>>>> take close to 8 minutes, with many system calls like:
>>>>
>>>> connect(14, {sa_family=AF_INET, sin_port=htons(443),
>>>> sin_addr=inet_addr("141.255.128.56")}, 16) = -1 EINPROGRESS
>>>>
>>>> which wasted 5 seconds each time.
>>>>
>>>> After removing this server from my substitute servers list, the same
>>>> operation (system reconfigure) is 8 times faster (1 minute).
>>>>
>>>> Suggestion: the daemon should stop trying to use the offline substitute
>>>> server after trying for X times, and print a warning about it.
>>
>> [...]
>>
>>> From: Maxim Cournoyer <[email-masked]>
>>> Date: Fri, 18 Dec 2020 22:04:04 -0500 (24 weeks, 4 days, 18 hours ago)
>>>
>>> I'm not sure if the recent offloading work that Mathieu did touched that
>>> topic.  I'd need to test the scenario.  Perhaps a system test would be
>>> useful.
>>> ----------
>>>
>>> From: Ludovic Courtès <[email-masked]>
>>> Date: Tue, 22 Dec 2020 16:16:08 +0100
>>> Date: Tue, 22 Dec 2020 16:16:08 +0100 (24 weeks, 1 day, 6 hours ago)
>>>
>>> Is it still a problem?  Commit 4f5234be0378368e6af25925db46612838d25e58
>>> (Nov. 2019) added a table of unreachable hosts.  That way, a ‘guix
>>> substitute --query’ process won’t retry connections to an unreachable
>>> host.
>>> ----------
>>>
>>> From: Efraim Flashner <[email-masked]>
>>> Date: Mon, 28 Dec 2020 14:19:02 +0200
>>> Date: Mon, 28 Dec 2020 14:19:02 +0200 (23 weeks, 2 days, 9 hours ago)
>>>
>>> Occasionally my internet drops itself, and I find I'm left forever
>>> waiting for a timeout to see what sources I have cached locally.
>>> ----------
>>
>> What is the current stats of this bug?   Is it still happening with the
>> recent improvements of Cuirass?
>
> After reading all this, I think this bug can be closed.  WDYT?

…I appears to me that this bug could be close.  WDYT?

Cheers,
simon