Patrick (patrickwonders) wrote,
Patrick
patrickwonders

  • Mood:

Troubles running multiple instances of SBCL...

I started playing with writing UFFI bindings for OpenMPI. I think I have this down, but I can't truly test it at home because I only have SBCL installed on one machine, and I am having a terrible time getting even the simplest SBCL program to run twice at the same time.

Here's my run.sh shell script.

#!/bin/sh

exec sbcl --noinform \
    --end-runtime-options \
    --no-sysinit \
    --no-userinit \
    --noprint \
    --disable-debugger \
    --eval '(format t "Hi from Lisp!~%")' \
    --eval '(sb-ext:quit)' \
    --end-toplevel-options

If I do ./run.sh then everything works just as I would expect. And, I can do ./run.sh ; ./run.sh and it runs twice.

But, if I try to do ./run.sh & ./run.sh so that they both run at the same time, I get one SEGV and one success. If I put three in the background and one in the foreground, I get three SEGVs and one success.

Thinking that maybe it tried to lock standard-in or standard-out and then freaked if it failed, I added 1> _out.$$ 2> _err.$$ < /dev/null and still had the same trouble.

I can run SBCL interactively in multiple windows so I don't think I should be hitting a memory limit. I just added a sleep 30 to the script before the exec, started the script in two different screens, killed both sleeps from another screen, and got the same result.

Any clues? I didn't find anything too useful searching the SBCL mailing lists for segmentation AND fault except some problems people had last summer getting SBCL to compile on a Mac that might be related if there's parallel building going on.

  • Darwin sirrobin.selsne.org 8.11.0 Darwin Kernel Version 8.11.0: Wed Oct 10 18:26:00 PDT 2007; root:xnu-792.24.17~1/RELEASE_PPC Power Macintosh powerpc
  • This is SBCL 1.0.2, an implementation of ANSI Common Lisp.

Edit: This is SBCL 1.0.17, an implementation of ANSI Common Lisp. same issue. And, I can even get rid of the (format ...) call and still trigger the same problem.

Tags: lisp, sbcl
Subscribe
  • Post a new comment

    Error

    default userpic

    Your reply will be screened

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 4 comments