From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-db3eur04on2072.outbound.protection.outlook.com [40.107.6.72]) by sourceware.org (Postfix) with ESMTPS id DFF98385828F for ; Mon, 18 Dec 2023 11:34:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org DFF98385828F Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org DFF98385828F Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=40.107.6.72 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1702899257; cv=pass; b=Qm7VFmCtOvwpKyj/B5bstB0gXGqsu4/r6EkARtpvxnQqGsMt2r0yxE5qhJv9a3m0ubr+/T02NrzKFeTFqE9sXI+4HP15ikiSP5ncrVc8QKGpNdqnsj9Qwodkz4v6YfbXJdHYo63rdiZ35OCFZvy815ysSPsYQeedMpyBzrLN9Zs= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1702899257; c=relaxed/simple; bh=/p6cKRXakn9KMfoaY4yxTkOme9wFXsuahX1qlTu2iLs=; h=DKIM-Signature:DKIM-Signature:Message-ID:Date:Subject:From:To: MIME-Version; b=C4uk8ZIvJfXSlE5nnTnEK4bu6CFYHRrwGgyQWWv4m49hEliq/glab8/Cw84HAuD23u5anE2kfErk66og74Fa2qd5u4iBAw97mm0xkJLVItHJMBC2Xsb3YQoJOza6niQ15MejjcIOTfBf6HoiO0Fy69afwQhhOSBQzi0SZ/4bmx4= ARC-Authentication-Results: i=3; server2.sourceware.org ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=DOZSerHQ+m/aIqBfMpYEXV41KizjqKTsQuiUPYgaz47XYz9VhJ2RZvzknEMhklPyR4SCRssDnJjipt2GZKv7KznbbSGMkgNnw4iLC5aq95S1/QyCw3S7gzMYgdIkVvtlRgqaFvBzroh1sFqjqxFfYDEOsYfas5Q98x+ObgjbGhHnwDETp8xgtY66uyUcFzfKDp2fhAxuYyeWdx5DnksRx+cXNjeIT+XUDhwwIC201NReZcEkSKm4Z0NEsRjwm8H8GqNZIiQyusUPdbAA4Z9LG39BfwN4st/IFCMrFRag3jOlPG6UkJbJX8o4xltH1xwjWk48Z5MUb5JjQ7LMRE/RWQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=zsus/v+2pz+9jRVeK3XtoadtRXzYC5y3EY5l9jdoMGI=; b=d3ehMtQ8kZrrVfbEU+NIb0cqjuBFc1l8TEeu8GaFGt/+7dp5q8b/dHxUv/jvqM5MHor2cwx7auBeLJB61fFAH8mA/5Cv3L+He1TuJIkqiW6DWd/Rq14MiQnWy/KVZGq2jEfrlNAnP1SbiVN2WzRBTPetGjCjUBfJI3nKcL8O88sJPCpUDSpi2aWR4U2dAQ2aQjVSxsUeMYJZqqsk2oyu3K2h9gU+SGG3bA38fLc2wei9s+Ozl/Bkkty7ax/5g1mVVf4CD7C2ImMs+pQA2lrt8nvLQPeMkSmdt+c73fHb3C+3n2lOmWhqPtYw70Vaa94fUwSBiYk3WMBdUb1JmDwvIQ== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=sourceware.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zsus/v+2pz+9jRVeK3XtoadtRXzYC5y3EY5l9jdoMGI=; b=1VHZ6SmPt1QazNyTs3y4zrtC9rX04yKeGUaqvtuFeDaHnLwMaWa80GmLVZ00Xz7h/WYMJGJ43ro/k/ZLg45caJRMvSrUPYn1DYUBHko6ICxr1sTf3DWBH8mQ+eQAAPOQlTRs+Rg4XxMSYhsonBVgsQbSfpdSv7XqZIN2q+jzfmM= Received: from AM4PR05CA0020.eurprd05.prod.outlook.com (2603:10a6:205::33) by AM7PR08MB5495.eurprd08.prod.outlook.com (2603:10a6:20b:104::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7091.37; Mon, 18 Dec 2023 11:34:02 +0000 Received: from AM4PEPF00025F9C.EURPRD83.prod.outlook.com (2603:10a6:205:0:cafe::c1) by AM4PR05CA0020.outlook.office365.com (2603:10a6:205::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7091.37 via Frontend Transport; Mon, 18 Dec 2023 11:34:02 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM4PEPF00025F9C.mail.protection.outlook.com (10.167.16.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7113.7 via Frontend Transport; Mon, 18 Dec 2023 11:34:02 +0000 Received: ("Tessian outbound 8289ea11ec17:v228"); Mon, 18 Dec 2023 11:34:02 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 59c4f09704d1f11b X-CR-MTA-TID: 64aa7808 Received: from cc737c99b9d7.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 8655FDF7-239E-4171-9AE4-56D756229C9E.1; Mon, 18 Dec 2023 11:33:55 +0000 Received: from EUR05-AM6-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id cc737c99b9d7.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Mon, 18 Dec 2023 11:33:55 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KUzaVcu4d36/6c4qyMJDejAqa0GrrYh3sny+N8OtecsOymqaluw7r7v3LXff4a1Cjdp8sfplNo+m8gO3lh1sT+2dKWRGK+JxB3PZKqj5K+44O+nnUNzF4snc3gSel5EuADVYwBxiRfXJY3MLFCVuLTKdvHsyRLDjJFcmjjzSL4l7niMd6fpVF+Dpsc7dr1r92u6yaOklJycDh7za5daL0Lzpgt45x5qKKAVNn73ZeN+0nvv394KHGD3gwl533yjDb82kh5GfGFSdoRRvSQ8bzLP09E6BFVSz0OL6p6qQO1us+mWqY3s9P0j5l2OIO8PPLxhBfpkn2AOeMX13qwSDJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=zsus/v+2pz+9jRVeK3XtoadtRXzYC5y3EY5l9jdoMGI=; b=bVQfqIixDkvQvhlotTXvmCW7lBqwSVCbYIu2R5DtcQHZufmneAxmJGJwY8AB/hMgbk7MMGMry01eq/QiMOIubg2/My3PUmk3bWEFuKrKCPq9Lnc7ilr4CDx5Lg5MsgAdB6NWRkQQptNjYjy7Q2Amajz75zWiJyZyZ5HyhYX3cVfFl9F1VJFmmIq7X+o8HhxAQpe+dGO+kdfWtIwjHaz2Cayc5c1qCPCSLiM+8L/hgQENFqD2/UMAniOKeA3jv9q606i3YIEy/MYS7/u2HG54yLRPGrV3EDzOqHTz+BpZf9Tz5GRZrjKPyGOkLBC/RICqvoGCiR+E3btDXrFS2DrTHQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zsus/v+2pz+9jRVeK3XtoadtRXzYC5y3EY5l9jdoMGI=; b=1VHZ6SmPt1QazNyTs3y4zrtC9rX04yKeGUaqvtuFeDaHnLwMaWa80GmLVZ00Xz7h/WYMJGJ43ro/k/ZLg45caJRMvSrUPYn1DYUBHko6ICxr1sTf3DWBH8mQ+eQAAPOQlTRs+Rg4XxMSYhsonBVgsQbSfpdSv7XqZIN2q+jzfmM= Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from VI1PR08MB3919.eurprd08.prod.outlook.com (2603:10a6:803:c4::31) by AS2PR08MB9762.eurprd08.prod.outlook.com (2603:10a6:20b:605::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7091.37; Mon, 18 Dec 2023 11:33:53 +0000 Received: from VI1PR08MB3919.eurprd08.prod.outlook.com ([fe80::e05e:c012:f1f9:eb51]) by VI1PR08MB3919.eurprd08.prod.outlook.com ([fe80::e05e:c012:f1f9:eb51%4]) with mapi id 15.20.7091.034; Mon, 18 Dec 2023 11:33:53 +0000 Message-ID: <4645db1f-0101-4880-acf7-7fea744889fe@arm.com> Date: Mon, 18 Dec 2023 11:33:48 +0000 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 0/3] Fix "attach" infinite loop Content-Language: en-US From: Luis Machado To: Tom Tromey Cc: Tom Tromey via Gdb-patches References: <20231003-attach-bug-v1-0-f5de2e583c5d@adacore.com> <87wmtxbz1n.fsf@tromey.com> <87plzkjvpf.fsf@tromey.com> <875y0z6z1j.fsf@tromey.com> <4f321ae7-f625-499d-9061-30c8d779c5d5@arm.com> In-Reply-To: <4f321ae7-f625-499d-9061-30c8d779c5d5@arm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P265CA0166.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:312::10) To VI1PR08MB3919.eurprd08.prod.outlook.com (2603:10a6:803:c4::31) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: VI1PR08MB3919:EE_|AS2PR08MB9762:EE_|AM4PEPF00025F9C:EE_|AM7PR08MB5495:EE_ X-MS-Office365-Filtering-Correlation-Id: 0c8b63b5-940d-49fe-d9d6-08dbffbd3c09 x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: rxQCaIMVbdmSUCIFRBNYN8/gQw9eK19imT9TWLv/Ku4T1FJl8MatMoUrLcqowDZcxkcRMnpyf6klBslxZN4mOigizZwT+Vc/PRlknuTbOYjeZm4x6qldyXlTro5rf0EHLVZUYBi+SGtgbuYjnRG7xSLwIfC+WexO2dYk/uexqWw2ycFzpmlbi0tPcyqQfcfk85sJzM5ZvA78sH06zXPK3Qrl9nwXstRctliqLAmF6NpJZ7ilRirUPZ4DFqwC2SzO1F+YcXBX+cYwqUxBRh7erC4hOLxRy344PSV3nVdklx0WUjKL0vjO0NDB7GPjYJI4ckjT0FNlGRYN6Q8kJ+rTAI7FIRWa+Uhhr+vSiXbrSSavuzIOPZkY96ct6f2MICykXobx5hnTEVyoHORExN7sd8xmmjrfof+iZtUb3oQwJvtV2+13KBmp3GoASrYl6hlR6cWtyCVKTWCBLLFXEd4eMlFirQWVHq5NRHDEf3UBCcRkcMkTiBzuKD5LlDmiCwIhwfbZyql3qAdQYd09brUEl7fxjI9auwA20A96p/wQSD/4PgU7DxM/suiW6RYmb+9FprGL/sZ9Z36OQUPY5Yo9ZRexgLe657ZOqlSiY9YzlrhX+vhbDrnC4WLrVOSFhJ5LM/X3Q3F6HGAF3QCp1k/5dg== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR08MB3919.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(396003)(39860400002)(346002)(136003)(366004)(376002)(230922051799003)(1800799012)(451199024)(186009)(64100799003)(83380400001)(2616005)(53546011)(26005)(8936002)(38100700002)(316002)(4326008)(44832011)(8676002)(5660300002)(41300700001)(478600001)(66946007)(6486002)(6506007)(6512007)(6666004)(2906002)(66476007)(66556008)(6916009)(36756003)(31696002)(86362001)(84970400001)(31686004)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS2PR08MB9762 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM4PEPF00025F9C.EURPRD83.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: cd6637dc-73c4-497c-68c6-08dbffbd34a4 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 5LiL8FO8QCe3192Nh+emajR8YTZkSgu4ve2tp9Xrb1U4XgT9C3E4D0SIWOpAA2PB3SEvPNuJucdJQbCPXDLhFB309lewXb7Utpi90z6dsbOsEsp0XLLJ3oyqvhWmL0pzW/1kkW9rM+XzyHg4YyzPGEvbmayphNBBXrHCwHeVqNn3BguczgxDy41/8StC9bMsGFthx4SMhR3JpyE8z18O2MgqOkW8AXqh1+K3k0x5/pfb507yinwJ9Ss2+F7qx+Seaaof2XZp05Rbn1WBJyNwzlZs2+pJGmnZfmuPdsY7Sesc8LZjMOErUrv/tC4gjHxXuWafIQ/ItrH7YXIvjyL8GVkZjQSJTe8L+9RY3r0rQs+A8w5LzXw0O9GLOCa7hiX79x1V+IGN68GqNOKz3dtSf55wxR/bziCippeVTDOw+jOYQdS1Cd8/6JL9SKrcgsq6eu8YxkMga9j5wFav7+C8bWUxQiYTrk+r+hg9oL/177W/fotkRk7A7WHBb4CeYbvQ6YeHeXOO2c8wvu+hpr8YluIgSbrqsyaLYH32dncq3ZYnOldF8dIjUMdd+oXR2tyK4THL80Q6CCfplS9ARknnePL5WXr0X+vggKFVvB5V05Rjye4QmLaptJyKXY/ldQriber42YmUf1aO3e0ogYo8EhVN8VcGyOsVpTOf8IqADwZyln+aO6eKHFfh+ONt+8m4bW/Uce/Qhy34ohaUd5domPjSFy0nLfC927R/9iKUtdw= X-Forefront-Antispam-Report: CIP:63.35.35.123;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:64aa7808-outbound-1.mta.getcheckrecipient.com;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com;CAT:NONE;SFS:(13230031)(4636009)(39850400004)(396003)(136003)(346002)(376002)(230922051799003)(186009)(64100799003)(82310400011)(451199024)(1800799012)(36840700001)(46966006)(84970400001)(40480700001)(31686004)(70586007)(86362001)(31696002)(81166007)(356005)(82740400003)(36756003)(36860700001)(83380400001)(47076005)(336012)(26005)(53546011)(2616005)(478600001)(6486002)(2906002)(70206006)(8936002)(6666004)(6512007)(6506007)(6862004)(4326008)(316002)(8676002)(5660300002)(44832011)(41300700001)(43740500002);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Dec 2023 11:34:02.3612 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0c8b63b5-940d-49fe-d9d6-08dbffbd3c09 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: AM4PEPF00025F9C.EURPRD83.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7PR08MB5495 X-Spam-Status: No, score=-5.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,FORGED_SPF_HELO,KAM_DMARC_NONE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 12/18/23 09:50, Luis Machado wrote: > On 12/15/23 19:33, Tom Tromey wrote: >> Luis> I'm getting the following on aarch64-linux Ubuntu 22.04: >> >> Luis> FAIL: gdb.threads/attach-many-short-lived-threads.exp: iter 1: break at break_fn: 1 (the program is no longer running) >> Luis> FAIL: gdb.threads/attach-many-short-lived-threads.exp: iter 1: break at break_fn: 2 (the program is no longer running) >> Luis> FAIL: gdb.threads/attach-many-short-lived-threads.exp: iter 1: break at break_fn: 3 (the program is no longer running) >> Luis> FAIL: gdb.threads/attach-many-short-lived-threads.exp: iter 1: reset timer in the inferior >> Luis> FAIL: gdb.threads/attach-many-short-lived-threads.exp: iter 1: detach (the program is no longer running) >> >> Tom> I was able to reproduce this, I'll take a look. >> >> Well, I can't reproduce this any more -- I managed to make it fail once, >> when I wrote that email, but not again. I wonder if this is one of the >> intermittent failure tests? >> >> If it fails consistently for you, maybe sending the gdb.log would help. >> Not sure though. >> >> Tom > > Sure. Let me check what the current situation is. The most important bit seems to be this fragment: -- (gdb) file /binutils-gdb-arm64-focal/gdb/testsuite/outputs/gdb.threads/attach-many-short-lived-threads/attach-many-short-lived-threads^M Reading symbols from /binutils-gdb-arm64-focal/gdb/testsuite/outputs/gdb.threads/attach-many-short-lived-threads/attach-many-short-lived-threads... (gdb) builtin_spawn /binutils-gdb-arm64-focal/gdb/testsuite/outputs/gdb.threads/attach-many-short-lived-threads/attach-many-short-lived-threads attach 1545611 Attaching to program: /binutils-gdb-arm64-focal/gdb/testsuite/outputs/gdb.threads/attach-many-short-lived-threads/attach-many-short-lived-threads, process 1545611 Cannot attach to lwp 1609323: Operation not permitted (1) (gdb) PASS: gdb.threads/attach-many-short-lived-threads.exp: iter 1: attach info threads No threads. (gdb) PASS: gdb.threads/attach-many-short-lived-threads.exp: iter 1: no new threads set breakpoint always-inserted on (gdb) PASS: gdb.threads/attach-many-short-lived-threads.exp: iter 1: set breakpoint always-inserted on break break_fn Breakpoint 1 at 0xd64: file /binutils-gdb-arm64-focal/gdb/testsuite/../../../../repos/binutils-gdb/gdb/testsuite/gdb.threads/attach-many-short-lived-threads.c, line 57. (gdb) PASS: gdb.threads/attach-many-short-lived-threads.exp: iter 1: break break_fn continue The program is not being run. (gdb) FAIL: gdb.threads/attach-many-short-lived-threads.exp: iter 1: break at break_fn: 1 (the program is no longer running) -- We spawn the process and try to attach to it, but it (supposedly) fails. I see the test seems to assume the attaching succeeded even though ptrace returned EPERM. There seems to be some kernel-related issue here, as I see the failures for a 5.11-based machine but don't see it for a 5.15-based one. Are we missing XFAIL-ing the test when we see the ptrace attach failure?