[lkml]   [2000]   [Oct]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Anyone working on multi-threaded core files for 2.4 ?

[James Cownie]
> I was thinking that a scheme in which the core-dumping thread hit all
> the others with a SIGSTOP and then (somehow...) waited for them all
> to stop before writing the core file would suffice. (Of course, I may
> be wrong !)

Can someone explain why core dumping can't be done in userspace?
Probably a deficiency in my binary file format education but I don't
get it. It seems as though libpthreads could install a SEGV handler by
default that would increment a shared got-core-signal variable and
re-send the SEGV to all other threads, then each dump out its own stack
and register context and have one of them dump the memory. (This
collapses to a much simpler handler in libc for non-threaded code.)
Sure it means libc gets a nifty new complex function perhaps linked
against libbfd, but in terms of memory footprint you don't pay that
price until something crashes.

There must be a good reason Unix and Linux don't do this ... but I
haven't thought of it yet. Anyone care to enlighten me?

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

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