GNU bug report logs -
#31785
Multiple client 'build-paths' RPCs can lead to daemon deadlock
Previous Next
Reported by: ludo <at> gnu.org (Ludovic Courtès)
Date: Mon, 11 Jun 2018 14:07:02 UTC
Severity: important
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Hi,
ludo <at> gnu.org (Ludovic Courtès) skribis:
> This comes from the fact that ‘LocalStore::buildPaths’ takes the
> user-supplied derivation list as is, without sorting it, and then
> acquires locks in that order in ‘Worker::run’.
This diagnostic is incorrect: ‘Goals’ is a set sorted according to
‘CompareGoalPtrs’, which is lexical sort that arranges so substitution
goals come before derivation goals. Thus, ‘_topGoals’ and ‘awake2’ in
Worker::run are sorted in a deterministic fashion.
The problem is that ‘Worker::waitForAWhile’ reshuffles the order of
goals by temporarily moving goals out of the way. This can happen when
offloading replies “postpone”, which is inherently non-deterministic
(which goals are put to sleep will vary from one session to another
session.)
When those goals are eventually woken up from ‘Worker::waitForInput’,
they’re reprocessed, in sorted order, but potentially with “holes”
compared to other ‘guix-daemon’ processes.
That’s only a partial explanation; we need to go further to come up with
an actual deadlock scenario.
Ludo’.
This bug report was last modified 135 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.