Thread hangs on specific exit sequence
Closed / Fixed3129844fffffffffffffffffffffffffffffffffCreated 16 years agoUpdated 16 years ago
Descriptionplain2010-12-06 12:09:08
Running the following commands crashes tcl 8.5.9 in openSuse linux, windows XP/W7 doesn't crash. TCL compiled with MinGW/MinSYS. > package re Thread 2.6.7 > thread::names tid0xb71de8d0 > thread::release [thread::id] > thread::names > update > exit
tombert Ticket [3129844fff]: 1 change
[History diff]2010-12-06 19:10:38
dgp Ticket [3129844fff]: 2 changes
[History diff]2010-12-06 21:57:44
andreas_kupriesplain2010-12-07 06:37:52
With Thread 2.6.5 and Tcl 8.5.7 the tclsh simply hangs on exist instead of seg.faulting. (I assume crash meant seg.fault and core dump). I can also make the script shorter, using only package require Thread thread::release [thread::id] thread::names exit There is likely something wrong in the thread reference counter management, with us trying to release a thread which was never preserved. Plus the fact that we are releasing the 'main' thread of the system. My guess is that this is also a factor, the main thread is special, being the whole system. Re-assigning to Zoran, our thread maintainer.
tombertplain2010-12-07 14:15:23
... no segfault ... I renamed the Summary title ...
tombert Ticket [3129844fff]: 1 change
[History diff]2010-12-07 14:15:24
ferrieuxplain2010-12-08 02:39:56
Also hangs in [exit] with 8.6 HEAD and bundled Thread 2.6.6.
ferrieuxplain2010-12-09 05:30:01
Ok got it: missing Tcl_MutexUnlock(&threadMutex) at line 1954 of threadCmd.c in the "early return" case of function ThreadList(). Please commit the fix, I am beyond CVS reach for now ;-)
ferrieux Ticket [3129844fff]: 1 change
[History diff]2010-12-09 05:31:18
andreas_kupriesplain2010-12-09 05:39:06
allow_comments - 1 Fix committed to head.
vasiljevicplain2010-12-09 05:40:39
Fixed.
andreas_kupriesplain2010-12-09 05:42:31
That was me and Zoran working at the same thing at the same time. And while Zoran's change went in, it was identical to mine, so no harm done by this x-ing.
vasiljevicplain2010-12-09 05:43:14
:-D
ferrieuxplain2010-12-09 05:57:41
allow_comments - 0 Oh, so the three of us were working on it at the same minute.... Nice coincidence!!!
Log in (anonymous is fine) to add a comment.