Menu

#251 protect-2.5 segfaults

4.0*
closed-fixed
None
5
2015-01-13
2014-02-20
Don Porter
No

The is Bug 240 restarted. The segfault appears
to happen more frequently now, but still not every time.

$ make test TESTFLAGS='-singleproc 1 -file "info.test inherit.test methods.test mkindex.test protection.test"'
...
info.test
inherit.test
methods.test
mkindex.test
protection.test
make: *** [test] Segmentation fault

Discussion

  • Don Porter

    Don Porter - 2014-02-20

    The bug-240 branch (updated to trunk) is effective
    in stopping the segfault, but see comments in bug 240
    about questions raised by it.

     
  • Don Porter

    Don Porter - 2014-02-20

    Copying over the key comment that summarizes
    the current status:

    Branch bug-240 has stopped the test suite segfaults,
    but now suffers from failing test:

    ==== tinfo-10.1 type info types FAILED
    ==== Contents of test case:

    type dog {
    }

    type cat {
    }

    lsort [dog info types]

    ---- Result was:
    bar cat confused-dog dog dogbase foo tail tail1 tail2 wag
    ---- Result should have been (exact matching):
    cat dog
    ==== tinfo-10.1 FAILED

    when run in -singleproc 1 mode. Might just be a test error,
    or might be something more serious. The other issue is with
    all this Preserve-ing and refcounting to stop segfaults from
    accessing freed memory, there's a real risk that memory leaks
    have been introduced.

     
  • Arnulf Wiedemann

    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,4 +1,3 @@
    -
     The is Bug 240 restarted.  The segfault appears
     to happen more frequently now, but still not every time.
    
    • status: open --> pending
    • assigned_to: Arnulf Wiedemann
     
  • Arnulf Wiedemann

    I have tested with Tcl trunk and Itcl trunk and there was no problem on my machine.
    Can you please check again.
    Thanks.

     
  • Don Porter

    Don Porter - 2014-09-14

    It appears the fix requires both Itcl trunk and Tcl trunk,
    so the bug points to some combo of bugs in Itcl and TclOO.

    Testing the Itcl trunk with Tcl 8.6.1 still delivers frequent
    segfaults.

     
  • Don Porter

    Don Porter - 2014-09-14

    ....and so I go looking for the checkin that
    solved the matter, and the failure goes away, even
    in the scenario where I just saw it.

    I suppose closing this until it can be reliably
    reproduced is reasonable. Wish I had greater confidence
    we knew what was wrong and why it is fixed (if it is
    indeed fixed). I cannot chase it now.

     
    • Arnulf Wiedemann

      It could have to do with the fix for fossil bug ticket
      2cd667f270b68ef66d668338e09d144e20405e23
      because there was a crash, when checking protection (private method).
      Because of a lot of payed work I cannot look for that closer now.

      Arnulf

       

      Last edit: Arnulf Wiedemann 2014-09-20
  • Don Porter

    Don Porter - 2014-09-22

    Using current trunk for both Tcl and Itcl with repeated
    runs of

    make test TESTFLAGS="-singleproc 1"

    I will see a segfault in protection.test

    Based on history, my guess is this is the protect-2.5
    problem still unfixed, but I cannot reproduce with
    a -verbose option to be sure.

    Sorry not to have a more reliable reproduction yet. Might
    be able to produce one in a few weeks.

     
  • Don Porter

    Don Porter - 2014-10-01

    Here's the stack trace of the crash

    ---- protect-2.5 start
    
    Program received signal SIGSEGV, Segmentation fault.
    0x00002aaaae523bc5 in ItclMapMethodNameProc ()
       from /home/dgp/x86_64/linuxoldld/lib/itcl4.0.0/libitcl4.0.0.so
    (gdb) bt
    #0  0x00002aaaae523bc5 in ItclMapMethodNameProc ()
       from /home/dgp/x86_64/linuxoldld/lib/itcl4.0.0/libitcl4.0.0.so
    #1  0x0000000000598cc6 in TclOOObjectCmdCore (oPtr=0xbf9000, interp=0x824680,
        objc=2, objv=0xcc83e0, flags=1, startCls=0x0)
        at /home/dgp/fossil/tcl-only/generic/tclOO.c:2514
    #2  0x0000000000598bdf in TclOOInvokeObject (interp=0x824680, object=0xbf9000,
        startCls=0x0, publicPrivate=1, objc=2, objv=0xcc83e0)
        at /home/dgp/fossil/tcl-only/generic/tclOO.c:2454
    #3  0x0000000000414e43 in TclNRRunCallbacks (interp=0x824680, result=0,
        rootPtr=0xb2ed70) at /home/dgp/fossil/tcl-only/generic/tclBasic.c:4392
    #4  0x00002aaaae523146 in ItclObjectCmd ()
       from /home/dgp/x86_64/linuxoldld/lib/itcl4.0.0/libitcl4.0.0.so
    #5  0x00002aaaae520561 in CallItclObjectCmd ()
       from /home/dgp/x86_64/linuxoldld/lib/itcl4.0.0/libitcl4.0.0.so
    #6  0x0000000000414e43 in TclNRRunCallbacks (interp=0x824680, result=0,
        rootPtr=0xb2ed70) at /home/dgp/fossil/tcl-only/generic/tclBasic.c:4392
    #7  0x00002aaaae520918 in Itcl_EvalMemberCode ()
       from /home/dgp/x86_64/linuxoldld/lib/itcl4.0.0/libitcl4.0.0.so
    #8  0x00002aaaae52101b in NRExecMethod ()
       from /home/dgp/x86_64/linuxoldld/lib/itcl4.0.0/libitcl4.0.0.so
    #9  0x0000000000414dbc in Dispatch (data=0xc12268, interp=0x824680, result=0)
        at /home/dgp/fossil/tcl-only/generic/tclBasic.c:4359
    #10 0x0000000000414e43 in TclNRRunCallbacks (interp=0x824680, result=0,
        rootPtr=0xb2ed70) at /home/dgp/fossil/tcl-only/generic/tclBasic.c:4392
    #11 0x000000000041a916 in Tcl_NRCallObjProc (interp=0x824680,
        objProc=0x2aaaae520f80 <NRExecMethod>, clientData=0xbf9500, objc=1,
        objv=0xcc8370) at /home/dgp/fossil/tcl-only/generic/tclBasic.c:8075
    #12 0x0000000000414dbc in Dispatch (data=0xc11938, interp=0x824680, result=0)
        at /home/dgp/fossil/tcl-only/generic/tclBasic.c:4359
    #13 0x0000000000414e43 in TclNRRunCallbacks (interp=0x824680, result=0,
        rootPtr=0x0) at /home/dgp/fossil/tcl-only/generic/tclBasic.c:4392
    #14 0x0000000000414569 in Tcl_EvalObjv (interp=0x824680, objc=1,
        objv=0x831f80, flags=2097168)
        at /home/dgp/fossil/tcl-only/generic/tclBasic.c:4123
    #15 0x0000000000416d67 in TclEvalEx (interp=0x824680,
        script=0x885120 "# all.tcl --\n#\n# This file contains a top-level script to run all of the Tcl\n# tests.  Execute it by invoking \"source all.test\" when running tcltest\n# in this directory.\n#\n# Copyright (c) 1998-2000 by"...,
        numBytes=348, flags=0, line=13, clNextOuter=0x0,
        outerScript=0x885120 "# all.tcl --\n#\n# This file contains a top-level script to run all of the Tcl\n# tests.  Execute it by invoking \"source all.test\" when running tcltest\n# in this directory.\n#\n# Copyright (c) 1998-2000 by"...)
        at /home/dgp/fossil/tcl-only/generic/tclBasic.c:5261
    #16 0x000000000052ec04 in Tcl_FSEvalFileEx (interp=0x824680, pathPtr=0x867440,
        encodingName=0x0) at /home/dgp/fossil/tcl-only/generic/tclIOUtil.c:1815
    #17 0x00000000005377c0 in Tcl_MainEx (argc=-1, argv=0x7fffffffdd18,
        appInitProc=0x40f189 <Tcl_AppInit>, interp=0x824680)
        at /home/dgp/fossil/tcl-only/generic/tclMain.c:417
    #18 0x000000000040f182 in main (argc=6, argv=0x7fffffffdce8)
        at /home/dgp/fossil/tcl-only/unix/tclAppInit.c:84
    
     

    Last edit: Don Porter 2014-10-01
  • Don Porter

    Don Porter - 2015-01-09

    The bug-240 branch with

    make test TESTFLAGS="'-singleproc 1 -file type[fi]*.test -match "mymethod-1.1 tinfo-10.1"'

    produces

    ==== tinfo-10.1 type info types FAILED
    ==== Contents of test case:

    type dog {
    }
    
    type cat {
    }
    
    lsort [dog info types]
    

    ---- Result was:
    bar cat dog foo
    ---- Result should have been (exact matching):
    cat dog
    ==== tinfo-10.1 FAILED

    which seems to indicate that this branch fails to actually
    delete the types foo and bar in the -cleanup of test mymethod-1.1.

     
  • Don Porter

    Don Porter - 2015-01-13

    Restoring a commented-out release stops the
    test suite failure and the segfaults do not come back.

     
  • Don Porter

    Don Porter - 2015-01-13

    Merging bug fix branch to go out in Itcl 4.0.3.

     
  • Don Porter

    Don Porter - 2015-01-13
    • status: pending --> closed-fixed
    • assigned_to: Arnulf Wiedemann --> Don Porter
     

Log in to post a comment.