Re: Core dumps for threads

From: Andi Kleen (
Date: Sun Feb 25 2001 - 05:28:14 EST

Chris Wedgwood <> writes:

> On Sat, Feb 24, 2001 at 09:57:44PM +0000, Alan Cox wrote:
> The I/O to dump the core would race other changes on the mm. The
> right fix is probably to copy the mm (as fork does) then dump the
> copy.
> Stupid question... but since all threads see the same memory space as
> each other; can we not lock the entire vma for the process whilst
> it's being written out?

It would need a recursive mm semaphore -- core dumps can page fault and page
faults take the semaphore again. Other alternative is to copy the MM like
fork before dumping, but then core dumping could fail much quicker when you
ran out of memory.


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

This archive was generated by hypermail 2b29 : Wed Feb 28 2001 - 21:00:09 EST