Artifacts Associated With Ticket 3494470fffffffffffffffffffffffffffffffff
Ticket change [ea87281d0e] (rid 103392) by rtreleaven on 2012-02-26 01:18:12:
- assignee initialized to: "vasiljevic"
- cmimetype initialized to: "text/plain"
- comment initialized to:
% puts $tcl_patchLevel 8.5.10 % parray tcl_platform tcl_platform(byteOrder) = littleEndian tcl_platform(machine) = x86_64 tcl_platform(os) = Linux tcl_platform(osVersion) = 3.0.0-16-generic tcl_platform(platform) = unix tcl_platform(pointerSize) = 8 tcl_platform(threaded) = 1 tcl_platform(user) = rtreleaven tcl_platform(wordSize) = 8 % Problem Behavior The script below produces this output >90% but <100% of the time. $ tclsh getHelp.tcl Does thread exist? no Does thread exist? no Does thread exist? no Does thread exist? no Does thread exist? no Does thread exist? no called Tcl_FindHashEntry on deleted table $ echo $? 0 Expected Behaviour The message "called Tcl_FindHashEntry on deleted table" should not be generated Concise Code Sample set truth(1) yes set truth(0) no package require Thread set id [ thread::id ] for { set i 0 } { $i < 6 } { incr i } { thread::create -preserved { while 1 { for { set i 0 } { $i < 9999999 } { incr i } {} update } } } after 1000 foreach id [ thread::names ] { if { $id eq [ thread::id ] } { continue } thread::release -wait $id puts "Does thread exist? $truth([ thread::exists $id])" } - foundin initialized to: "obsolete: 8.5.10"
- is_private initialized to: "0"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "rtreleaven"
- subsystem initialized to: "80. Thread Package"
- title initialized to: "called Tcl_FindHashEntry on deleted table"
- type initialized to: "Bug"
Ticket change [b5cf9dbca2] (rid 125307) by rtreleaven on 2012-02-26 08:21:03:
- icomment:
added the actual script
- login: "rtreleaven"
- mimetype: "text/plain"
- username: "rtreleaven"
- icomment:
Add attachment "getHelp.tcl" [e69b20126e] (rid 104318) by rtreleaven on 2012-02-26 08:21:27.
Ticket change [92866ee724] (rid 120773) by rtreleaven on 2012-02-26 08:21:28:
- icomment:
File Added - 436717: getHelp.tcl
- login: "rtreleaven"
- mimetype: "text/plain"
- username: "rtreleaven"
- icomment:
Add attachment "getHelp.tcl" [10e0027dd1] (rid 95036) by rtreleaven on 2012-02-26 09:27:44.
Ticket change [a04ea2fcbb] (rid 96784) by rtreleaven on 2012-02-26 09:27:44:
- icomment:
File Added - 436720: getHelp.tcl
- login: "rtreleaven"
- mimetype: "text/plain"
- username: "rtreleaven"
- icomment:
Ticket change [c124e0f5f9] (rid 111275) by sebres on 2012-02-28 18:29:29:
- icomment:
still strange: windows x32 / debian x64, tcl 8.5.11 with thread 2.6.7 core-8-5-brunch with thread 2.7 first script runs without any problem, BUT second script runs to his end, hereafter something runs infinity in background with cpu load 50%. "thread::names" returns main thread only.
- login: "sebres"
- mimetype: "text/plain"
- username: "sebres"
- icomment:
Ticket change [aeb49368ea] (rid 101688) by sebres on 2012-02-28 20:04:37:
- icomment:
The infinite loop was blame - ("while 1") Try following script to prevent an endless running: package require Thread set id [ thread::id ] set tid [ thread::create { while {![info exists ::thstop]} { for { set i 0 } { $i < 9999999 } { incr i } {} update } puts end!!!! } ] after 1000 thread::send -async $tid {set ::thstop 1} catch {thread::release -wait $tid} - login: "sebres"
- mimetype: "text/plain"
- priority changed to: "3 Low"
- resolution changed to: "Invalid"
- username: "sebres"
- icomment:
Ticket change [da2984fdc3] (rid 107729) by sebres on 2012-02-28 20:14:52:
- closedate changed to: "2012-02-28T13:14:52"
- closer changed to: "sebres"
- status changed to: "Pending"
Ticket change [7f3ee173e9] (rid 135556) by dkf on 2013-11-12 12:34:08:
- closedate changed to: "2456609.02371391"
- closer changed to: "dkf"
- comment changed to:
% puts $tcl_patchLevel 8.5.10 % parray tcl_platform tcl_platform(byteOrder) = littleEndian tcl_platform(machine) = x86_64 tcl_platform(os) = Linux tcl_platform(osVersion) = 3.0.0-16-generic tcl_platform(platform) = unix tcl_platform(pointerSize) = 8 tcl_platform(threaded) = 1 tcl_platform(user) = rtreleaven tcl_platform(wordSize) = 8 % Problem Behavior The script below produces this output >90% but <100% of the time. $ tclsh getHelp.tcl Does thread exist? no Does thread exist? no Does thread exist? no Does thread exist? no Does thread exist? no Does thread exist? no called Tcl_FindHashEntry on deleted table $ echo $? 0 Expected Behaviour The message "called Tcl_FindHashEntry on deleted table" should not be generated Concise Code Sample set truth(1) yes set truth(0) no package require Thread set id [ thread::id ] for { set i 0 } { $i < 6 } { incr i } { thread::create -preserved { while 1 { for { set i 0 } { $i < 9999999 } { incr i } {} update } } } after 1000 foreach id [ thread::names ] { if { $id eq [ thread::id ] } { continue } thread::release -wait $id puts "Does thread exist? $truth([ thread::exists $id])" } - login: "dkf"
- mimetype: "text/plain"
- severity changed to: "Minor"
- status changed to: "Closed"