From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28105 invoked by alias); 18 Dec 2008 21:47:38 -0000 Received: (qmail 28096 invoked by uid 22791); 18 Dec 2008 21:47:37 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from smtp-outbound-1.vmware.com (HELO smtp-outbound-1.vmware.com) (65.115.85.69) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 18 Dec 2008 21:47:02 +0000 Received: from mailhost5.vmware.com (mailhost5.vmware.com [10.16.68.131]) by smtp-outbound-1.vmware.com (Postfix) with ESMTP id B4EB852005; Thu, 18 Dec 2008 13:47:00 -0800 (PST) Received: from [10.20.92.151] (promb-2s-dhcp151.eng.vmware.com [10.20.92.151]) by mailhost5.vmware.com (Postfix) with ESMTP id AA203DC05C; Thu, 18 Dec 2008 13:47:00 -0800 (PST) Message-ID: <494AC3A5.1010301@vmware.com> Date: Thu, 18 Dec 2008 21:47:00 -0000 From: Michael Snyder User-Agent: Thunderbird 1.5.0.12 (X11/20080411) MIME-Version: 1.0 To: Pedro Alves CC: "gdb-patches@sourceware.org" Subject: Re: GDB hangs on kill or quit (after following a fork child, not detaching from the parent) References: <200812122113.57018.pedro@codesourcery.com> <494AA299.60308@vmware.com> <200812182103.42148.pedro@codesourcery.com> In-Reply-To: <200812182103.42148.pedro@codesourcery.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-12/txt/msg00334.txt.bz2 Pedro Alves wrote: > On Thursday 18 December 2008 19:20:57, Michael Snyder wrote: > >>> When there are forks involved, linux_nat_kill calls into linux_fork_killall >>> to do the killing. But, when following a fork child, and not >>> detaching from the parent, we defer adding the child fork to the >>> list of forks (which is confusing IMHO, see below), >> Do you have any intuition as to why we did that? >> I don't remember. Could it have been related to the >> checkpoint case? >> >> Otherwise it could simply have been an oversight... > > Yeah, I should have mentioned it before: At first I also > thought it was checkpoints related, then I noticed that > when 'set follow-fork-mode' is child, checkpoints are broken > for other reasons. It may well be that it always was (broken): That would not be at all surprising. Since checkpoints use forks as underlying implementation, I would not expect that checkpoint and follow-child would play well together. > I think that when checkpointing, we should always "follow" > the parent anyway; and that the checkpoints support should be > better insulated from the multi forks support, so that the > multi-forks support can grow into full multi-process support. Agreed. For starters, we might just document that checkpoints are not defined to work for forking processes (or for multi- threaded ones, for that matter). > >> I like your results, and your code changes look fine. >> Can you confirm that it doesn't adversely affect the >> checkpoint testsuites? > > Yep, had done that. No regressions in the checkpoints tests, or in > the rest of the testsuite. > > I'll go check it in then. OK.