[lkml]   [1997]   [Nov]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: core dumps from multi-threaded (kernel cloned) processes
    And lo, Philip Gladstone saith unto me:
    > The current behaviour of Linux 2.0.x (and I think 2.1.x) when
    > a glibc multithreaded process crashes is not useful. [The
    > multithreading is implemented by means of cloning]. Linux
    > dumps (essentially) the initial thread rather than the crashing
    > thread. Why?
    > I'm note sure what the right approach to fix this is. My inclination
    > would be to stop all the other processes (those which share the mmap),
    > and generate a threaded core dump. Then mark all these processes as
    > not dumpable, and then continue them. This is somewhat broken,
    > but I don't know what the right approach is.
    A refinement: assuming that you dump the register contents, stack
    pointer included, for all the threads in the core created by the dying
    thread, there's no reason to mark the others non-dumpable, assuming they
    survive the experience. If one were to dump to "core.%d",pid_of_dead_thread,
    instead of just to "core", that would be another reason not to mark the
    other threads non-dumpable. Or, kill the whole heavyweight process
    after dumping core from the perspective of the crashed thread.


     \ /
      Last update: 2005-03-22 13:40    [W:0.019 / U:23.748 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site