DragonFly BSD
DragonFly users List (threaded) for 2004-11
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: checkpointing dumps core

From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Thu, 18 Nov 2004 02:06:08 -0800 (PST)

:Yes, ckpt is ^E in stty -a.
:I restart the checkpoint with:
:   checkpt -r test.ckpt
:   Michael

    Ok, this turned out to be very interesting.   Basically what is happening
    is that the core dump code is not dumping the 0x28067000-0x280e7000
    segment, which is the primary TEXT area of libc.

    It isn't doing this because it sees that the segment is marked NOCORE.

    It is also not writing out a vnode record for the segment because the
    RTLD loader had temporarily remapped it read-write, done a bunch of
    relocations, and then remapped it read-only again.  This changed
    the primary backing object from OBJT_VNODE to OBJT_DEFAULT->OBJT_VNODE,
    and the ELF coredump code does not write out vnode records for
    vm_map_entry records whos primary backing is not OBJT_VNODE.  

    This is a bug but I'm not going to fix it now.

    I fixed the checkpt issue by fixing RTLD to properly mark the TEXT area
    as being COREable if there are text relocations involved.  There was
    also a little snippit of modification related to TEXT+BSS areas where
    the BSS abuts the end of the TEXT within the same page.  This page also
    had to be marked as being COREable.

    With these fixes checkpt should now work.  You have to resync your 
    sources and recompile and reinstall /usr/src/libexec/rtld-elf to get
    the fixes.

    Note that the checkpt code does not seem to overwrite a pre-existing
    .ckpt file if you ^E again.  I am about to fix that issue as well.

					Matthew Dillon 

[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]