From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 8BvDH8q9Qmi1FAMAWB0awg (envelope-from ) for ; Fri, 06 Jun 2025 06:07:06 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=dgxwOtqI; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 6F9A81E11C; Fri, 6 Jun 2025 06:07:06 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-10.1 required=5.0 tests=ARC_SIGNED,ARC_VALID, BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED, RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE autolearn=ham autolearn_force=no version=4.0.1 Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id D6E091E089 for ; Fri, 6 Jun 2025 06:07:05 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6C1E73858C2A for ; Fri, 6 Jun 2025 10:07:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6C1E73858C2A Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=dgxwOtqI Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on20622.outbound.protection.outlook.com [IPv6:2a01:111:f403:2412::622]) by sourceware.org (Postfix) with ESMTPS id B5DB33858CDA for ; Fri, 6 Jun 2025 10:06:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B5DB33858CDA Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=amd.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org B5DB33858CDA Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=2a01:111:f403:2412::622 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1749204391; cv=pass; b=mdneUvqORYCEkQXSzQUzYgKZ7bKJSGH91s8opR+Q8YfvN0q6l9h5Qu+oZOF7wegWQ2zCvjLUTYcLkBJVqf2krNOnelR/4UnmHA/JT2N7K2TykokDnmSkVFrkImUpznMmEgXMx16yNyO5HLNEzDWwtr02IqNHbUDqaDKYKQYbpA0= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1749204391; c=relaxed/simple; bh=ntU2zm/4xYVNBJOngOxb7no8e1Q2TXlrxK9O5Wjwbqw=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=NBC7nri3PjeF2npcS8CpP/Tva9E40ygwaDzE+0C1LAB58E26k2vehG0aF2PrqL/oY5c8O35VrnhOTyvylyOBMSbakRiciT5rIvYhCISeVmTORgOCqkta04d9jkZTImF4grO29XYCnOgy09gZrfG52JV3XR/mAUV2wopWhE1vCtE= ARC-Authentication-Results: i=2; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B5DB33858CDA ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=e5gx1oMioWzAlVOYuI3sT0TW9VP7Ix5us1Mvvw5I578CXa9IvY+33jxIp50r5L80cxzVNuYxSWqmf9VEWBEmcVvYSTs+n6WhI93DV0Rl4IWNB3inDJ6Z7rsVH4M9iI/bfyODB2xnQYBGDjriGRtqk785AFYC62bh29HMv0BdIoxoYuWF31ds7bhWnr8ZJ59v+XfeDkEWt/oGu7wOX2grfSP9Ln+w3Scni8uKHZLXCSYZ33ZhOf+m8dU5Mlr/va4ZY37Mrhykxiy/BjnkIe/kO9mcCfY7ZkSbKJYQU3obaWl88U9M64QmdrwMVAH/2La7XDnFp9TUUJP2V+Gaw92KWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=qnUnNb0d56A7YIgNjlqjjy1Xn57/M7KC/xySRTYmQ58=; b=c+0SoAaPHYqOR29L9xsY9CLDO/yD8JBKFGyG2I36bkI/ANBLpRrBr30PqNIdVT3ELn7jKG68ZZ31+f0y2MuAVF1KMG1JAScj9Gijov/SPGCmsZpzFQc0OWX1CdCa/xZHL4eEhHli9tu5W3fgMs9xw+GPPDghaW34d6PM5r1xBAxxcg4w71o0NhNPKwEfG4Ws1QCWfkNiStG2OOsTJ2heJPlkmoENjQreZKzDX4Rv3iMIdvtk+gXi6PaOF3xwAcIByyqf4E1es26YOXd9X6KyKDhVs/HvqoRZJbR3jan6l8NRU/GY0rDDiMz2t6wQXT4vUbcGIcSix9sgF/ww3Tkm9w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=efficios.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=qnUnNb0d56A7YIgNjlqjjy1Xn57/M7KC/xySRTYmQ58=; b=dgxwOtqIW8z5dQRe87+ElVjBdq8tbElkRXN8owbxsSRhGn617HP5KyhSXn8DwieIcmWjcn3LJt0LqEPLbOvtlEQ+uoz5aR17MRGQPAi3rQMLNy3pjgtkcvdx2tDPMazX06BvjlHYxkIFkcaKXlrpzBeDLvOXbxcMxTwacdA8WOw= Received: from BY5PR04CA0011.namprd04.prod.outlook.com (2603:10b6:a03:1d0::21) by SJ0PR12MB6832.namprd12.prod.outlook.com (2603:10b6:a03:47e::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8792.34; Fri, 6 Jun 2025 10:06:26 +0000 Received: from BY1PEPF0001AE19.namprd04.prod.outlook.com (2603:10b6:a03:1d0:cafe::52) by BY5PR04CA0011.outlook.office365.com (2603:10b6:a03:1d0::21) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8769.29 via Frontend Transport; Fri, 6 Jun 2025 10:06:26 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by BY1PEPF0001AE19.mail.protection.outlook.com (10.167.242.101) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8792.29 via Frontend Transport; Fri, 6 Jun 2025 10:06:26 +0000 Received: from khazad-dum (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Fri, 6 Jun 2025 05:06:24 -0500 Date: Fri, 6 Jun 2025 11:06:15 +0100 From: Lancelot SIX To: Simon Marchi CC: Subject: Re: [PATCH 2/5] gdb/amd-dbgapi: add assert in require_forward_progress Message-ID: References: <20250605201657.418206-2-simon.marchi@efficios.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20250605201657.418206-2-simon.marchi@efficios.com> X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BY1PEPF0001AE19:EE_|SJ0PR12MB6832:EE_ X-MS-Office365-Filtering-Correlation-Id: 24caa009-0490-40c8-86e7-08dda4e1cc9f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|36860700013|1800799024|376014|82310400026; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?pkFTUjSFynEU1nlfjN3oOpUC/BsLob11bnMsXAyA3McLBKKIY2oKSSv+3Pvf?= =?us-ascii?Q?fzF2clCjNNKNtI57pClBt9JwtxiFJR1rTPWFKFGFg/zqWqCllScqGIsLEoZe?= =?us-ascii?Q?WNvWd9Y9uNiJe7/Hc52r6VJjJv/5mAaUDfMm9XvJfahCXU/CHcKiFJdGmPFR?= =?us-ascii?Q?Dui2FtpUO1uK0Rqy6kkRO29wDVu4uBpOWKc2mVVWxMyEAVNYz6QtnPYdCJnU?= =?us-ascii?Q?D7/LOOsiSfZ1YgrM4T2nw6QEjaxk4EloOa65UjEyoNg2l2KzKnVxVYjHcxqa?= =?us-ascii?Q?WzcM0yMN9v0UcBL4PVfnTxe0fkm8H7nK//gTvFZueJjVambgLsa3KI01AM2z?= =?us-ascii?Q?CsPlJCbDvpCMZqgf61TiEctUTfATLYv9OLkxnOGxnuwZHqV/bPdFeRPgNb5I?= =?us-ascii?Q?dRMO5hvVSLuZGLHlJShVKMKL24usWEg/oZNn6ACZBYtKD43GLggjigYozn0j?= =?us-ascii?Q?KMrA0NIjYHtA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Gzr?= =?us-ascii?Q?suYJvjb4MWzKT0ZdCidzDxQFWn+yS7hCEB/xhRzbWjZGrBUW2vXAN2eJpSHo?= =?us-ascii?Q?CsxHf9SRW/uYIGBntFoIkNKZoMfXBGUeznAR+F0jaAt9uaNzlo6Hhb/ahx9u?= =?us-ascii?Q?Evcj2Sq5oWdWOQydnzh3U+hYhFda18nE7BRG?= X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(36860700013)(1800799024)(376014)(82310400026); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jun 2025 10:06:26.2823 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 24caa009-0490-40c8-86e7-08dda4e1cc9f X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BY1PEPF0001AE19.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR12MB6832 X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org On Thu, Jun 05, 2025 at 04:16:25PM -0400, Simon Marchi wrote: > I didn't have a problem in this area, but it seems to me that this > pre-condition should always hold. We should only disable forward > progress requirement if the target says it's ok to do so. Otherwise, we > could get in a situation where we wait for events from amd-dbgapi, which > will never arrive, because amd-dbgapi didn't actually resume things. > This is OK. Approved-by: Lancelot Six (amdgpu) Best, Lancelot > Change-Id: Ifc49f55c7874924b7c47888b8391a07a01d960fc > --- > gdb/amd-dbgapi-target.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/gdb/amd-dbgapi-target.c b/gdb/amd-dbgapi-target.c > index c11e834aa408..8fd8bcf5ae49 100644 > --- a/gdb/amd-dbgapi-target.c > +++ b/gdb/amd-dbgapi-target.c > @@ -450,6 +450,12 @@ static void > require_forward_progress (ptid_t ptid, process_stratum_target *proc_target, > bool require) > { > + /* If we try to disable forward progress requirement but the target expects > + resumed threads to be committed to the target, we could wait for events > + that will never arrive. */ > + if (!require) > + gdb_assert (!proc_target->commit_resumed_state); > + > for (inferior *inf : all_inferiors (proc_target)) > { > if (ptid != minus_one_ptid && inf->pid != ptid.pid ()) > -- > 2.49.0