Skip to content
Tcl Source Code History Of Ticket 597997ffffffffffffffffffffffffffffffffff
Login

History Of Ticket 597997ffffffffffffffffffffffffffffffffff

Artifacts Associated With Ticket 597997ffffffffffffffffffffffffffffffffff

  1. Ticket change [b658720eb7] (rid 125401) by msofer on 2002-08-20 23:06:46:

    1. assignee initialized to: "andreas_kupries"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      This (granted, stupid) script panics.
      
      [mig@mini unix]$ cat /tmp/test.tcl 
      lappend auto_path /CVS/thread/unix
      package require Thread
      proc spawn {} {
          global i imax forever
          after 10 spawn
          if {[incr i] <= $imax} {
              thread::create "puts $i"
              flush stdout
          }
          set forever 1
      }
      
      set i 0
      if {[lindex $argv 0] ne {}} {
          set imax [lindex $argv 0]
      } else {
          set imax 10
      }
      spawn
      vwait forever
      flush stdout
      
      [mig@mini unix]$ ./tclsh /tmp/test.tcl 
      1
      called Tcl_FindHashEntry on deleted table
      Aborted
      
      
    4. foundin initialized to: "None"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "msofer"
    9. subsystem initialized to: "49. Threading"
    10. title initialized to: "async+thread panic"
    11. type initialized to: "Bug"
  2. Ticket change [1a51e39606] (rid 122962) by andreas_kupries on 2002-08-22 04:00:28:

    1. icomment:
      Logged In: YES 
      user_id=75003
      
      And here is a shell script to run the tcl script
      until we get a core. It takes to long to get one
      when doing this manually.
      
      % while [ ! -f core ] ; do ./i/bin/tclsh8.4 tst.tcl ; done
      
      
      
    2. login: "andreas_kupries"
    3. mimetype: "text/plain"
    4. username: "andreas_kupries"
  3. Ticket change [2b52b8044c] (rid 118722) by andreas_kupries on 2002-08-22 04:11:22:

    1. icomment:
      Logged In: YES 
      user_id=75003
      
      Well, the script reliably dumps core (panic, segfault, plain 
      unwanted exit) ... Unfortunately the generated dumps are 
      useless. Here is a typical stack trace
      
      (gdb) where
      #0  0x401d317e in __select () from /lib/libc.so.6
      #1  0x400e9820 in ?? () from /home/andreask/sf-
      dev/84/i//lib/libtcl8.4g.so
      #2  0x400fab85 in pthread_start_thread (arg=0xbf7ffe40) at 
      manager.c:241
      
      Obviously something is smashing the stack(s) very badly.
      
      
      
    2. login: "andreas_kupries"
    3. mimetype: "text/plain"
    4. username: "andreas_kupries"
  4. Ticket change [a7f7ca9c43] (rid 98893) by andreas_kupries on 2002-08-22 04:23:22:

    1. icomment:
      Logged In: YES 
      user_id=75003
      
      Adding a 'return' just after the 'flush stdout' in spawn makes 
      the crash go away. What the change does is defer 'set forever 
      1' until the chosen number of threads were created. This 
      means that the 'vwait' at the end of the scripts exist only after 
      the system is done with the threads.
      
      Setting forever to one while still spawning a thread causes the 
      system to sometimes exit vwait and the application while a 
      spawned thread is still running and accessing shared data 
      structures. In other words: This seems to be the same 
      problem we already know about, i.e. do not exit the 
      application until you are sure that all sub-thread are done. 
      Just in a different guise.
      
      See Tcl Bug #486399.
      
      
      
    2. login: "andreas_kupries"
    3. mimetype: "text/plain"
    4. username: "andreas_kupries"
  5. Ticket change [22de011b88] (rid 130828) by msofer on 2002-08-22 21:21:46:

    1. icomment:
      Logged In: YES 
      user_id=148712
      
      Mislabeled ticket, this has nothing to do with async and is
      indeed an "exit before all threads returned": the following
      script shows the same behaviour
      
          lappend auto_path /CVS/thread/unix
          package require Thread
          set i 0
          while {[incr i] <= 2} {
              thread::create "puts $i"
          }
      
      and everything is fixed by adding the following at the end:
      
          # make sure to wait until all threads have returned
          # before exiting [bug #597997]
          while {[llength [thread::names]] > 1} {
              after 100 set x 1
              vwait x
          }
      
      
      
      
      
    2. login: "msofer"
    3. mimetype: "text/plain"
    4. username: "msofer"
  6. Ticket change [b1b18a00f9] (rid 98193) by dgp on 2003-11-13 07:55:05:

    1. foundin changed to: "obsolete: 8.4.4"
  7. Ticket change [11d28bd50d] (rid 95209) by msofer on 2004-04-01 20:47:23:

    1. icomment:
      Logged In: YES 
      user_id=148712
      
      Andreas: should we then relabel this bug and close it as
      duplicate?
      
      
    2. login: "msofer"
    3. mimetype: "text/plain"
    4. username: "msofer"
  8. Ticket change [d49ef9867d] (rid 123483) by andreas_kupries on 2006-03-15 07:59:21:

    1. icomment:
      Logged In: YES 
      user_id=75003
      
      Yes.
      
      
    2. login: "andreas_kupries"
    3. mimetype: "text/plain"
    4. username: "andreas_kupries"
  9. Ticket change [4744384ee9] (rid 99669) by msofer on 2006-03-15 17:06:54:

    1. closedate changed to: "2006-03-15T10:06:54"
    2. closer changed to: "msofer"
    3. icomment:
      Logged In: YES 
      user_id=148712
      
      Closed as dup of #486399.
      
      
    4. login: "msofer"
    5. mimetype: "text/plain"
    6. resolution changed to: "Duplicate"
    7. status changed to: "Closed"
    8. username: "msofer"