[Buildbot] #3176: Surprising deadlock behaviour

Buildbot trac trac at buildbot.net
Thu Jan 29 21:27:30 UTC 2015


#3176: Surprising deadlock behaviour
----------------------+-----------------------
Reporter:  vlovich    |      Owner:
    Type:  undecided  |     Status:  new
Priority:  major      |  Milestone:  undecided
 Version:  0.8.10     |   Keywords:
----------------------+-----------------------
 I think I have an occasional deadlock in my code due to the way buildbot
 acquires the locks.

 Here's the structure:

 scheduler 1: acquire shared lock. trigger scheduler 2 & wait
 scheduler 2: acquire shared lock.
 scheduler 3: acquire exclusive lock

 The ordering, I believe, is:

 scheduler 1 starts, acquired shared lock
 scheduler 3 starts, starts waiting on exclusive lock
 scheduler 2 is triggered, waits on lock to avoid starving exclusive lock.

 I think this is a variant of the Dining philosophers problem.  It would be
 nice if scheduler 2 realized it could acquire the shared lock since
 otherwise it's a deadlock.  I think the fix is that if the shared lock is
 already being held on things waiting for this build, then acquire the
 shared lock even if there's an exclusive lock.

--
Ticket URL: <http://trac.buildbot.net/ticket/3176>
Buildbot <http://buildbot.net/>
Buildbot: build/test automation


More information about the bugs mailing list