Tcl Source Code

View Ticket
Login
Ticket UUID: 439581
Title: crash when application terminates
Type: Bug Version: obsolete: 8.3.3
Submitter: fringe Created on: 2001-07-09 01:33:17
Subsystem: 80. Thread Package Assigned To: andreas_kupries
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2001-09-29 03:23:55
Resolution: Works For Me Closed By: andreas_kupries
    Closed on: 2001-09-28 20:23:55
Description:
Name: 
  Sangho Park

Extensions: 
  Thread 2.1

CustomShell: 

Comments: 
  tcl 8.3.3 compiled on CC with threads enabled. 
Solaris 2.5.1

ObservedBehavior: 
  Below I include a thread script which causes a crash 
when application terminate.  It crash 1~2 out of 20 
executions. Error message is various : "Segment 
Fault", "Tcl_Release couldn't find reference for 
0xedfb8" "Bus Error". 

ReproducibleScript: 

-------- run.csh ------
#!/bin/csh
while ( 1 )
   main_thread.tcl
end

---- main_thread.tcl ----
#!/usr/local/bin/tclsh
package require Thread

set total_done 10
set current 0

proc returnProc {thread_result} {
global total_done current
incr current -1
}

for { set i 0 } { $i < $total_done} { incr i } {
    while { $current == 4 } {
after 10 ; update
    }

    set childid1 [thread::create {source 
child_thread.tcl; thread::wait}]
    incr current
    thread::send $childid1 "set b 100"
    thread::send -async $childid1 "run_child 
[thread::id]"

}

while { [llength [thread::names]] > 1 } {
    after 10 ; update
}

---- child_thread.tcl ----
proc run_child { main_id } {
    thread::send $main_id "returnProc [thread::id]"
    thread::exit
}


DesiredBehavior: 
  It should not happen !!
User Comments: andreas_kupries added on 2001-09-08 03:45:43:
Logged In: YES 
user_id=75003

Priority down as I get no response after two weeks since 
the last comment.

andreas_kupries added on 2001-08-25 02:52:22:
Logged In: YES 
user_id=75003

I tried this using the newest sources from the
"core-8-3-1-branch" branch from the CVS at
SourceForge. This is tcl 8.3.3 + a number of
bugfixes. I used the head revision of Thread
(2.1.1) from the CVS at SourceForge. The
machine was a Sun running Solaris 2.6.

The bug did not happen. Please retest on your
system using the sources of Tcl and Thread
described above to see if it the change in the
OS or in Tcl/Thread which made the bug go away.

Please configure and compile with --enable-symbols
so that symbol information is available. If the
bug still happens a stack trace would extremely
valuable in diagnosing the problem.

andreas_kupries added on 2001-08-25 02:09:04:

File Added - 9948: scripts.tar.gz

Attachments: