Artifacts Associated With Ticket 1473261
Ticket change [82bac9ede4] (rid 117274) by nobody on 2006-04-19 21:44:31:
- assignee initialized to: "vasiljevic"
- cmimetype initialized to: "text/plain"
- comment initialized to:
The following code occassionally crashes on Linux/x86 and 8.4.13 + thread 2.6.3: package require Thread; set t [thread::create]; thread ::release $t; exit The following error occurs: Tcl_Release couldn't find reference for 0x80e0450 Unfortunately GDB stack trace (attached) does not show much information. It happens once each about 20 runs on my machine, it may vary though.
- foundin initialized to: "None"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nobody"
- subsystem initialized to: "80. Thread Package"
- title initialized to: "Thread"
- type initialized to: "Bug"
Ticket change [c20cf4be72] (rid 111433) by zoro2 on 2006-04-20 05:18:36:
- icomment:
Logged In: YES user_id=191529 Did some more testing. This seems to only crash if thread:: release is also called. Tested to work on Linux/x86 and Tcl8.4.13+Thread2.6.3 and Tcl8.4.5+Thread2.5. Also, adding -wait to thread::release does not help. But, calling: package require Thread; set t [thread::create]; thread:: release $t; after 25; exit Did not throw any exception. So it seems that the thread itself needs some time to clean up.
- login: "zoro2"
- mimetype: "text/plain"
- username: "zoro2"
- icomment:
Ticket change [27f0fb3789] (rid 88611) by zoro2 on 2006-04-20 05:23:17:
- icomment:
Logged In: YES user_id=191529 Did some more research on Solaris. It seems to also exit with an error there, but doing some wait also helps.
- login: "zoro2"
- mimetype: "text/plain"
- username: "zoro2"
- icomment:
Ticket change [a07489c854] (rid 96816) by dgp on 2006-04-20 12:02:38:
- foundin changed to: "obsolete: 8.4.13"
- icomment:
Logged In: YES user_id=80530 Huh? The same combination both works and fails? Care to start over?
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
Ticket change [66fa835ea0] (rid 102821) by zoro2 on 2006-04-20 23:53:02:
- icomment:
Logged In: YES user_id=191529 Sorry, forgot to attach the gdb dump: Starting program: /home/users/tcldev/8413/bin/tclsh8.4 /tmp/ x.tcl [Thread debugging using libthread_db enabled] [New Thread 16384 (LWP 631)] [New Thread 32769 (LWP 632)] [New Thread 16386 (LWP 633)] [New Thread 32771 (LWP 634)] Tcl_Release couldn't find reference for 0x80e0450 Program received signal SIGABRT, Aborted. [Switching to Thread 32771 (LWP 634)] 0x401ad7c1 in kill () from /lib/libc.so.6 (gdb) bt #0 0x401ad7c1 in kill () from /lib/libc.so.6 #1 0x40119771 in pthread_kill () from /lib/libpthread.so.0 #2 0x40119a7b in raise () from /lib/libpthread.so.0 #3 0x401ad554 in raise () from /lib/libc.so.6 #4 0x401aea88 in abort () from /lib/libc.so.6 #5 0x400a104a in Tcl_PanicVA (format=0x400d6640 "Tcl_Release couldn't find reference for 0x%x", argList=0xbf5ffa78 "(D\020@0Ă\f\b\222Ł+@P\004\016\b\230Î\016\b\f") at /home/ users/tcldev/dqkit/src/tcl-8.4.13/generic/tclPanic.c:106 #6 0x400a1080 in Tcl_Panic (arg1=0x400d6640 "Tcl_Release couldn't find reference for 0x%x") at /home/users/tcldev/dqkit/src/tcl-8.4.13/generic/ tclPanic.c:134 #7 0x400a99cb in Tcl_Release (clientData=0x80e0450) at / home/users/tcldev/dqkit/src/tcl-8.4.13/generic/tclPreserve. c:245 #8 0x402ba392 in NewThread () from /home/users/tcldev/8413/ lib/thread2.6.3/libthread2.6.3.so #9 0x080ece98 in ?? () #10 0x0000000c in ?? () #11 0x00020000 in ?? () #12 0x4010302c in __JCR_LIST__ () from /home/users/tcldev/ 8413/lib/libtcl8.4g.so #13 0x0000000c in ?? () #14 0x402c9274 in threadList () from /home/users/tcldev/ 8413/lib/thread2.6.3/libthread2.6.3.so #15 0x4010302c in __JCR_LIST__ () from /home/users/tcldev/ 8413/lib/libtcl8.4g.so #16 0xbf5ffbe0 in ?? () #17 0x00000000 in ?? () #18 0xbf5ffacc in ?? () #19 0x4006e11d in NewThreadProc (clientData=0x1) at /home/ users/tcldev/dqkit/src/tcl-8.4.13/generic/tclEvent.c:1229 Previous frame inner to this frame (corrupt stack?) - login: "zoro2"
- mimetype: "text/plain"
- username: "zoro2"
- icomment:
Ticket change [b5d75781c3] (rid 125317) by vasiljevic on 2006-09-06 20:56:17:
- closedate changed to: "2006-09-06T13:56:17"
- closer changed to: "vasiljevic"
- icomment:
Logged In: YES user_id=95086 Ah this again.... This is a LONG known problem of the Tcl library It is inherently UNSAFE to exit a process while still having some other threads arround using the Tcl library. The problem is that invoking the exit, the Tcl library will be finalized WHILE some other thread potentially still makes use of it. This cannot be solved without extensive modifications on how Tcl library is handling teardowns. This is NOT trivial and I will NOT fix that way until 9.0 Tcl as this will require numerous changes at various points and I can't justify that for the 8.x code.
- login: "vasiljevic"
- mimetype: "text/plain"
- resolution changed to: "Wont Fix"
- status changed to: "Closed"
- username: "vasiljevic"