Menu

#678 Deterministic SIGSEGV heisenbug

segfault
open
nobody
None
5
2016-09-22
2015-10-02
No

ASDF bug https://bugs.launchpad.net/asdf/+bug/1502323 reveals some massive instability in the way CLISP handles logical pathnames, plus a reproducible case of unexplained segfault.

If and when you have time to look at it, instructions to reproduce are provided. And in case it matters to reproduce, my clisp build script is in fare-scripts. Ping me if and when you have time to look at the bug.

Discussion

  • Sam Steingold

    Sam Steingold - 2016-08-26

    is this the same as bug#677?
    please supply a reproducible test case.
    thanks

     

    Last edit: Sam Steingold 2016-08-26
  • François-René Rideau

    I believe this is a different bug, and possibly not directly related to pathname handling.

    I tried to reproduce the bug and couldn't reproduce it using the latest CLISP by following the instructions above. However, when I thought everything was fine, I found what might be the same bug: deterministic SIGSEGV for me (this time in test-program.script), but extremely sensitive to source code modification -- adding a (+ 1 1) at the end of make-hello-world.lisp prevents the SIGSEGV, making it a heisenbug. GRRRRRRR!

    I can reliably reproduce on my machine (Linux x64, Ubuntu 16.04.1 LTS) with a clisp compiled from 15631:bf16ec104ed4 with the myclisp script in fare-scripts, using the test suite of ASDF 3.1.7.8:
    make t l=clisp t=test-program.script

    Please advise.

     
  • François-René Rideau

    This bug may be renamed from "Instability in pathname handling" to "Deterministic SIGSEGV heisenbug" or some such.

     
  • Sam Steingold

    Sam Steingold - 2016-08-28

    you can change the name of the bug using the "edit" button.
    you can also try compiling with gc-safety checks and seeing if you get an abort instead of the segfault:
    ./configure --cbc --with-debug CC='g++' build-g-gxx
    thanks

     
  • François-René Rideau

    I tried adding --with-debug CC='g++' and it failed to compile:

     > form: (nth-prime 100)
    correct: 541
    elapsed: 1.512 sec [scaled: 1.6600978150963783]
     > form: (nth-prime 150)
    
    *** - Program stack overflow. RESET
    Real time: 50.491096 sec.
    Run time: 50.48 sec.
    Space: 546481576 Bytes
    GC: 281, GC time: 23.908 sec.
    Bye.
    Makefile:25: recipe for target 'clisp' failed
    make[1]: *** [clisp] Error 1
    make[1]: Leaving directory '/home/fare/src/common-lisp/clisp/build-dir/benchmarks'
    Makefile:2190: recipe for target 'bench' failed
    make: *** [bench] Error 2
    Failure:
     Subprocess (:PROCESS #<SB-IMPL::PROCESS :EXITED 2>)
     with command ("./configure" "--with-ffcall"
                   "--with-libffcall-prefix=/home/fare/src/common-lisp/clisp/tools/x86_64-unknown-linux-gnu"
                   "--with-readline" "--with-libreadline-prefix=/usr"
                   "--with-sigsegv" "--with-libsigsegv-prefix=/usr"
                   "--with-module=asdf" "--with-module=bindings/glibc"
                   "--with-module=clx/new-clx" "--with-module=dbus"
                   "--with-module=i18n" "--with-module=rawsock"
                   "--with-module=readline" "--with-module=regexp"
                   "--with-module=syscalls" "--with-module=zlib"
                   "--prefix=/home/fare/local/stow/clisp" "--cbc" "--with-debug"
                   "CC=g++" "build-dir")
     exited with error code 2
    
     

    Related

    clisp: clisp


    Last edit: François-René Rideau 2016-08-29
  • François-René Rideau

    Also, I seem to be lacking access rights and can't change the bug title.

     
  • Sam Steingold

    Sam Steingold - 2016-08-29

    your compilation succeded! only the benchmarks failed (as expected).
    cd build-dir; make base and use build-dir/clisp as your clisp

     
  • Sam Steingold

    Sam Steingold - 2016-08-29
    • summary: Instability in pathname handling --> Deterministic SIGSEGV heisenbug
    • Group: ANSI compliance issue --> segfault
     
  • François-René Rideau

    OK so using that clisp, all tests pass (slowly).

    But since it's a heisenbug, it could be that disturbing the setup a little could make it reappear. I don't have the courage of running tests on every version of asdf or so to find out where it segfaults. At least not at this point.

     
  • Elias Pipping

    Elias Pipping - 2016-09-22

    I'm seeing segfaults in asdf-pathname-test as of asdf-3.1.7.25 again (didn't see those with 3.1.7.24). Very Heisenbugish indeed. Impossible for me to provide a reliable way of reproducing this. I'm on 15668:01c69ac1e332.

    Maybe make t l=clisp t=asdf-pathname-test.script CLISP=/path/to/clisp segfaults for you. Maybe it doesn't...

     

Log in to post a comment.