lpsm status

H. Peter Anvin hpa@zytor.com
Thu, 10 Oct 2002 10:59:49 -0700


[Please take this to the LPSM mailing list.]

ryan daum wrote:
 >
> I am interested in using lpsm for maintaining a fast persistent object
> memory index for my virtual machine project.  Is lpsm still being worked
> on?  If not, can you recommend an alternative?
> 

LPSM has been in a bit of a dormant state mostly because I haven't 
gotten any feedback that people are using it.

> I am having some specific problems.  My app is in C++, compiled in
> gcc-3.2.  I have written a custom allocator class for the STL to use
> lpsm_malloc and lpsm_free routines for its container types.  They work up
> to a point, but I get consistent segfaults on very large (>100megs)
> allocations.  The errors tend to look like this:
> 
>    SIGSEGV at (nil), %eip = 0x4016fd84
>    Segmentation fault

My guess would be that you have overridden the SIGSEGV handler that LPSM 
installs.

> In addition, I can't seem to run my program in GDB:
> 
> (gdb) run
> Starting program: /home/ryan/Projects/poe/bin/storage_test
> Initializing arena...
> 
> Program received signal SIGSEGV, Segmentation fault.
> 0x40024a72 in lpsm_init () from /usr/lib/libpsm.so.0
> 
> This error (during arena initialization) only happens when the program is
> in GDB.

This is normal.  LPSM uses SIGSEGV internally, but the debugger 
intercepts them.

> Finally, if I run with a smaller set everything seems to work fine until
> the final exit of the program where I get a segfault.  My exit code looks
> like this:
> 
>     lpsm_checkpoint(0.0 , PSMSYNC_SYNC);
> 
>     lpsm_shutdown();
> 
> Any ideas?

Again, I would guess you're hooking SIGSEGV (or setting it to SIG_DFL 
which is just as bad.)

On the other hand, if there is a real bug here I'd be very interested in 
a test case.

	-hpa