Messages in this thread |  | | Date | Fri, 29 Sep 2000 11:04:07 -0500 | Subject | Re: Anyone working on multi-threaded core files for 2.4 ? | From | Peter Samuelson <> |
| |
[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?
Peter - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/
|  |