From: ··············@gmail.com
Subject: SBCL fatal error: fake_foreign_call fell through
Date: 
Message-ID: <1161837041.625749.11630@h48g2000cwc.googlegroups.com>
Hello group,

I have a program which allocates memory arrays of significant size (to
be precise - 25,120,127 structures V containing (fixnum, fixnum,
unsigned-byte, fixnum) = 13 bytes each). I'm using SBCL 0.9.17 on Intel
Macbook 2.0 Ghz 2.0Gb, Mac OS X 10.4.8

My program is structured like this (in lisp pseudo-code):

(defun do-nasty-thing (i)
  (make-V-array 25,120,127)
  (read-V-array-from-file)
  (do-something-nasty-with-V-array)
  (write-V-array-to-another-file))

(defun do-everything-nasty (()
  (dotimes (i 4)
    (do-nasty-thing i)))

After successful execution of (do-nasty-thing 0) (I believe that it was
successful because the file was created and all information messages
were printed), I got the following from SBCL:

fatal error encountered in SBCL pid 1098:
fake_foreign_call fell through
LDB monitor
ldb>

It seems that problem occured when (do-nasty-thing 1) tried to allocate
more memory, and I guess that for some reason the memory from previous
do-nasty-thing call was not garbage collected.

Is it a bug/feature in SBCL or just a problem between my ears?

Thanks, Victor.

PS. It seems that simple (make-array '(100000000 5) :element-type
'unsigned-byte) produces the same error for me.

From: ··············@gmail.com
Subject: Re: SBCL fatal error: fake_foreign_call fell through
Date: 
Message-ID: <1161837886.360153.214700@f16g2000cwb.googlegroups.com>
··············@gmail.com wrote:
> After successful execution of (do-nasty-thing 0) (I believe that it was
> successful because the file was created and all information messages
> were printed), I got the following from SBCL:
>
> fatal error encountered in SBCL pid 1098:
> fake_foreign_call fell through
> LDB monitor
> ldb>

Which leads to the following question: what lisps are available on
Intel Macbook? So far I've only managed to install sbcl 0.9.17 and
acl80_express; the latter has a heap limit. There is no LW express
edition for Intel Mac yet.

I've failed to find easy instructions to install clisp, gcl, openmcl
etc. on the Intel Mac; in particular, fink doesn't support clisp
anymore:
······································@lists.sourceforge.net/msg14255.html

Anybody has any experience that s/he can share?

Thanks, Victor.
From: Bill Atkins
Subject: Re: SBCL fatal error: fake_foreign_call fell through
Date: 
Message-ID: <m2u01rab2r.fsf@weedle-24.dynamic.rpi.edu>
···············@gmail.com" <··············@gmail.com> writes:

> ··············@gmail.com wrote:
>> After successful execution of (do-nasty-thing 0) (I believe that it was
>> successful because the file was created and all information messages
>> were printed), I got the following from SBCL:
>>
>> fatal error encountered in SBCL pid 1098:
>> fake_foreign_call fell through
>> LDB monitor
>> ldb>
>
> Which leads to the following question: what lisps are available on
> Intel Macbook? So far I've only managed to install sbcl 0.9.17 and
> acl80_express; the latter has a heap limit. There is no LW express
> edition for Intel Mac yet.
>
> I've failed to find easy instructions to install clisp, gcl, openmcl
> etc. on the Intel Mac; in particular, fink doesn't support clisp
> anymore:
> ······································@lists.sourceforge.net/msg14255.html
>
> Anybody has any experience that s/he can share?
>
> Thanks, Victor.

I've had success with LispWorks Pro and SBCL.  I'd have to imagine
that OpenMCL would work too.
From: ··············@gmail.com
Subject: Re: SBCL fatal error: fake_foreign_call fell through
Date: 
Message-ID: <1161875131.857507.89730@b28g2000cwb.googlegroups.com>
Bill Atkins wrote:
> ···············@gmail.com" <··············@gmail.com> writes:
>
> > Which leads to the following question: what lisps are available on
> > Intel Macbook? So far I've only managed to install sbcl 0.9.17 and
> > acl80_express; the latter has a heap limit. There is no LW express
> > edition for Intel Mac yet.
> >
> >
> > Anybody has any experience that s/he can share?
> >
> > Thanks, Victor.
>
> I've had success with LispWorks Pro and SBCL.  I'd have to imagine
> that OpenMCL would work too.

According to openmcl.closure.com, their last stable release is 1.0
dated back at 10/5/2005, and it's not available for Intel MacOS X
[http://openmcl.clozure.com/Distributions/Download_005f1_005f0.html#Download_005f1_005f0]

My next step would be to try to get the latest version out of cvs (I
don't know it it's stable though) and try to recompile it myself.

One should never underestimate compiling things himself, as I learned
yesterday. Been a long time ubuntu user, I get accustomed to apt-get
install, and the whole idea of compiling something _from source_ seemed
uneasy to me. Last night, however, I discovered then getting sources of
clisp-2.41 (and a couple of dependencies) and compiling them is just as
easy as reading couple of README/INSTALL files and play with
./configure and make.

Therefore, I now have clisp-2.41 and sbcl-0.9.17 working (not counting
ACL 8.0 Express). Will investigate situation with gcl today.

Victor.
From: ··············@gmail.com
Subject: Re: SBCL fatal error: fake_foreign_call fell through
Date: 
Message-ID: <1161897525.652220.46210@m7g2000cwm.googlegroups.com>
On Oct 26, 10:05 am, ···············@gmail.com"
<··············@gmail.com> wrote:

>
> Therefore, I now have clisp-2.41 and sbcl-0.9.17 working (not counting
> ACL 8.0 Express). Will investigate situation with gcl today.

Just in case anybody interested: the most recent version of gcl seem to
be 2.6.7 dated back to 8/10/2005. I tried to compile it, but it failed
- diretctory h/ doesn't contain definitions for Intel MacOSX, and
trying to

./configure  --enable-machine=powerpc-macosx

failed as expected. Their CVS tree doesn't contain file for this
machine, either, so for nor better alternative I tend to believe that
gcl is not (yet) ported to Intel Mac.

Which means that for practical matters, I have to stick with SBCL, with
seems pretty solid except the error mentioned above. I was unable to
overcome the error by making smaller arrays and manually garbage
collecting. BTW, clisp on the same code was really slow - though I
haven't turned on any optimization. Trying to compare their speeds with
full optimization on will be another interesting test - but it seems
that SBCL is much faster 'out of the box'.
From: Rob Warnock
Subject: Re: SBCL fatal error: fake_foreign_call fell through
Date: 
Message-ID: <49WdnURwqIw1yN3YnZ2dnUVZ_oednZ2d@speakeasy.net>
··············@gmail.com <··············@gmail.com> wrote:
+---------------
| My program is structured like this (in lisp pseudo-code):
...
| (defun do-nasty-thing (i)
|   (make-V-array 25,120,127)
|   ...)
+---------------

I do hope you're not using commas like this in your actual Lisp code...


-Rob

-----
Rob Warnock			<····@rpw3.org>
627 26th Avenue			<URL:http://rpw3.org/>
San Mateo, CA 94403		(650)572-2607
From: ··············@gmail.com
Subject: Re: SBCL fatal error: fake_foreign_call fell through
Date: 
Message-ID: <1161875298.790110.100500@b28g2000cwb.googlegroups.com>
Rob Warnock wrote:
> ··············@gmail.com <··············@gmail.com> wrote:
> +---------------
> | My program is structured like this (in lisp pseudo-code):
> ...
> | (defun do-nasty-thing (i)
> |   (make-V-array 25,120,127)
> |   ...)
> +---------------
>
> I do hope you're not using commas like this in your actual Lisp code...

Yeah, that was just the *pseudo* code - I like to insert commas to
improve visibility, otherwise every reader (in human, not lisp sense)
should count digits himself. After struggling with macros for some
time, I (almost) learned to avoid "comma is not allowed outside of the
backquote" error message :).
From: Rob Warnock
Subject: Re: SBCL fatal error: fake_foreign_call fell through
Date: 
Message-ID: <C-adneaZJ4EGCNzYnZ2dnUVZ_rOdnZ2d@speakeasy.net>
··············@gmail.com <··············@gmail.com> wrote:
+---------------
| Rob Warnock wrote:
| > ··············@gmail.com <··············@gmail.com> wrote:
| > +---------------
| > | My program is structured like this (in lisp pseudo-code):
| > ...
| > | (defun do-nasty-thing (i)
| > |   (make-V-array 25,120,127)
| > |   ...)
| > +---------------
| >
| > I do hope you're not using commas like this in your actual Lisp code...
| 
| Yeah, that was just the *pseudo* code - I like to insert commas to
| improve visibility, otherwise every reader (in human, not lisp sense)
| should count digits himself.
+---------------

Drifting off-topic a bit, but I've occasionally needed to read typed,
cut&pasted, or lines from a file that have such comma-punctuated numbers.
It was always a total pain in the rear until someone pointed out that
(READ-FROM-STRING (REMOVE #\, "25,120,127")) ==> 25120127. Yippee!! ;-}


-Rob

-----
Rob Warnock			<····@rpw3.org>
627 26th Avenue			<URL:http://rpw3.org/>
San Mateo, CA 94403		(650)572-2607