Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Sun, 25 Feb 2001 05:28:43 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Sun, 25 Feb 2001 05:28:33 -0500 Received: from ns.suse.de ([213.95.15.193]:34320 "HELO Cantor.suse.de") by vger.kernel.org with SMTP id ; Sun, 25 Feb 2001 05:28:18 -0500 To: Chris Wedgwood Cc: linux-kernel@vger.kernel.org Subject: Re: Core dumps for threads In-Reply-To: <20010224134523.O26109@valinux.com> <20010225221505.A12595@metastasis.f00f.org> From: Andi Kleen Date: 25 Feb 2001 11:28:14 +0100 In-Reply-To: Chris Wedgwood's message of "25 Feb 2001 10:16:13 +0100" Message-ID: Lines: 21 User-Agent: Gnus/5.0803 (Gnus v5.8.3) Emacs/20.7 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org 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. -Andi - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/