STINNER Victor <victor.stin...@haypocalc.com> added the comment:

Hum, it's better with the process identifiers. Oh, by the way: the output is 
not truncated, Python test hangs during the second run :-) Without the debug 
output, it needs more than 1,000 runs to reproduce the 
 bug (hang).

Testing with flags: sys.flags(debug=0, inspect=0, interactive=0, optimize=0, 
dont_write_bytecode=0, no_user_site=0, no_site=0, ignore_environment=0, 
verbose=0, bytes_warning=0, quiet=0)
[  1] test_threading
test_3_join_in_forked_from_thread (test.test_threading.ThreadJoinOnShutdown) 
... pid 25114: <OS thread 140143566120704>: <Condition(<_thread.lock object at 
0x7f75b0c54e50>, 0)>.notify(): no waiters
pid 25114: MainThread: <Thread(Thread-1, initial)>.start(): starting thread
pid 25114: <OS thread 140143451137792>: <Condition(<_thread.lock object at 
0x7f75b0c54b80>, 1)>.notify(): notifying 1 waiter
pid 25114: Thread-1: <Thread(Thread-1, started 140143451137792)>._bootstrap(): 
thread started
pid 25114: MainThread: <Condition(<_thread.lock object at 0x7f75b0c54b80>, 
0)>.wait(): got it
pid 25114: MainThread: <Condition(<_thread.lock object at 0x7f75b0c54cc0>, 
0)>.notify(): no waiters
pid 25114: MainThread: <_MainThread(MainThread, stopped 140143566120704)>: 
waiting for other threads
pid 25114: MainThread: <Thread(Thread-1, started 140143451137792)>.join(): 
waiting until thread stops
end of main
pid 25116: Thread-1: <Thread(Thread-2, initial)>.start(): starting thread
pid 25116: <OS thread 140143373580032>: <Condition(<_thread.lock object at 
0x7f75b0c54b30>, 1)>.notify(): notifying 1 waiter
pid 25116: Thread-2: <Thread(Thread-2, started 140143373580032)>._bootstrap(): 
thread started
pid 25116: Thread-2: <_MainThread(MainThread, stopped 140143566120704)>.join(): 
thread stopped
end of thread
pid 25116: Thread-2: <Thread(Thread-2, started 140143373580032)>._bootstrap(): 
normal return
pid 25116: Thread-1: <Condition(<_thread.lock object at 0x7f75b0c54b30>, 
0)>.wait(): got it
pid 25116: Thread-2: <Condition(<_thread.lock object at 0x7f75b0c54b80>, 
0)>.notify(): no waiters
pid 25116: Thread-1: <Thread(Thread-2, stopped 140143373580032)>.join(): thread 
stopped
pid 25116: Thread-1: <Thread(Thread-1, started 140143451137792)>._bootstrap(): 
normal return
pid 25116: Thread-1: <_RLock owner='Thread-1' count=1>.acquire(True): initial 
success
pid 25116: Thread-1: <Condition(<_RLock owner='Thread-1' count=1>, 
0)>.notify(): no waiters
pid 25116: Thread-1: <_RLock owner=None count=0>.release(): final release
pid 25114: Thread-1: <Thread(Thread-1, started 140143451137792)>._bootstrap(): 
raised SystemExit
pid 25114: Thread-1: <Condition(<_thread.lock object at 0x7f75b0c54bd0>, 
1)>.notify(): notifying 1 waiter
pid 25114: MainThread: <Condition(<_thread.lock object at 0x7f75b0c54bd0>, 
0)>.wait(): got it
pid 25114: MainThread: <Thread(Thread-1, stopped 140143451137792)>.join(): 
thread stopped
pid 25114: MainThread: <_MainThread(MainThread, stopped 140143566120704)>: 
exiting
[47125 refs]
ok

----------------------------------------------------------------------
Ran 1 test in 0.091s

OK
[  2] test_threading
test_3_join_in_forked_from_thread (test.test_threading.ThreadJoinOnShutdown) 
... pid 25118: <OS thread 139664631559936>: <Condition(<_thread.lock object at 
0x7f062e0bde50>, 0)>.notify(): no waiters
pid 25118: MainThread: <Thread(Thread-1, initial)>.start(): starting thread
pid 25118: <OS thread 139664516577024>: <Condition(<_thread.lock object at 
0x7f062e0bdb80>, 1)>.notify(): notifying 1 waiter
pid 25118: Thread-1: <Thread(Thread-1, started 139664516577024)>._bootstrap(): 
thread started
pid 25118: MainThread: <Condition(<_thread.lock object at 0x7f062e0bdb80>, 
0)>.wait(): got it
pid 25118: MainThread: <Condition(<_thread.lock object at 0x7f062e0bdcc0>, 
0)>.notify(): no waiters
pid 25118: MainThread: <_MainThread(MainThread, stopped 139664631559936)>: 
waiting for other threads
pid 25118: MainThread: <Thread(Thread-1, started 139664516577024)>.join(): 
waiting until thread stops
end of main

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue11870>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to