Lisp HUG Maillist Archive

Stack overflow during delivery


I'm trying to compile a large function in LispWorks on Linux and am
getting this error during compilation:

    Stack overflow (stack size 16368).
       1 Skip compiling form.
       2 Skip compiling form.
       3 (continue) Try compiling /tmp/auto-build-2006-May-08-15h-09m/contrib/ironclad/arcfour.lisp again.                                              
       ...

This only happens when running a delivery script that uses ASDF
to compile all my files.  When I run asdf interactively
everything is fine.  (I'm using a custom built image with a
larger stack size in both cases.)  I'm guessing that when I run
it interactively I'm running in a thread that has the larger
stack size.

I run the delivery script like this, where lispworks-tty-dev is
my custom image:

  linux% lispworks-tty-dev -init deliver-my-program.lisp
   => Fails with stack overflow error

and the deliver script is:

   ;;; ... stuff
   (asdf:operate 'asdf:load-op :my-package)
   ;;; ... more stuff that never gets called ...

Any help on increasing the stack size? or some sort of work
around?

Thanks!

Regards,
Chris Dean


Re: Stack overflow during delivery

Chris,

Is ASDF compiled? I seem to vaguely remember a stack issue resolved  
in LispWorks by compiling and loading ASDF rather than just loading it.

This thread might be helpful also:

http://thread.gmane.org/gmane.lisp.lispworks.general/3907/focus=3908


John


On May 8, 2006, at 8:07 PM, Chris Dean wrote:

> I'm trying to compile a large function in LispWorks on Linux and am
> getting this error during compilation:
>
>     Stack overflow (stack size 16368).
>        1 Skip compiling form.
>        2 Skip compiling form.
>        3 (continue) Try compiling /tmp/auto-build-2006- 
> May-08-15h-09m/contrib/ironclad/arcfour.lisp again.
>        ...
>
> This only happens when running a delivery script that uses ASDF
> to compile all my files.  When I run asdf interactively
> everything is fine.  (I'm using a custom built image with a
> larger stack size in both cases.)  I'm guessing that when I run
> it interactively I'm running in a thread that has the larger
> stack size.



John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL


Re: Stack overflow during delivery


John DeSoi <desoi@pgedit.com> writes:
> Is ASDF compiled? I seem to vaguely remember a stack issue resolved
> in LispWorks by compiling and loading ASDF rather than just loading
> it.

ASDF is compiled.  I've tried it both compiled and not and it hasn't
made a difference for me.

Thanks for the idea!

The work around I'm using right now is to compile in a separate
thread.  I have compile-my-program.lisp:

    ;; ...
    (push (list "Build in larger stack" nil
                (lambda () 
                  (asdf:operate 'asdf:compile-op :my-package))
                  (quit)))
            mp:*initial-processes*)

That does work for the compilation step, but it seems not for the
deliver step.  Deliver complains about being in a thread, so I have
deliver-my-program.lisp:

    ;; ...
    (asdf:operate 'asdf:load-op :my-package)
    (use-package :my-package)

    ;;; ensure that load is quiet
    (setf *load-verbose* nil)
    (setf sys::*demand-load-verbose* nil)

    (deliver 'my-main "my-program" 0 :multiprocessing t)

To create an executable I have these two steps:

    linux% lispworks-tty-dev -init compile-my-program.lisp
    linux% lispworks-tty-dev -init deliver-my-program.lisp

Regards,
Chris Dean


Updated at: 2020-12-10 08:48 UTC