| Ticket UUID: | 1565466 | ||
| Title: | occasional thread-4.4 failure | ||
| Type: | Bug | Created on: | 2006-09-26 02:59:33 |
| Submitter: | dgp | Assigned to: | mistachkin |
| Subsystem: | 49. Threading | Severity: | |
| Priority: | 5 Medium | Last modified: | 2009-10-18 18:22:57 |
| Status: | Closed | Closed by: | mistachkin |
| Resolution: | Fixed | Closed on: | 2009-10-18 11:22:57 |
| Version: | obsolete: 8.6b1.1 | ||
| Description: | ||||
When testing on Mac OS X
(which builds --enable-threads
by default), I sometimes see
this failure:
==== thread-4.4 TclThreadSend preserve code FAILED
==== Contents of test case:
threadReap
set len [llength [testthread names]]
set serverthread [testthread create]
set x [catch {testthread send $serverthread {set
errorInfo {}; break}} msg]
threadReap
list $len $x $msg $errorInfo
---- Result was:
1 3 {} {invalid thread id
while executing
"testthread send -async $tid {testthread exit}"}
---- Result should have been (exact matching):
1 3 {} {}
==== thread-4.4 FAILED
I have a vague sense that when this
test fails, I've had the machine
busy with several processes.
| ||||
| User Comments: | ||||
mistachkin added on 2006-10-16 07:01:43:
Logged In: YES
user_id=113501
I don't know if this is any help, but I'm seeing occasional
failures in thread-4.5 (Windows):
==== thread-4.5 TclThreadSend preserve errorCode FAILED
==== Contents of test case:
threadReap
set ::tcltest::mainThread [testthread names]
set serverthread [testthread create]
set x [catch {testthread send $serverthread {error ERR
INFO CODE}} msg]
threadReap
list $x $msg $errorCode
---- Result was:
1 ERR NONE
---- Result should have been (exact matching):
1 ERR CODE
vasiljevic added on 2007-06-30 21:53:07:
Logged In: YES user_id=95086 Originator: NO This part has been rewritten. I will close that ticket now. Please submit new one if the problem still persists with the newest code from CVS. dgp added on 2007-09-25 09:47:08:
Logged In: YES user_id=80530 Originator: YES I still see this problem with the 8.5b1 release. mistachkin added on 2009-10-18 09:38:28:
seeing this on HEAD, looking into it. mistachkin added on 2009-10-18 10:54:28:
I'm also seeing thread-4.3 and thread-4.5 occasionally fail on HEAD as well. I believe these failures may be caused by a subtle race condition. mistachkin added on 2009-10-18 12:32:43:
These test failures are caused by the threadReap proc in tcltest.tcl. It attempts to asynchronously send an exit "signal" to all the non-main threads. If any of the threads exit while this is being done, the error information for the current thread will be overwritten with "invalid thread id", etc. The tests themselves need to preserve whatever error information they are testing against (e.g. $::errorCode, $::errorInfo, etc) prior to their final call to threadReap. mistachkin added on 2009-10-18 18:22:57:
allow_comments - 1 Fixed in HEAD and backported to the 8.4 and 8.5 branches. | ||||
