Hi! Ludovic Courtès writes: > Maxim Cournoyer skribis: > >> Ludovic Courtès writes: >> >>> Hi, >>> >>> Maxim Cournoyer skribis: >>> >>>> I've tried with the following modified version which runs multiple >>>> threads in parallel (to mimic --max-jobs=4 on the daemon), and I've yet >>>> to trigger it, although the hard drive is grinding heavily: >>> >>> Note that ‘--max-jobs=4’ leads guix-daemon to spawn 4 ‘guix substitute’ >>> processes, which is not what the script is doing here. >> >> Oh! I had overlooked that. What the modified version did is create >> threads rather than processes, right? > > Yes. > > So I’m not sure how to better test this. Perhaps you could try > introducing random delays in the loop (which could cause connections to > go stale), using different substitute URLs, things like that. I've tried some to reproduce the issue with the modified scripts below, but in vain. I'm not sure if my delay is inserted at the right place. I also suspect that my attempt to shuffle the substitute-urls is not really useful, as that's probably what would have happened anyway (although I haven't followed in the code deeply enough to confirm).