Artifacts Associated With Ticket 2511408fffffffffffffffffffffffffffffffff
Ticket change [9e5c67e23c] (rid 96458) by dgp on 2009-01-15 21:20:32:
- assignee initialized to: "vasiljevic"
- cmimetype initialized to: "text/plain"
- comment initialized to:
Four tests raising errors in the HEAD of the Thread package: ==== thread-19.10 thread::mutex - destroy locked exclusive mutex FAILED ==== Contents of test case: set emutex [thread::mutex create] thread::mutex lock $emutex set x [catch {thread::mutex destroy $emutex} msg] thread::mutex unlock $emutex thread::mutex destroy $emutex list $x $msg ---- Test generated error; Return code was: 1 ---- Return code should have been one of: 0 2 ---- errorInfo: no such mutex "mid6" while executing "thread::mutex unlock $emutex" ("uplevel" body line 5) invoked from within "uplevel 1 $script" ---- errorCode: NONE ==== thread-19.10 FAILED ==== thread-19.11 thread::mutex - destroy locked recursive mutex FAILED ==== Contents of test case: set rmutex [thread::mutex create -recursive] thread::mutex lock $rmutex set x [catch {thread::mutex destroy $rmutex} msg] thread::mutex unlock $rmutex thread::mutex destroy $rmutex list $x $msg ---- Test generated error; Return code was: 1 ---- Return code should have been one of: 0 2 ---- errorInfo: no such mutex "rid7" while executing "thread::mutex unlock $rmutex" ("uplevel" body line 5) invoked from within "uplevel 1 $script" ---- errorCode: NONE ==== thread-19.11 FAILED ==== thread-20.6 thread::mutex - destroy readlocked mutex FAILED ==== Contents of test case: set rwmutex [thread::rwmutex create] thread::rwmutex rlock $rwmutex set x [catch {thread::rwmutex destroy $rwmutex} msg] thread::rwmutex unlock $rwmutex thread::rwmutex destroy $rwmutex list $x $msg ---- Test generated error; Return code was: 1 ---- Return code should have been one of: 0 2 ---- errorInfo: no such mutex "wid10" while executing "thread::rwmutex unlock $rwmutex" ("uplevel" body line 5) invoked from within "uplevel 1 $script" ---- errorCode: NONE ==== thread-20.6 FAILED ==== thread-20.7 thread::mutex - destroy writelocked mutex FAILED ==== Contents of test case: set rwmutex [thread::rwmutex create] thread::rwmutex wlock $rwmutex set x [catch {thread::rwmutex destroy $rwmutex} msg] thread::rwmutex unlock $rwmutex thread::rwmutex destroy $rwmutex list $x $msg ---- Test generated error; Return code was: 1 ---- Return code should have been one of: 0 2 ---- errorInfo: no such mutex "wid11" while executing "thread::rwmutex unlock $rwmutex" ("uplevel" body line 5) invoked from within "uplevel 1 $script" ---- errorCode: NONE ==== thread-20.7 FAILED - foundin initialized to: "None"
- is_private initialized to: "0"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "dgp"
- subsystem initialized to: "80. Thread Package"
- title initialized to: "mutex test errors"
- type initialized to: "Bug"
Ticket change [4e49e8d398] (rid 127200) by dgp on 2009-03-13 21:24:09:
- icomment:
Any chance someone can look into these? I'd like to consider Thread for bundling with Tcl 8.6, but failures like this make me think it's not ready.
- login: "dgp"
- mimetype: "text/plain"
- priority changed to: "9 Immediate"
- username: "dgp"
- icomment:
Ticket change [bdcd062054] (rid 101967) by vasiljevic on 2009-03-13 21:41:16:
- icomment:
Sorry for delay. I will look into that over the weekend. Was extremely busy last several months... Cheers Zoran
- login: "vasiljevic"
- mimetype: "text/plain"
- username: "vasiljevic"
- icomment:
Ticket change [dd92af929c] (rid 114692) by ferrieux on 2009-05-01 00:33:58:
- icomment:
Sorry, I don't understand: in all 4 cases the destroy seems to work, and the subsequent unlock attempt fails because the lock no longer exists. What am I missing ?
- login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"
- icomment:
Ticket change [03669e03f4] (rid 119820) by ferrieux on 2009-05-01 04:46:45:
- icomment:
More precisely, if the intent of the test is to verify that a held lock cannot be destroyed, then the style is obscure. Just adding an "if {$x} {...}" around the two cleanup lines would restore a clearer failure report. - login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"
- icomment:
Ticket change [88bc904c72] (rid 131911) by ferrieux on 2009-05-03 01:53:39:
- icomment:
Looking at the code of RemoveMutex, it is obvious that RemoveAnyItem is called *before* SpMutexFinalize, which is responsible for checking locked status. Hence the behavior: the Tcl-related data structures (hash entry for the lock) are removed despite the abortion of the destroy operation. Now why are things done in this bizarre order ?
- login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"
- icomment:
Ticket change [beee6d084f] (rid 102173) by vasiljevic on 2009-05-03 02:03:05:
- icomment:
I don't know any more. Its been a long time I looked at that code. I will look into it... Lately I am just swamped with the "regular" work so I simply cannot get any spare time for other activities... Cheers Zoran
- login: "vasiljevic"
- mimetype: "text/plain"
- username: "vasiljevic"
- icomment:
Ticket change [cacbc4885c] (rid 95424) by ferrieux on 2009-05-04 06:12:14:
- icomment:
OK I reordered things a bit in RemoveMutex (and similarly for cond vars). Test suite OK now (with other hanging test fix). I didn't touch the test themselves, because the style was not the culprit, as it turns out. The half-destruction was the root cause of the unclear result...
- login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"
- icomment:
Add attachment "thr1.patch" [6417162c61] (rid 92695) by ferrieux on 2009-05-04 06:12:51.
Ticket change [049c9cf820] (rid 120030) by ferrieux on 2009-05-04 06:12:51:
- icomment:
File Added - 325597: thr1.patch
- login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"
- icomment:
Ticket change [f87f5a5520] (rid 91545) by ferrieux on 2009-05-04 06:22:53:
- resolution changed to: "Fixed"
Ticket change [6762cf0f1f] (rid 102892) by ferrieux on 2009-05-04 07:18:08:
- closedate changed to: "2009-05-04T00:18:08"
- closer changed to: "ferrieux"
- icomment:
Committed after review by mistachkin.
- login: "ferrieux"
- mimetype: "text/plain"
- status changed to: "Closed"
- username: "ferrieux"