Closed GoogleCodeExporter closed 9 years ago
Ugly workaround - monkeypatch threading._active_limbo_lock:
import threading
threading._active_limbo_lock = threading.RLock()
With this I can run deadlock_test.py 1000 times without deadlock.
Original comment by nir...@gmail.com
on 13 Aug 2014 at 8:34
Details:
1. thread starts and try to lock _active_limbo_lock
2. yappi get a profile callback for _active_limbo_lock.acquire
3. yappi call threading.currentThread
4. threading.currentThread creates a _DummyThread
5. _DummyThread.__init__ try to lock _active_limbo_lock
So even if we do get the class name, it is wrong, since the real class
did not register itself into _active dictionary.
Original comment by nir...@gmail.com
on 13 Aug 2014 at 8:41
Excellent investigation. Need some time tosee if we can workaround this i agree
that trying to get the thread class name is hecky and open to races. Let me see
what we can doo. Again: great issue report.
Original comment by sum...@gmail.com
on 13 Aug 2014 at 11:12
Fixed this with the help of nirsof. Fix available in commit 009a272.
Original comment by sum...@gmail.com
on 2 Sep 2014 at 9:19
Original issue reported on code.google.com by
nir...@gmail.com
on 13 Aug 2014 at 8:02Attachments: