Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 297d19893de0ddc245c0d4a2ab89f86ace44a2eb
Ticket: 439581ffffffffffffffffffffffffffffffffff
crash when application terminates
User & Date: fringe on 2001-07-09 01:33:17
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    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 !!
    
    
  4. foundin changed to: "obsolete: 8.3.3"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "fringe"
  9. subsystem changed to: "80. Thread Package"
  10. title changed to: "crash when application terminates"
  11. type changed to: "Bug"