This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pitrou
Recipients brett.cannon, christian.heimes, eric.snow, georg.brandl, ncoghlan, pitrou, skrah, vstinner
Date 2012-08-28.00:05:19
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1346112320.56.0.403160993805.issue15794@psf.upfronthosting.co.za>
In-reply-to
Content
After a bit of investigation, it turns out the test is probably too strict.
The deadlock avoidance logic in importlib._bootstrap is indeed conservative: if you take a look at _ModuleLock.acquire(), _blocking_on[tid] is set even while other threads may run, because the internal lock is not always taken. Therefore, if there's a potential deadlock between several threads, there are situations where DeadlockError will be raised in two threads, not only one.

(IMHO it would complicate the code too much to make deadlock avoidance less conservative, without bringing anything in terms of additional functionality)

See attached patch.
History
Date User Action Args
2012-08-28 00:05:20pitrousetrecipients: + pitrou, brett.cannon, georg.brandl, ncoghlan, vstinner, christian.heimes, skrah, eric.snow
2012-08-28 00:05:20pitrousetmessageid: <1346112320.56.0.403160993805.issue15794@psf.upfronthosting.co.za>
2012-08-28 00:05:20pitroulinkissue15794 messages
2012-08-28 00:05:19pitroucreate