Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 33334fe3d404c9e9deb3e778c3746b5aa9f9e521
Ticket: 219000ffffffffffffffffffffffffffffffffff
puts command core-dumps
User & Date: nobody on 2000-10-26 01:09:10
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    OriginalBugID: 3773 Bug
    Version: 8.2.2
    SubmitDate: '1999-12-06'
    LastModified: '1999-12-07'
    Severity: SER
    Status: Released
    Submitter: techsupp
    ChangedBy: hobbs
    OS: All Unix
    FixedDate: '1999-12-07'
    FixedInVersion: 8.3b1
    ClosedDate: '2000-10-25'
    
    
    Name:
    Erik Allaert
    
    CustomShell:
    No patches applied, "pure" tclsh.
    
    Comments:
    Core analysis:
    gdb) bt
    #0  0xc0140120 in kill ()
    #1  0xc00a9744 in raise ()
    #2  0xc008b258 in _sigaddset ()
    #3  0xc0085c84 in abort ()
    #4  0xc0f09d04 in panic ()
    #5  0xc0f40518 in FlushChannel ()
    #6  0xc0f40d08 in DoWrite ()
    #7  0xc0f40a8c in Tcl_Write ()
    #8  0xc0f4563c in Tcl_PutsObjCmd ()
    
    Does also happen in Tcl 8.0.5. Did not happen in Tcl 7.6
    
    ReproducibleScript:
    #!/bin/sh
    # exec tclsh "$0" ${1+"$@"}
    
    fconfigure stdin -blocking 0 ; # without this, no core dump
    
    for {set i 0} {$i < 1000} {incr i} {
        puts "$i abcdefg abcdefg abcdefg abcdefg abcdefg abcdefg"
        ## after 1 ; # with this delay, no core dump ?!?!
    }
    
    ObservedBehavior:
    Executing this script, we get a core-dump on HP-UX 10.20 and Solaris 2.6.
    This seems to be due to some race conditions, and some (relatively slow) hardware does not show this problem; on the hardware it occurs, it doesn't
    always happen after the same amount of loops, although the fact that it does
    core-dump is very reproducible. Delays introduced by e.g. gbd make this problem
    "evaporate"...
    
    The core dump occurs within tclIO.c, function FlushChannel, when the
    outputChannel gets written into. This function seems to return sometimes
    a -1 (instead of number of bytes written), and FlushChannel panics with
    the message "Blocking channel driver did not block on output" (although
    this message does not always make it to stdout).
    
    Platforms exposing this problem: HP9000/J2240, HP9000/J5000, Ultra-Sparc 1
    
    DesiredBehavior:
    No core dump 8-)
    
    
    
    removed panic case, instead treating it the same as the non-blocking
    channel, as that might be the appropriate method for tty channels. 
    -- 12/07/1999 hobbs
    
  4. foundin changed to: "obsolete: 8.2.2"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "nobody"
  9. subsystem changed to: "62. (unused)"
  10. title changed to: "puts command core-dumps"
  11. type changed to: "Bug"