[Openmcl-devel] Cockpit Error using SAVE-APPLICATION?

j-anthony at comcast.net j-anthony at comcast.net
Thu Nov 6 09:13:59 PST 2008


Hi,

Thanks for info and fix for this.  Sadly I have a few more questions :-|

* First, I can pick up the 1.2 for Mac/Darwin just fine, but when I try
linuxx8664 I get this:

$ svn co http://svn.clozure.com/publicsvn/openmcl/release/1.2/linuxx8664/ccl
A    ccl/LX86CL64
A    ccl/lx86cl64
svn: In directory 'ccl'
svn: Can't move source to dest
svn: Can't move 'ccl/.svn/tmp/prop-base/lx86cl64.svn-base' to
'ccl/.svn/prop-base/lx86cl64.svn-base': No such file or directory
$ 

I poked around, but wasn't sure what the "right" thing to do was to fix/get
around this.  Any ideas?

* I poked around in the source before getting your reply and noticed that
for a toplevel for class APPLICATION there was a BEFORE method for such
that included a call to 
(initialize-interactive-streams).  Putting this in a given toplevel
function got around the error (as you note - the streams weren't
initialized but hacking it like this "fixed" that issue).  In the process
of this, I noticed that the default application class
LISP-DEVELOPMENT-SYSTEM didn't have such a method on it.  Was this the
issue?  I notice that 'application is not external in CCL, so subclassing
an application class off this and using it probably isn't a "right" thing
to do?

* It looks like the toplevel function does _not_ control image exit (in the
sense of a primary thread which if it exits, the whole image shutsdown).  I
say this because the versions of toplevel which did not encounter an error
but which exited immediately, didn't seem to affect the running image - it
just kept running.  In fact, you couldn't even Ctr-c out of it.  Had to
kill -9 the process explicitly.  Would a (quit) executed from any function
in the image shut things down?


Sorry for the rambling and extra questions, but I appreciate your efforts
and any info you may have on this stuff, as I/we are trying to deploy what
we have as a service.  BTW, CCL works just fine in the Amazon cloud!

Thanks,

/Jon




Original Message:  
-----------------
From: Gary Byers gb at clozure.com
Date: Thu, 6 Nov 2008 00:53:04 -0700 (MST)
To: j-anthony at comcast.net, Openmcl-devel at clozure.com
Subject: Re: [Openmcl-devel] Cockpit Error using SAVE-APPLICATION?


It's a bug: the function specified by :toplevel-function was being
run before the image had finished initializing itself (notably, before
streams like *TERMINAL-IO* were usable.)

That should be fixed in svn for both 1.2 and the trunk.

On Wed, 5 Nov 2008, j-anthony at comcast.net wrote:

> Hi,
>
> I am creating an application via save-application.  On start with the
> created image (at this point is w/o the kernel appended so is started with
> ccl -I <image-name>), I am blowing off with an error which makes me think
I
> am doing something wrong, which is likely obvious to those who've done
this
> with CCL before (I've done this all the time with ACL).
>
> Anyway, here is the very simple example:
>
> $ ccl
> Welcome to Clozure Common Lisp Version 1.2-r10552  (LinuxX8664)!
> ?
> (defun apri-toplevel () (format t "~%Persistence starts") (dotimes (i 10)
> (sleep 5) (format t ".")))
> APRI-TOPLEVEL
> ?
> (save-application "/var/aprigo/Persistence/persistence.lx64"
> :toplevel-function 'apri-toplevel)
> $
> $ ccl -I /var/aprigo/Persistence/persistence.lx64
> Error during early application initialization:
>
> Fault during write to memory address #x165CE9F8
> ? for help
> [31383] OpenMCL kernel debugger: (K)
> [31383] OpenMCL kernel debugger: Killed
> $
>
>
> If I change the toplevel to:
>
> (defun apri-toplevel () :apri-done)
>
> then it seems to work.  By "seems to work" I mean that it starts and does
> not give the error.  But I would have thought that since the toplevel just
> immediately returns, the image would exit.  Apparently that is not the
> semantics of save-application/toplevel-function-behavior.  So, questions
> are:
>
> 1. Is trying to write from the toplevel somehow bogus and that is causing
> the error?  If not, anyone know what I am doing wrong with this?
>
> 2. If the toplevel isn't the thing which controls a "controlled" exit,
what
> is a/the canonical way of exiting from such an image?
>
>
> Many thanks in advance for any info
>
>
> /Jon
>
> --------------------------------------------------------------------
> mail2web.com – Enhanced email for the mobile individual based on
Microsoft®
> Exchange - http://link.mail2web.com/Personal/EnhancedEmail
>
>
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> http://clozure.com/mailman/listinfo/openmcl-devel
>
>

--------------------------------------------------------------------
mail2web - Check your email from the web at
http://link.mail2web.com/mail2web





More information about the Openmcl-devel mailing list