|
2013-11-12
| ||
| 12:34 | • Closed ticket [3494470fff]: called Tcl_FindHashEntry on deleted table plus 6... artifact: 7f3ee173e9 user: dkf | |
|
2012-02-28
| ||
| 20:14 | • Pending ticket [3494470fff]. artifact: da2984fdc3 user: sebres | |
| 20:04 | • Ticket [3494470fff]: 6 changes artifact: aeb49368ea user: sebres | |
| 18:29 | • Ticket [3494470fff]: 4 changes artifact: c124e0f5f9 user: sebres | |
|
2012-02-26
| ||
| 09:27 | • Add attachment getHelp.tcl to ticket [3494470fff] artifact: 10e0027dd1 user: rtreleaven | |
| 09:27 | • Ticket [3494470fff] called Tcl_FindHashEntry on deleted table status still O... artifact: a04ea2fcbb user: rtreleaven | |
| 08:21 | • Ticket [3494470fff]: 4 changes artifact: 92866ee724 user: rtreleaven | |
| 08:21 | • Add attachment getHelp.tcl to ticket [3494470fff] artifact: e69b20126e user: rtreleaven | |
| 08:21 | • Ticket [3494470fff] called Tcl_FindHashEntry on deleted table status still O... artifact: b5cf9dbca2 user: rtreleaven | |
| 01:18 | • New ticket [3494470fff]. artifact: ea87281d0e user: rtreleaven | |
called Tcl_FindHashEntry on deleted table
Closed / Invalid3494470fffffffffffffffffffffffffffffffffCreated 15 years agoUpdated 13 years ago
Descriptionplain2012-02-26 01:18:12
% 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])"
}
rtreleavenplain2012-02-26 08:21:03
added the actual script
rtreleavenplain2012-02-26 08:21:28
File Added - 436717: getHelp.tcl
rtreleavenplain2012-02-26 09:27:44
File Added - 436720: getHelp.tcl
sebresplain2012-02-28 18:29:29
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.
sebresplain2012-02-28 20:04:37
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}
sebres Pending ticket [3494470fff].
[History diff]2012-02-28 20:14:52
dkf Closed ticket [3494470fff].
[History diff]2013-11-12 12:34:08
Log in (anonymous is fine) to add a comment.
Attachments:
- getHelp.tcl [download] added by rtreleaven on 2012-02-26 09:27:44. [details]