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 gwalker
Recipients aonishuk, gps, gregory.p.smith, gwalker, ppperry, r.david.murray
Date 2018-05-03.03:59:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1525319956.03.0.682650639539.issue27448@psf.upfronthosting.co.za>
In-reply-to
Content
Correct me if I'm wrong, the change released in Python 2.7.15 doesn't actually fix this race condition.

The race is:
* T1: gc_was_enabled = gc.isenabled() # True 
* T1: gc.disable()
* T2: gc_was_enabled = gc.isenabled() # False
* T1: gc.enable()
* T2: gc.disable()

To fix the race condition _disabling_gc_lock must also be held for gc.enable() in both call locations so it cannot happen between gc.isenabled() and gc.disable().

TBH, I'm not really expecting this to be fixed, this is more a note for any future travelers who come across this issue.
History
Date User Action Args
2018-05-03 03:59:16gwalkersetrecipients: + gwalker, gregory.p.smith, gps, r.david.murray, ppperry, aonishuk
2018-05-03 03:59:16gwalkersetmessageid: <1525319956.03.0.682650639539.issue27448@psf.upfronthosting.co.za>
2018-05-03 03:59:15gwalkerlinkissue27448 messages
2018-05-03 03:59:15gwalkercreate