Artifacts Associated With Ticket 465494ffffffffff
Ticket change [8a2068e51b] (rid 127341) by dgp on 2001-09-27 03:43:10:
- assignee initialized to: "andreas_kupries"
- cmimetype initialized to: "text/plain"
- 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).
- foundin initialized to: "obsolete: 8.4a4"
- priority initialized to: "7 High"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "dgp"
- subsystem initialized to: "24. Channel Commands"
- title initialized to: "I/O segfaults in test suite"
- type initialized to: "Bug"
Ticket change [5af2aededd] (rid 118232) by andreas_kupries on 2001-09-27 11:11:27:
- 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 ?
- login: "andreas_kupries"
- mimetype: "text/plain"
- username: "andreas_kupries"
- icomment:
Ticket change [eafc06b00a] (rid 103462) by andreas_kupries on 2001-09-27 11:52:20:
- 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
- login: "andreas_kupries"
- mimetype: "text/plain"
- username: "andreas_kupries"
- icomment:
Ticket change [88cc093af7] (rid 131922) by dgp on 2001-09-27 14:37:35:
- 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 ... - login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [70e633a865] (rid 100570) by dgp on 2001-09-28 05:13:31:
- 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.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [0ece14adf4] (rid 94679) by dgp on 2001-09-28 07:06:23:
- icomment:
Logged In: YES user_id=80530 ElectricFence says the bad code is line 6741 of generic/tclIO.c: statePtr->flags &= ~CHANNEL_TIMER_FEV
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [aa332312df] (rid 99285) by dgp on 2001-09-28 07:30:52:
- icomment:
File Added - 11304: fix.patch Logged In: YES user_id=80530 The attached patch may be the fix. testing it now...
- login: "dgp"
- mimetype: "text/plain"
- subsystem changed to: "25. Channel System"
- username: "dgp"
- icomment:
Add attachment "fix.patch" [239f37969f] (rid 130972) by dgp on 2001-09-28 07:30:52.
Ticket change [ebbdb15650] (rid 103582) by dgp on 2001-09-28 07:41:23:
- assignee changed to: "dgp"
- closedate changed to: "2001-09-28T00:41:23"
- closer changed to: "dgp"
- icomment:
Logged In: YES user_id=80530 Yes, that's the fix. Committing...
- login: "dgp"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "dgp"
Ticket change [df9f22821a] (rid 115044) by andreas_kupries on 2001-09-28 22:11:11:
- closedate changed to: "2001-09-28T15:11:11"
- closer changed to: "andreas_kupries"
- 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.
- login: "andreas_kupries"
- mimetype: "text/plain"
- username: "andreas_kupries"
Ticket change [402154f235] (rid 121578) by dgp on 2001-09-28 22:19:31:
- closedate changed to: "2001-09-28T15:19:31"
- closer changed to: "dgp"
- 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.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
Ticket change [1893a803c3] (rid 122685) by andreas_kupries on 2001-09-28 22:26:23:
- closedate changed to: "2001-09-28T15:26:23"
- closer changed to: "andreas_kupries"
- icomment:
Logged In: YES user_id=75003 Just attach the add-on patch here too and I will apply it.
- login: "andreas_kupries"
- mimetype: "text/plain"
- username: "andreas_kupries"
Ticket change [80c1fc63c1] (rid 116922) by andreas_kupries on 2001-09-28 23:59:35:
- closedate changed to: "2001-09-28T16:59:35"
- closer changed to: "andreas_kupries"
- 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.
- login: "andreas_kupries"
- mimetype: "text/plain"
- username: "andreas_kupries"