classification
Title: test_thread occasionally reports unhandled exceptions on OS X
Type: Stage:
Components: Tests Versions: Python 3.1, Python 2.6
process
Status: closed Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: ned.deily, pitrou
Priority: normal Keywords:

Created on 2009-06-03 08:03 by ned.deily, last changed 2010-08-11 15:20 by ned.deily. This issue is now closed.

Messages (5)
msg88799 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2009-06-03 08:03
I've recently started seeing occasional regression test error messages 
on OS X from test_thread.  The test reports running OK but tracebacks 
are displayed.  It's not reproducible at will but has shown up on both 
10.5 Intel and 10.5 PPC machines with various recent top of py3k builds.  
Here are two examples:

nad@pbg4:/Library/Frameworks/Python.framework/Versions/3.1$ 
./bin/python3.1 -S ./lib/python3.1/test/regrtest.py -w test_thread
test_thread
Unhandled exception in thread started by <bound method 
ThreadRunningTests.task of <test.test_thread.ThreadRunningTests 
testMethod=test_stack_size>>
Traceback (most recent call last):
  File 
"/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/test/te
st_thread.py", line 49, in task
    self.done_mutex.release()
_thread.error: release unlocked lock
Unhandled exception in thread started by <bound method 
ThreadRunningTests.task of <test.test_thread.ThreadRunningTests 
testMethod=test_stack_size>>
Traceback (most recent call last):
  File 
"/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/test/te
st_thread.py", line 49, in task
    self.done_mutex.release()
_thread.error: release unlocked lock
Unhandled exception in thread started by <bound method 
ThreadRunningTests.task of <test.test_thread.ThreadRunningTests 
testMethod=test_stack_size>>
Traceback (most recent call last):
  File 
"/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/test/te
st_thread.py", line 49, in task
    self.done_mutex.release()
_thread.error: release unlocked lock
Unhandled exception in thread started by <bound method 
ThreadRunningTests.task of <test.test_thread.ThreadRunningTests 
testMethod=test_stack_size>>
Traceback (most recent call last):
  File 
"/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/test/te
st_thread.py", line 49, in task
    self.done_mutex.release()
_thread.error: release unlocked lock
Unhandled exception in thread started by <bound method 
ThreadRunningTests.task of <test.test_thread.ThreadRunningTests 
testMethod=test_starting_threads>>
Traceback (most recent call last):
  File 
"/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/test/te
st_thread.py", line 49, in task
    self.done_mutex.release()
_thread.error: release unlocked lock
1 test OK.

and

nad@fimt:/Library/Frameworks/Python.framework/Versions/3.1$ 
./bin/python3.1 -S ./lib/python3.1/test/regrtest.py -w test_thread
test_thread
Unhandled exception in thread started by <bound method 
ThreadRunningTests.task of <test.test_thread.ThreadRunningTests 
testMethod=test_stack_size>>
Traceback (most recent call last):
  File 
"/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/test/te
st_thread.py", line 49, in task
    self.done_mutex.release()
_thread.error: release unlocked lock
Unhandled exception in thread started by <bound method 
ThreadRunningTests.task of <test.test_thread.ThreadRunningTests 
testMethod=test_starting_threads>>
Traceback (most recent call last):
  File 
"/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/test/te
st_thread.py", line 49, in task
    self.done_mutex.release()
_thread.error: release unlocked lock
1 test OK.


Are the tracebacks from a harmless race condition and, if so, can the 
test be modified to eliminate them?  Or is there some new real problem?
msg93343 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2009-09-30 02:45
Also seen on Python 2.6.3rc1.
msg93359 - (view) Author: Skip Montanaro (skip.montanaro) * (Python triager) Date: 2009-09-30 12:20
and on svn trunk
msg94618 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2009-10-28 09:23
Ned points out that it may be a duplicate of #7194, which has been fixed.
Can you test with the current trunk or 2.6 branch?
msg113601 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2010-08-11 15:20
I've seen no further instances of this problem since the fixes for Issue7194 have been checked in.  Let's call it fixed.
History
Date User Action Args
2010-08-11 15:20:37ned.deilysetstatus: open -> closed

messages: + msg113601
2010-05-20 20:32:35skip.montanarosetnosy: - skip.montanaro
2009-10-28 09:23:02pitrousetnosy: + pitrou
messages: + msg94618
2009-09-30 12:20:48skip.montanarosetnosy: + skip.montanaro
messages: + msg93359
2009-09-30 02:45:24ned.deilysetmessages: + msg93343
versions: + Python 2.6
2009-06-03 08:03:03ned.deilycreate