[issue26360] Deadlock in thread.join on Python 2.7/macOS

2020-04-26 Thread Zachary Ware
Zachary Ware added the comment: As 2.7 is now EOL, I'm closing the issue. -- nosy: +zach.ware resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker ___

[issue26360] Deadlock in thread.join on Python 2.7/macOS

2019-09-15 Thread Kirill Smelkov
Kirill Smelkov added the comment: > > Maybe issue38106 related. > > That looks plausible, but unfortunately I'm still able to reproduce the hang > with your PR (commit 9b135c02aa1edab4c99c915c43cd62d988f1f9c1, macOS 10.14.6). Thanks for feedback. Then hereby bug is probably deadlock of anothe

[issue26360] Deadlock in thread.join on Python 2.7/macOS

2019-09-14 Thread Kyle Stanley
Kyle Stanley added the comment: > FWIW, I've confirmed again that the exact same script on the same machine > seems fine under Python 3.x. Given the imminent demise of Python 2, perhaps > this issue is just destined to be an unsolved historical oddity. Since it doesn't seem to be occurring a

[issue26360] Deadlock in thread.join on Python 2.7/macOS

2019-09-14 Thread Mark Dickinson
Mark Dickinson added the comment: FWIW, I've confirmed again that the exact same script on the same machine seems fine under Python 3.x. Given the imminent demise of Python 2, perhaps this issue is just destined to be an unsolved historical oddity. -- ___

[issue26360] Deadlock in thread.join on Python 2.7/macOS

2019-09-14 Thread Mark Dickinson
Change by Mark Dickinson : -- title: Deadlock in thread.join on Python 2.7/Mac OS X 10.9, 10.10 -> Deadlock in thread.join on Python 2.7/macOS ___ Python tracker ___ _

[issue26360] Deadlock in thread.join on Python 2.7/Mac OS X 10.9, 10.10

2019-09-14 Thread Mark Dickinson
Mark Dickinson added the comment: > Maybe issue38106 related. That looks plausible, but unfortunately I'm still able to reproduce the hang with your PR (commit 9b135c02aa1edab4c99c915c43cd62d988f1f9c1, macOS 10.14.6). -- ___ Python tracker

[issue26360] Deadlock in thread.join on Python 2.7/Mac OS X 10.9, 10.10

2019-09-11 Thread Kirill Smelkov
Kirill Smelkov added the comment: Maybe issue38106 related. -- nosy: +navytux ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue26360] Deadlock in thread.join on Python 2.7/Mac OS X 10.9, 10.10

2016-02-23 Thread Mark Dickinson
Changes by Mark Dickinson : -- title: Deadlock in thread.join on Python 2.7/Mac OS X 10.9 -> Deadlock in thread.join on Python 2.7/Mac OS X 10.9, 10.10 ___ Python tracker ___ __

[issue26360] Deadlock in thread.join on Python 2.7/Mac OS X 10.9

2016-02-23 Thread Mark Dickinson
Mark Dickinson added the comment: I've found OS X 10.10 and OS X 10.11 machines to test on. I'm able to reproduce on 10.10, but not on 10.11. This adds to the plausibility of the "Apple bug" explanation. -- ___ Python tracker

[issue26360] Deadlock in thread.join on Python 2.7/Mac OS X 10.9

2016-02-18 Thread Mark Dickinson
Mark Dickinson added the comment: A minor update: I did manage to verify that the GIL is indeed not held by any threads at the moment of the hang, so it does look very much as though a `pthread_cond_signal` signal has gone astray somehow. -- ___ Pyt

[issue26360] Deadlock in thread.join on Python 2.7/Mac OS X 10.9

2016-02-18 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks, Ned. I tried with: ./configure --with-pydebug MACOSX_DEPLOYMENT_TARGET=10.9 && make I'm still able to reproduce. I plan to find some time this weekend to dig into the source and see if I can narrow down the cause (or at least make the hang easier /

[issue26360] Deadlock in thread.join on Python 2.7/Mac OS X 10.9

2016-02-17 Thread Ned Deily
Ned Deily added the comment: I'm not able to test it myself at the moment but you could also try ensuring your 2.7 build is with the most up-to-date ABI for your system: ./configure MACOSX_DEPLOYMENT_TARGET=10.9 2.7 builds do not set this automatically; 3.x builds do. -- nosy: +ned.de

[issue26360] Deadlock in thread.join on Python 2.7/Mac OS X 10.9

2016-02-17 Thread STINNER Victor
STINNER Victor added the comment: > Thanks for testing! It wouldn't entirely surprise me if this turned out to be > an Apple bug somewhere. I'm ran threading_hang.py on Mac OS X 10.10 Yosemite (darwin 14.5) on Python 2.7 compiled in release mode. After 28 iterations (~4 hours, 9 minutes per i

[issue26360] Deadlock in thread.join on Python 2.7/Mac OS X 10.9

2016-02-17 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks for testing! It wouldn't entirely surprise me if this turned out to be an Apple bug somewhere. -- ___ Python tracker ___ ___

[issue26360] Deadlock in thread.join on Python 2.7/Mac OS X 10.9

2016-02-17 Thread STINNER Victor
Changes by STINNER Victor : -- title: Deadlock in thread.join -> Deadlock in thread.join on Python 2.7/Mac OS X 10.9 ___ Python tracker ___ _

[issue26360] Deadlock in thread.join

2016-02-17 Thread STINNER Victor
STINNER Victor added the comment: "Each iteration takes around 60 seconds, and I typically get a deadlock within the first 5 iterations." I ran a modified version of threading_hang.py (I added some debug print) a whole night: it's still running after 118 iterations. Each iteration takes ~5 mi

[issue26360] Deadlock in thread.join

2016-02-16 Thread Mark Dickinson
Mark Dickinson added the comment: > I'm not sure that "Waiting for the GIL" line is reliable Right; I was interpreting that line more as "I don't have the GIL at the moment", which I think applies to all threads, including the main thread. It's pretty clear that threads 2-5 really are waiting

[issue26360] Deadlock in thread.join

2016-02-16 Thread STINNER Victor
STINNER Victor added the comment: >> lock=0x0 looks suspicious. > Agreed. I think that *could* possibly be a consequence of the earlier > multiple GILs, though I haven't figured out exactly how yet. Don't trust gdb output when Python is compiled in release mode (with -O3). gdb output is only

[issue26360] Deadlock in thread.join

2016-02-16 Thread STINNER Victor
STINNER Victor added the comment: > I've also not yet managed to reproduce on Python 3, but I haven't tried that > hard. I suspect it's a Python 2-only problem, though. Python 3.2 got a new GIL and many bugs related to the GIL were fixed in Python 3 too. The "workaround" is to use Python 3, u

[issue26360] Deadlock in thread.join

2016-02-16 Thread STINNER Victor
STINNER Victor added the comment: debug-build-stacktrace.txt: * Thread 1 is waiting on threading_hang.py:21: thread.join() * Thread 2-6 (5 threads) are waiting for the GIL The thread 1 is not supposed to hold the GIL: thread.join() is implemented by lock_PyThread_acquire_lock() at Modules/threa

[issue26360] Deadlock in thread.join

2016-02-16 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue26360] Deadlock in thread.join

2016-02-14 Thread Mark Dickinson
Mark Dickinson added the comment: Update: I *have* been able to reproduce in a debug build. Here's the stack trace. -- Added file: http://bugs.python.org/file41924/debug-build-stacktrace.txt ___ Python tracker ___

[issue26360] Deadlock in thread.join

2016-02-14 Thread Mark Dickinson
Mark Dickinson added the comment: > lock=0x0 looks suspicious. Agreed. I think that *could* possibly be a consequence of the earlier multiple GILs, though I haven't figured out exactly how yet. -- ___ Python tracker

[issue26360] Deadlock in thread.join

2016-02-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: lock=0x0 looks suspicious. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe

[issue26360] Deadlock in thread.join

2016-02-14 Thread Mark Dickinson
Mark Dickinson added the comment: > threads 2 and 5 Sorry, that should have said "threads 2 and 4". -- ___ Python tracker ___ ___ Pyt

[issue26360] Deadlock in thread.join

2016-02-14 Thread Mark Dickinson
Mark Dickinson added the comment: One thing that looks a bit odd to my eyes is the different values for `lock` in the PyThread_acquire_lock calls (see below). All of threads 2-5 should be waiting on the GIL, so I'd expect to see the same value for `lock` in all those calls. Instead, threads 2

[issue26360] Deadlock in thread.join

2016-02-14 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +pitrou, serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue26360] Deadlock in thread.join

2016-02-14 Thread Mark Dickinson
Mark Dickinson added the comment: Build details: this was a version of Python built with a simple `./configure && make` from commit 32893d8a52a9. taniyama:cpython mdickinson$ ./python.exe Python 2.7.10+ (2.7:32893d8a52a9, Feb 14 2016, 11:08:14) [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0

[issue26360] Deadlock in thread.join

2016-02-14 Thread Mark Dickinson
Mark Dickinson added the comment: Here's the hanging code as an attached file. -- Added file: http://bugs.python.org/file41921/threading_hang.py ___ Python tracker ___ __

[issue26360] Deadlock in thread.join

2016-02-14 Thread Mark Dickinson
New submission from Mark Dickinson: On OS X (10.9.5), I'm getting an apparent deadlock in the following simple Python script: # import itertools import threading def is_prime(n): return n >= 2 and all(n % d for d in xrange(2, n)) def