Menu

#257 Test suite segfault with -singleproc 1

4.0*
closed-fixed
None
8
2014-09-20
2014-09-17
Don Porter
No

$ make test TESTFLAGS='-singleproc 1 -file "sfbugs.test typeclass.test"'
...
sfbugs.test
typeclass.test
make: *** [test] Segmentation fault

$ make test TESTFLAGS='-singleproc 1 -file "sfbugs.test typeoption.test"'

My guess is that something in sfbugs.test is
running code (testing some old bug) that creates
instability so that the next thing to run is going
to crash.

I would isolate it to the causal test, but the
Itcl test suite had not been constructed properly
to permit the -skip and -match options to work.
Test setup and cleanup steps need to move into
-setup and -cleanup blocks.

Discussion

  • Don Porter

    Don Porter - 2014-09-17
    Program received signal SIGSEGV, Segmentation fault.
    0x00000000005a5c1e in Tcl_NewMethod (interp=0x822680, cls=0x0,
        nameObj=0xc94750, flags=129, typePtr=0x807940, clientData=0x8fa980)
        at /home/dgp/fossil/tcl/generic/tclOOMethod.c:233
    233         hPtr = Tcl_CreateHashEntry(&clsPtr->classMethods, (char *)nameObj,&isNew);
    (gdb) bt
    #0  0x00000000005a5c1e in Tcl_NewMethod (interp=0x822680, cls=0x0,
        nameObj=0xc94750, flags=129, typePtr=0x807940, clientData=0x8fa980)
        at /home/dgp/fossil/tcl/generic/tclOOMethod.c:233
    #1  0x00000000005a6707 in TclOOMakeProcMethod (interp=0x822680, clsPtr=0x0,
        flags=129, nameObj=0xc94750, namePtr=0xced960 "mytypemethod",
        argsObj=0xccb330, bodyObj=0xccb990, typePtr=0x807940, clientData=0x8fa980,
        procPtrPtr=0x8fa988) at /home/dgp/fossil/tcl/generic/tclOOMethod.c:647
    #2  0x00000000005a60da in TclOONewProcMethod (interp=0x822680, clsPtr=0x0,
        flags=129, nameObj=0xc94750, argsObj=0xccb330, bodyObj=0xccb990,
        pmPtrPtr=0x7fffffffd340) at /home/dgp/fossil/tcl/generic/tclOOMethod.c:414
    #3  0x00000000005a84e0 in TclOONewProcMethodEx (interp=0x822680, clsPtr=0x0,
        preCallPtr=0x2aaaae43311c <ItclCheckCallMethod>,
        postCallPtr=0x2aaaae4337fe <ItclAfterCallMethod>,
        errProc=0x2aaaae433abb <ItclProcErrorProc>, clientData=0x853c20,
        nameObj=0xc94750, argsObj=0xccb330, bodyObj=0xccb990, flags=129,
        internalTokenPtr=0x7fffffffd6a0)
        at /home/dgp/fossil/tcl/generic/tclOOMethod.c:1761
    #4  0x00002aaaae3ff5c6 in Itcl_NewProcClassMethod (interp=0x822680,
        clsPtr=0x0, preCallPtr=0x2aaaae43311c <ItclCheckCallMethod>,
        postCallPtr=0x2aaaae4337fe <ItclAfterCallMethod>,
        errProc=0x2aaaae433abb <ItclProcErrorProc>, clientData=0x853c20,
        nameObj=0xc94750, argsObj=0xccb330, bodyObj=0xccb990,
        clientData2=0x7fffffffd6a0) at ./generic/itcl2TclOO.c:253
    #5  0x00002aaaae440a27 in ItclClassBaseCmd (clientData=0x910de0,
        interp=0x822680, flags=2, objc=3, objv=0xc70030, iclsPtrPtr=0x7fffffffd8f0)
        at ./generic/itclParse.c:1001
    #6  0x00002aaaae41739b in Itcl_TypeClassCmd (clientData=0x910de0,
        interp=0x822680, objc=3, objv=0xc70030) at ./generic/itclCmd.c:2037
    #7  0x0000000000414d97 in Dispatch (data=0xbbfc18, interp=0x822680, result=0)
        at /home/dgp/fossil/tcl/generic/tclBasic.c:4357
    #8  0x0000000000414e1e in TclNRRunCallbacks (interp=0x822680, result=0,
        rootPtr=0x0) at /home/dgp/fossil/tcl/generic/tclBasic.c:4390
    #9  0x0000000000417903 in TclEvalObjEx (interp=0x822680, objPtr=0x0,
        flags=131072, invoker=0x0, word=0)
        at /home/dgp/fossil/tcl/generic/tclBasic.c:5956
    #10 0x00000000004178a7 in Tcl_EvalObjEx (interp=0x822680, objPtr=0x0,
        flags=131072) at /home/dgp/fossil/tcl/generic/tclBasic.c:5937
    #11 0x00000000005c483b in Tcl_RecordAndEvalObj (interp=0x822680,
        cmdPtr=0x8d05b0, flags=131072)
        at /home/dgp/fossil/tcl/generic/tclHistory.c:190
    #12 0x00000000005359cb in Tcl_MainEx (argc=-1, argv=0x7fffffffdd60,
        appInitProc=0x40f189 <Tcl_AppInit>, interp=0x822680)
        at /home/dgp/fossil/tcl/generic/tclMain.c:534
    #13 0x000000000040f182 in main (argc=1, argv=0x7fffffffdd58)
        at /home/dgp/fossil/tcl/unix/tclAppInit.c:84
    
     

    Last edit: Don Porter 2014-09-17
  • Don Porter

    Don Porter - 2014-09-17

    This may be as simple as the [oo::class destroy]
    in test sfbug-254. After that we would expect
    Itcl to fail. So the followup has two parts:

    1) Itcl should fail, but not crash, when oo::class
    is not in place.

    2) Test sfbug-254 should have its effects isolated,
    so that other tests may follow it in the same
    interp. Simplest way is to shove the guts of
    the test down into a slave interp.

     
    • Arnulf Wiedemann

      I have done what has been suggested, the cases I found no longer crash
      and I am using a slave interp for the test cases to avoid side effects.

      Right now I cannot connect to fossil repository, I will commit as soon
      as that is working again.

       

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

    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,4 +1,3 @@
    -
     $ make test TESTFLAGS='-singleproc 1 -file "sfbugs.test typeclass.test"'
     ...
     sfbugs.test
    
    • status: open --> closed-fixed
    • assigned_to: Arnulf Wiedemann
     

Log in to post a comment.