lkml.org 
[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
Date
From
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?
[snip]
> 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.

Keith


\
 
 \ /
  Last update: 2005-03-22 13:40    [W:1.592 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site