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

History Of Ticket 465494ffffffffffffffffffffffffffffffffff

Artifacts Associated With Ticket 465494ffffffffffffffffffffffffffffffffff

  1. Ticket change [8a2068e51b] (rid 127341) by dgp on 2001-09-27 03:43:10:

    1. assignee initialized to: "andreas_kupries"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      
      The commits to HEAD on 2001-09-26 cause segfaults
      in tests io-36.5, http-3.6 (http.test), http-3.5
      (httpold.test).
      
    4. foundin initialized to: "obsolete: 8.4a4"
    5. priority initialized to: "7 High"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "dgp"
    9. subsystem initialized to: "24. Channel Commands"
    10. title initialized to: "I/O segfaults in test suite"
    11. type initialized to: "Bug"
  2. Ticket change [5af2aededd] (rid 118232) by andreas_kupries on 2001-09-27 11:11:27:

    1. icomment:
      Logged In: YES 
      user_id=75003
      
      On what architecture ? 
      
      I had no segfaults on Linux/i686.
      
      My I have stacktraces for a core compiled with
      --enable-symbols ?
      
      
      
    2. login: "andreas_kupries"
    3. mimetype: "text/plain"
    4. username: "andreas_kupries"
  3. Ticket change [eafc06b00a] (rid 103462) by andreas_kupries on 2001-09-27 11:52:20:

    1. icomment:
      Logged In: YES 
      user_id=75003
      
      Just tried head on the AS solaris/sparc host. Two failures
      in the testsuite (cmdAH.test, fCmd.test, see below),
      seemingly unrelated. No segfaults.
      
      cmdAH-16.3 Tcl_FileObjCmd: readable FAILED
      fCmd-17.1 mkdir stat failing on target but not ENOENT FAILED
      
      
      
      
    2. login: "andreas_kupries"
    3. mimetype: "text/plain"
    4. username: "andreas_kupries"
  4. Ticket change [88cc093af7] (rid 131922) by dgp on 2001-09-27 14:37:35:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      
      Several architectures.  Here's the first.  It segfaults
      on test io-36.5:
      
      $ uname -a
      Linux rhea 2.0.35 #1 Tue Jul 14 23:56:39 EDT 1998 i686
      unknown
      $ cd tcl/unix
      $ ./configure --disable-shared --enable-symbols
      ...
      $ make tcltest
      ...
      $ vi ../tests/io.test
      ... Comment out test io-29.27 ...
      $ gdb ./tcltest
      ...
      (gdb) run
      Starting  program: /home/dgporter/cvs/tcl/unix/./tcltest 
      % source ../tests/io.test
      
      Program received signal SIGSEGV, Segmentation fault.
      0x4006a090 in chunk_alloc (ar_ptr=0x400bebd0, nb=128) at
      malloc.c:2621
      malloc.c:2621: No such file or directory.
      (gdb) bt
      #0  0x4006a090 in chunk_alloc (ar_ptr=0x400bebd0, nb=128) at
      malloc.c:2621
      #1  0x40069fa5 in __libc_malloc (bytes=124) at malloc.c:2566
      #2  0x80efb3d in TclpAlloc (nbytes=124) at
      ./../generic/tclAlloc.c:672
      #3  0x806748c in Tcl_Alloc (size=124) at
      ./../generic/tclCkalloc.c:983
      #4  0x80a3f25 in Tcl_CreateChannel (typePtr=0x8103d34, 
          chanName=0xbfffceb0 "file6", instanceData=0x811e530,
      mask=4)
          at ./../generic/tclIO.c:1112
      #5  0x80d8021 in TclpOpenFileChannel (interp=0x8108b80,
      pathPtr=0x8158ea8, 
          modeString=0x8162a00 "w", permissions=438) at
      ./../unix/tclUnixChan.c:1377
      #6  0x80b0043 in Tcl_FSOpenFileChannel (interp=0x8108b80,
      pathPtr=0x8158ea8, 
          modeString=0x8162a00 "w", permissions=438) at
      ./../generic/tclIOUtil.c:1553
      #7  0x80acf40 in Tcl_OpenObjCmd (notUsed=0x0,
      interp=0x8108b80, objc=3, 
          objv=0xbfffd010) at ./../generic/tclIOCmd.c:975
      #8  0x80bd775 in EvalObjv (interp=0x8108b80, objc=3,
      objv=0xbfffd010, 
          command=0x8160029 "open test1 w]\n    puts $f
      abcdefghijklmnop\n    close $f\n    set f [open test1
      r]\n    fconfigure $f -blocking off\n    set l \"\"\n   
      lappend l [fblocked $f]\n    lappend l [read $f 3]\n   
      lappend l [fbloc"..., 
          length=12, flags=0) at ./../generic/tclParse.c:932
      #9  0x80be10c in Tcl_EvalEx (interp=0x8108b80, 
          script=0x8160029 "open test1 w]\n    puts $f
      abcdefghijklmnop\n    close $f\n    set f [open test1
      r]\n    fconfigure $f -blocking off\n    set l \"\"\n   
      lappend l [fblocked $f]\n    lappend l [read $f 3]\n   
      lappend l [fbloc"..., 
          numBytes=12, flags=0) at ./../generic/tclParse.c:1450
      #10 0x80bdbed in Tcl_EvalTokensStandard (interp=0x8108b80, 
          tokenPtr=0xbfffd368, count=1) at
      ./../generic/tclParse.c:1192
      #11 0x80be065 in Tcl_EvalEx (interp=0x8108b80, 
          script=0x8160008 "\n    removeFile test1\n    set f
      [open test1 w]\n    puts $f abcdefghijklmnop\n    close
      $f\n    set f [open test1 r]\n    fconfigure $f -blocking
      off\n    set l \"\"\n    lappend l [fblocked $f]\n   
      lappend l"..., 
          numBytes=350, flags=262144) at
      ./../generic/tclParse.c:1436
      #12 0x80633ec in Tcl_EvalObjEx (interp=0x8108b80,
      objPtr=0x815ad08, 
          flags=262144) at ./../generic/tclBasic.c:2798
      #13 0x80c6854 in Tcl_UplevelObjCmd (dummy=0x0,
      interp=0x8108b80, objc=1, 
          objv=0x810a384) at ./../generic/tclProc.c:667
      #14 0x808b2dd in TclExecuteByteCode (interp=0x8108b80,
      codePtr=0x8163bf8)
          at ./../generic/tclExecute.c:869
      #15 0x80636c2 in Tcl_EvalObjEx (interp=0x8108b80,
      objPtr=0x812b5a0, flags=0)
          at ./../generic/tclBasic.c:2951
      #16 0x80c6f4d in TclObjInterpProc (clientData=0x813be40,
      interp=0x8108b80, 
          objc=6, objv=0xbfffdb80) at ./../generic/tclProc.c:1075
      #17 0x80bd775 in EvalObjv (interp=0x8108b80, objc=6,
      objv=0xbfffdb80, 
          command=0x8160460 "tcltest::runTest io-36.5
      {Tcl_InputBlocked vs files, short read, nonblocking} {\n   
      removeFile test1\n    set f [open test1 w]\n    puts $f
      abcdefghijklmnop\n    close $f\n    set f [open test1
      r]\n    fco"..., 
          length=472, flags=0) at ./../generic/tclParse.c:932
      #18 0x80be10c in Tcl_EvalEx (interp=0x8108b80, 
          script=0x8160460 "tcltest::runTest io-36.5
      {Tcl_InputBlocked vs files, short read, nonblocking} {\n   
      removeFile test1\n    set f [open test1 w]\n    puts $f
      abcdefghijklmnop\n    close $f\n    set f [open test1
      r]\n    fco"..., 
          numBytes=472, flags=262144) at
      ./../generic/tclParse.c:1450
      ...
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  5. Ticket change [70e633a865] (rid 100570) by dgp on 2001-09-28 05:13:31:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      
      I rolled back to revision 1.35 of generic/tclIO.c
      in my working directory and the segfaults go
      away, so that is the trigger, though probably
      not the cause.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  6. Ticket change [0ece14adf4] (rid 94679) by dgp on 2001-09-28 07:06:23:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      ElectricFence says the bad code is
      line 6741 of generic/tclIO.c:
      
      statePtr->flags &= ~CHANNEL_TIMER_FEV
      
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  7. Ticket change [aa332312df] (rid 99285) by dgp on 2001-09-28 07:30:52:

    1. icomment:
      
      
      File Added - 11304: fix.patch
      
      Logged In: YES 
      user_id=80530
      
      The attached patch may be the fix.
      testing it now...
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. subsystem changed to: "25. Channel System"
    5. username: "dgp"
  8. Add attachment "fix.patch" [239f37969f] (rid 130972) by dgp on 2001-09-28 07:30:52.

  9. Ticket change [ebbdb15650] (rid 103582) by dgp on 2001-09-28 07:41:23:

    1. assignee changed to: "dgp"
    2. closedate changed to: "2001-09-28T00:41:23"
    3. closer changed to: "dgp"
    4. icomment:
      Logged In: YES 
      user_id=80530
      
      Yes, that's the fix. Committing...
      
      
    5. login: "dgp"
    6. mimetype: "text/plain"
    7. resolution changed to: "Fixed"
    8. status changed to: "Closed"
    9. username: "dgp"
  10. Ticket change [df9f22821a] (rid 115044) by andreas_kupries on 2001-09-28 22:11:11:

    1. closedate changed to: "2001-09-28T15:11:11"
    2. closer changed to: "andreas_kupries"
    3. icomment:
      Logged In: YES 
      user_id=75003
      
      Thanks Don, for tracking this down.
      
      So what I forgot was essentially the possibility that the 
      channel is can be [close]d during the handling of the 
      fileevent, invalidating its structures including the 
      statePtr. Without the preserve I write into a freed area, 
      messing up memory mgmt.
      
      Simple in hindsight. Also embarassing.
      
      
    4. login: "andreas_kupries"
    5. mimetype: "text/plain"
    6. username: "andreas_kupries"
  11. Ticket change [402154f235] (rid 121578) by dgp on 2001-09-28 22:19:31:

    1. closedate changed to: "2001-09-28T15:19:31"
    2. closer changed to: "dgp"
    3. icomment:
      Logged In: YES 
      user_id=80530
      
      Embarassment all around.  I forgot the (ClientData) casts.
      Fortunately, Vince Darley caught that and is fixing it.
      Need to make sure that fix gets back to the
      core-8-3-1-branch though.
      
      
    4. login: "dgp"
    5. mimetype: "text/plain"
    6. username: "dgp"
  12. Ticket change [1893a803c3] (rid 122685) by andreas_kupries on 2001-09-28 22:26:23:

    1. closedate changed to: "2001-09-28T15:26:23"
    2. closer changed to: "andreas_kupries"
    3. icomment:
      Logged In: YES 
      user_id=75003
      
      Just attach the add-on patch here too and I will apply it.
      
      
    4. login: "andreas_kupries"
    5. mimetype: "text/plain"
    6. username: "andreas_kupries"
  13. Ticket change [80c1fc63c1] (rid 116922) by andreas_kupries on 2001-09-28 23:59:35:

    1. closedate changed to: "2001-09-28T16:59:35"
    2. closer changed to: "andreas_kupries"
    3. icomment:
      Logged In: YES 
      user_id=75003
      
      Ok, the add-on patch is now part of core-8-3-1-branch too. 
      This closes the bug for good.
      
      
    4. login: "andreas_kupries"
    5. mimetype: "text/plain"
    6. username: "andreas_kupries"