From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 13B14385C426 for ; Thu, 16 Apr 2020 20:32:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 13B14385C426 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark@simark.ca Received: from [10.0.0.11] (unknown [192.222.164.54]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 772EA1E5F8; Thu, 16 Apr 2020 16:32:55 -0400 (EDT) Subject: Re: [PATCH] gdb: infrun: consume multiple events at each pass in stop_all_threads To: Pedro Alves , Simon Marchi , gdb-patches@sourceware.org Cc: Laurent Morichetti References: <20200224193638.29578-1-simon.marchi@efficios.com> <8402549f-c733-cb8b-918c-4dfb06eeb7a0@redhat.com> From: Simon Marchi Message-ID: Date: Thu, 16 Apr 2020 16:32:54 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <8402549f-c733-cb8b-918c-4dfb06eeb7a0@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: fr Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-11.1 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Apr 2020 20:32:57 -0000 On 2020-04-16 1:51 p.m., Pedro Alves via Gdb-patches wrote: > This makes sense to me, but can you try locally to check whether > if you do _more_ waits than wait_needed, like, say: > > for (int i = 0; i < (waits_needed * 2); i++) > > ... GDB still works correctly? In theory, wait_one will end up > returning TARGET_WAITKIND_NO_RESUMED once you get to waits_needed, > and things will all work out. I've just tried it and this is what I observed. > The reason I'm asking this, is if a process exits, or execs, while > we're trying to stop it, I think that it's possible that we won't see > an exit event for each and every thread of that exiting process. > Particularly execs -- see follow_exec's delete_thread calls. > This is somewhat related to Tankut's patch, here: > > https://sourceware.org/pipermail/gdb-patches/2020-April/167416.html Hmm so his patch will definitely conflict with mine. I don't mind waiting a bit and rebasing mine once his patch is merged, since he posted it long before mine. Simon