[Date Prev] [Date Next] [Thread Prev] [Thread Next] Date Index Thread Index Search archive:
Date:Sat Jan 28 00:00:01 2006 
Subject:pop-forum Why does poplog work on a locally compiled new kernel but not a pre-built one 
From:Aaron Sloman 
Volume-ID: 

Jonathan L Cunningham writes:

> Date: Fri, 27 Jan 2006 20:12:44 +0000
>
> Aaron Sloman <axs@cs.bham.ac.uk> wrote:
> > I have just talked to someone who teaches operating systems here
> > and who knows a lot more than I do about linux. He said that when
> > I get a pre-built kernel for Fedora Core 3, or 4 it will include
> > a lot of patches put in by Redhat which is not in the core kernel
> > sources. So it may be that the segmentation fault errors when
> > starting up a saved image are a result of additions to the kernel
> > inserted by RedHat. Maybe one day I shall find time to check that
> > by getting the sources for FC and compiling those. For now when
> > I compile a kernel it's a pure kernel from
> >     http://www.kernel.org/
>  ....
> Just to narrow it down, do you know whether the saved image depended
> on the system libraries (e.g. GNU math libraries)? If saved images
> which were "pure" poplog (e.g. just manipulating lists etc.) also
> caused segmentation faults, then ISTM less likely that it's anything
> to do with C libraries loaded at runtime (i.e. .so files).
>
> Or, to put it another way, have you experimented with creating
> a small saved image on top of basepop11, and seeing if that works?

I have just tried that and got the same result 'segmentation fault'.

I also tried some more playing with a precompiled fedora core kernel
based on 2.6.12,

Very rarely, instead of 'Segmentation fault' I got a pop11 error:

;;; MISHAP - ERROR READING SAVED IMAGE (Bad address)
;;; INVOLVING: '/usr/local/poplog/current-poplog/pop/lib/psv/startup.psv'

I tried altering

    $popcom/mkstartup

so as to replace -install with -noshare (see HELP mkimage). I also
tried replacing -nodebug with -debug, and removing -nonwriteable.

I found nothing that would reliably create a usable saved image. If I
ran mkstartup repeatedly and tested it, sometimes it created a
startup.psv saved image that was usable most of the time, and sometimes
it created a saved image that was never, or hardly ever,, usable.

If it was usable then I could create the other saved images by
running mkxved, mkclisp, mkplog, etc.

So it looks as if something random is happening at the time the
saved image is being created which affects how likely it is to work
when run, and something else that is random is happening when the
saved image is run that is less likely to stop the saved image
working.

I also found that replacing -install with -noshare seemed to make it
more likely that the saved image was usable, and having
 -nonwriteable was better than not having it.

In contrast if I ran the 2.6.15 kernel, compiled on my machine, all
saved images worked. However a saved image compiled on 2.6.15 did not
work with the pre-compiled FC3 kernel.

This is all very worrying if it means that poplog will not work reliably
on linux installed from CDs with precompiled kernels.

I guess that means I have to provide shell scripts as alternatives to
use of saved images, to run pop11, xved, clisp, prolog and pml, and warn
users that they will start up more slowly.

I wonder whether fixing the varargs problem and completely rebuilding
poplog could affect this. I suspect that's just a compile-time problem.

Aaron