From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id SIKnCSTGxV+xOgAAWB0awg (envelope-from ) for ; Mon, 30 Nov 2020 23:27:16 -0500 Received: by simark.ca (Postfix, from userid 112) id 1B1A41F0AB; Mon, 30 Nov 2020 23:27:16 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=0.3 required=5.0 tests=MAILING_LIST_MULTI,RDNS_NONE, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from sourceware.org (unknown [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id C570F1E590 for ; Mon, 30 Nov 2020 23:27:15 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 501C7393C84A; Tue, 1 Dec 2020 04:27:15 +0000 (GMT) Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 0F44A3892013 for ; Tue, 1 Dec 2020 04:27:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 0F44A3892013 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] (173-246-6-90.qc.cable.ebox.net [173.246.6.90]) (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 89C211E590; Mon, 30 Nov 2020 23:27:12 -0500 (EST) Subject: Re: [PATCH 02/12] gdb: clear inferior displaced stepping state on exec To: Pedro Alves , Simon Marchi , gdb-patches@sourceware.org References: <20201110214614.2842615-1-simon.marchi@efficios.com> <20201110214614.2842615-3-simon.marchi@efficios.com> <43495e04-beb9-bf75-0bc1-efcce540fa57@palves.net> From: Simon Marchi Message-ID: Date: Mon, 30 Nov 2020 23:27:12 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <43495e04-beb9-bf75-0bc1-efcce540fa57@palves.net> Content-Type: text/plain; charset=utf-8 Content-Language: fr Content-Transfer-Encoding: 7bit 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: , Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" On 2020-11-24 8:28 p.m., Pedro Alves wrote: >> I tried to write a test where a non-main thread displaced-steps an exec >> syscall, where things would hang due to the displaced step buffer not >> getting released. However, due to PR 26754 [1], it is hard to make it >> stable. So I'm not including a test for this patch. If you have an >> idea for another way to test this without triggering this bug, I'd like >> to hear it. >> >> [1] https://sourceware.org/bugzilla/show_bug.cgi?id=26754 > I can't think of another way to test this. > We can simply put a breakpoint with an always false condition on the syscall instruction and run from start. The exec will be displaced stepped while the main thread will run. I can reliably reproduce the hang this way. Simon