From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR02-AM0-obe.outbound.protection.outlook.com (mail-am0eur02on2080.outbound.protection.outlook.com [40.107.247.80]) by sourceware.org (Postfix) with ESMTPS id 27DB33858D39 for ; Wed, 8 Feb 2023 18:06:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 27DB33858D39 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=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=9jwSIX1M8vtLHlhGfYVJ0OIuQeJ+0Kn6d7aZNThPb4Q=; b=q5HKMl09yv6jWpbfjOpDDvhZ9sKDjqw9iF5d1xCkRfO6AR4TD5NGL6fLQ5uHbtIZO60RPowQV3CB0AKrORnfvUFZn7iiAmsO5Xx9NQuJF4UTQM9IHWKQiShf+WecRIjsNQcyqJeiIN+uwJFhZTsHwVL458xBpbkBBO/TRXkPt+A= Received: from DB6PR07CA0158.eurprd07.prod.outlook.com (2603:10a6:6:43::12) by DB9PR08MB6539.eurprd08.prod.outlook.com (2603:10a6:10:23f::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6064.37; Wed, 8 Feb 2023 18:06:09 +0000 Received: from DBAEUR03FT062.eop-EUR03.prod.protection.outlook.com (2603:10a6:6:43:cafe::3d) by DB6PR07CA0158.outlook.office365.com (2603:10a6:6:43::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6086.17 via Frontend Transport; Wed, 8 Feb 2023 18:06:09 +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 DBAEUR03FT062.mail.protection.outlook.com (100.127.142.64) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6086.17 via Frontend Transport; Wed, 8 Feb 2023 18:06:09 +0000 Received: ("Tessian outbound baf1b7a96f25:v132"); Wed, 08 Feb 2023 18:06:09 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 7bf9517bfef09b79 X-CR-MTA-TID: 64aa7808 Received: from 7bffdb28da09.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id F41388A6-FFF7-4CC7-8199-7C180729750B.1; Wed, 08 Feb 2023 18:06:02 +0000 Received: from EUR04-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 7bffdb28da09.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 08 Feb 2023 18:06:02 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cMRbG9eu/CRzbG4eXnUyvA71jU2m8RY7OASC3YOAwg9o2fJel0/CNDcMdY1lD1o9Jn7wL7tLgvh4lYw/hUfWveySDEynmDFHBzUpJzuWPlEVvXReKsvlnB5gZiRpMSQaMlVYuVWWcbBoImub1Bk1Npgcc0j35xCUK+GU7nZpDBeJmAvKLCGBIHhxCXuU8Q7jW3l9BSvfdn06csc23+5psBj3q7OJ3ao5iZj0MaOl8DVEoDsCH9ycuarUrzUFxDmvASpxyqwBkW1RQsZxZgM7Z0z9NwD8L3xfxABxj9ONbkI5I6egRjRUbNe2oJ5vNXRPCdHaStvsG9Sj9AYM5c1Wsw== 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=9jwSIX1M8vtLHlhGfYVJ0OIuQeJ+0Kn6d7aZNThPb4Q=; b=AFthSM1zF8uZCXcrJ+Y/roZ15n5uT61ua9+yl+xh9KnFIg4PdCkAnmMRp31EaGQbc1Zko+Gp9pk5SIRZVM4Cit55uva3+QmjL/3V6RDFEJO9E2X7B+hd8JwhsBPc68rd2cDDJ4trUyZrqBlshuzJcvEP4bRmrShvShdd0INMYFsDteqOG5BCOQ4+jUQTMDe0y7Ai2XQVjN9ZRnNX9k30m1dqIMaABnedHwt28BSFkwI0Ms1TiWzHI0PUfznAzOdlqTnsQH3975HDx4Na1ucNy68ECWVUUDl72KbSCMmySTunyr6QVu+OYeZqH3KpuT8SwJXD2LBLpIT1wOxdizVYFA== 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=9jwSIX1M8vtLHlhGfYVJ0OIuQeJ+0Kn6d7aZNThPb4Q=; b=q5HKMl09yv6jWpbfjOpDDvhZ9sKDjqw9iF5d1xCkRfO6AR4TD5NGL6fLQ5uHbtIZO60RPowQV3CB0AKrORnfvUFZn7iiAmsO5Xx9NQuJF4UTQM9IHWKQiShf+WecRIjsNQcyqJeiIN+uwJFhZTsHwVL458xBpbkBBO/TRXkPt+A= 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 GVXPR08MB7704.eurprd08.prod.outlook.com (2603:10a6:150:6a::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6086.17; Wed, 8 Feb 2023 18:06:00 +0000 Received: from VI1PR08MB3919.eurprd08.prod.outlook.com ([fe80::bced:32a3:b77e:90a6]) by VI1PR08MB3919.eurprd08.prod.outlook.com ([fe80::bced:32a3:b77e:90a6%6]) with mapi id 15.20.6064.036; Wed, 8 Feb 2023 18:06:00 +0000 Message-ID: <2503e9bb-78d0-52ab-71b3-3c8fe6c9415d@arm.com> Date: Wed, 8 Feb 2023 18:06:01 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: [pushed] [gdb/testsuite] Use maint ignore-probes in gdb.base/longjmp.exp Content-Language: en-US To: Tom de Vries , gdb-patches@sourceware.org References: <20230208124652.29570-1-tdevries@suse.de> <23f68beb-39c5-33c8-2d2d-f076192d2648@suse.de> <57277a06-0a9c-e731-beee-1f6d0e88ea6f@arm.com> From: Luis Machado In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P265CA0012.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:2ad::7) To VI1PR08MB3919.eurprd08.prod.outlook.com (2603:10a6:803:c4::31) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: VI1PR08MB3919:EE_|GVXPR08MB7704:EE_|DBAEUR03FT062:EE_|DB9PR08MB6539:EE_ X-MS-Office365-Filtering-Correlation-Id: 18e44990-42c7-4d51-8ef3-08db09ff27e6 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: PVxw/oZHKVeAa3tJGn3AaWmgJxHeeAntAAQG7cmQvjG9G4l+em96le91UD3kWfggYZ+H7X4PxNARe0WyFpmALZmZFNo0XSbg4WlDFETRjiaQWR1obudJSpafoROffPACn8I+NUh0Ij+3xfyMDMx0u8grejy9xAN2wfOd9r81zPwssks2xBlOszPQIdxW4LzaahevqCQO0V10aiyg1fVKsQfExjP7fBIS7ph47BTaUvvAKR7MaZixDhr7R7aDlK1otn3FnhNvpSEgcELRvKV5IadqQgkZKYCZVn9nPQ6M0zQFJtBYBincw5WaD1pXWyJn4n5ept1ihq9WFg9hBoYAZxF0fRAYcHiJByo/5JsgmU/tfWyhKnqQrVE0aSAX+LlBTvz8ul3pCzW4EwjIK9ltjY7ewUr9ALpFrK57C0oR7uRChr8m26KOGXkaFSPV3xU1wCAmJYuaS1YxnKBqQfOFqeykfexP004rwU+Y1pQJ00l15ZkCL3kokb+8pDb7GJrWwRr05NE/6OUk6l0vSdyrO/DOpRTlQi9bdYjaLeqpb4Wfrl/706wn1UL7dP5N/6imVBhYzpho3KN8SFuLA1jk1d+pZ2hrC5AcBFfSMtoTAsdlHQ1miMVhPZW0e2SHthAMO08CEz9wWH6JyIOptAIau7yfQnZKL44zOFXBShQzIcWSwrToFjNVprmG9ePDTbG3EwS90/DThYhWbM/N4VLSO2x6MFKpDlKoMEGM8AdaHnbRmMNJHhg41eOp5CPUguNQpct5aWwQjwz6JVFaXZgqsl3io+yknLAHOwFKwn+dqf4TITy44MD+mWDfDJlxHkB/ 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:(13230025)(4636009)(346002)(39860400002)(376002)(366004)(136003)(396003)(451199018)(44832011)(2906002)(86362001)(84970400001)(38100700002)(31686004)(2616005)(66946007)(6486002)(53546011)(6512007)(26005)(6506007)(36756003)(31696002)(186003)(316002)(19627235002)(66556008)(66476007)(41300700001)(478600001)(8676002)(5660300002)(8936002)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: GVXPR08MB7704 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: DBAEUR03FT062.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: c5462ee1-3c7c-48af-16ce-08db09ff2218 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: DXUSTlaVsapyH+zpbkMXrijNmyH/FJ3YCwwfArP0hlM5LNGbqFnYSp1kf0qUB7CLZqgni9fB5+4zsvp1AuHTlBECuvPdlHrjWzHPDAQbwmqv3tziPW1S0G+Y32ewBZ82Q9XzcT8sGYoA5PoEE+0lyqekOXhgMTZTXk1wDnq+OWLWSog7MblUZdei0t2vOudh3x4sJ9v9afzDccM8L6nXBfHDy7dKVjx56Mawb4ZYrJl3rjEFOX6ulYTLX6oiqKSr7OXJhLdm17zY/cALMGLBDqWIbK/+JnfyGhrHx4pbC36Orzyjzijg89h2ezuM928EnrInp60wEWQbPWx2RDaD2TqDuMjf3vp/N7l2+Ptm8yfCDtjasaX4Es7kAzyq9z7L1SBBC1yIkAKKb0lHmgEpBMovf4WqAGD4UnWnquHcAUpmGvYIaxu0a6ZrcDLEvjsyMnd0TkSVprUAd07l5JXrIIoXiaoWjDItT70AdtgtRIS2plwTJBQOv/gg0e6L6tFdk8ZRA7KblNe+OLcbdyahXbEpjAEmOu6IneyqWX5NA5qy5gtdeLUCJxq8S/19/W2st1dMKEi7CWISISneWYsRp6t6U+hp6XO2aNCFF/PvQXQ+aXauoBgb59iKUV2wxpa+oo4MUpXy5HmobLMA5wJQWI7cjSD4BJSbVNr+g+0RGKKYQSNGH+ZJvDQoR0W7/eR9HJKKLhidXP11+SVfW8klRBOSRMojXYJrkzLG+8aNrvboUQhibT92i8MHwKzqzxFaXSyQ+OX/GRJBxCt1JA+uy5nDhGQ6u6oGbt2ZnrY7XRSlDsnzLRskKozWwMlPALIe 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:(13230025)(4636009)(136003)(376002)(39860400002)(396003)(346002)(451199018)(36840700001)(40470700004)(46966006)(70206006)(70586007)(8676002)(336012)(36860700001)(40460700003)(316002)(19627235002)(31696002)(86362001)(5660300002)(81166007)(6486002)(356005)(31686004)(478600001)(6506007)(53546011)(2906002)(44832011)(6512007)(26005)(186003)(36756003)(47076005)(84970400001)(41300700001)(82310400005)(82740400003)(8936002)(2616005)(40480700001)(43740500002);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Feb 2023 18:06:09.3788 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 18e44990-42c7-4d51-8ef3-08db09ff27e6 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: DBAEUR03FT062.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB6539 X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,FORGED_SPF_HELO,KAM_DMARC_NONE,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE,TXREP,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 2/8/23 15:38, Tom de Vries wrote: > On 2/8/23 15:51, Luis Machado wrote: >> On 2/8/23 14:48, Tom de Vries wrote: >>> On 2/8/23 14:27, Luis Machado wrote: >>>> Hi Tom, >>>> >>>> Is the entire test supposed to PASS? I'm seeing the following on my aarch64/Ubuntu 22.04 setup: >>>> >>>> FAIL: gdb.base/longjmp.exp: with_probes=0: pattern 2: next over call_longjmp (the program is no longer running) >>>> FAIL: gdb.base/longjmp.exp: with_probes=0: pattern 2: next over setjmp (the program is no longer running) >>>> FAIL: gdb.base/longjmp.exp: with_probes=0: pattern 2: setup: breakpoint at pattern start (got interactive prompt) >>>> FAIL: gdb.base/longjmp.exp: with_probes=0: pattern 2: setup: breakpoint at safety net (got interactive prompt) >>>> FAIL: gdb.base/longjmp.exp: with_probes=0: pattern 2: setup: continue to breakpoint at pattern start (the program exited) >>>> FAIL: gdb.base/longjmp.exp: with_probes=0: pattern 3: next over pattern (the program is no longer running) >>>> FAIL: gdb.base/longjmp.exp: with_probes=0: pattern 3: setup: breakpoint at pattern start (got interactive prompt) >>>> FAIL: gdb.base/longjmp.exp: with_probes=0: pattern 3: setup: continue to breakpoint at pattern start (the program is no longer running) >>>> >>>> Maybe something is genuinely broken for aarch64 though, or I'm missing some packages/debuginfo. >>> >>> Hi, >>> >>> I just ran this test-case on openSUSE Leap 15.4 aarch64, no problems found. >>> >> >> Alright. That's good to know. > > FWIW, I've tried this test-case also on various x86_64 distros other than the usual openSUSE Leap 15.4: ubuntu 20.04, fedora 37 and opensuse tumbleweed, again no problems found. I did a brief investigation on this one, and gdb seems to be doing something strange. For Ubuntu 20.04 we have the following, just after deleting the breakpoints leading into the pattern 2 check: (gdb) info source Current source file is longjmp.c Compilation directory is /build/glibc-RIFKjK/glibc-2.31/setjmp Located in /repos/binutils-gdb/gdb/testsuite/gdb.base/longjmp.c Contains 82 lines. Source language is c. Producer is GNU C11 9.4.0 -moutline-atomics -mlittle-endian -mabi=lp64 -g -O2 -std=gnu11 -fgnu89-inline -fmerge-all-constants -frounding-math -fstack-protector-strong -fmath-errno -fPIC -ftls-model=initial-exec -fasynchronous-unwind-tables -fstack-protector-strong -fstack-clash-pro tection. Compiled with DWARF 4 debugging format. Does not include preprocessor macro info. (gdb) b 69 Breakpoint 4 at 0xaaaaaaaa08ec: file /builds/binutils-gdb-arm64-focal/gdb/testsuite/../../../../repos/binutils-gdb/gdb/tes tsuite/gdb.base/longjmp.c, line 69. (gdb) And for Ubuntu 22.04: (gdb) info source Current source file is ./setjmp/longjmp.c Compilation directory is ./setjmp Located in /repos/binutils-gdb/gdb/testsuite/gdb.base/longjmp.c Contains 82 lines. Source language is c. Producer is GNU C11 11.2.0 -mlittle-endian -mabi=lp64 -g -O2 -std=gnu11 -fgnu89-inline -fmerge-all-constants -frounding-math -fstack-protecto r-strong -fno-common -fmath-errno -fPIC -ftls-model=initial-exec -fasynchronous-unwind-tables -fstack-protector-strong -fstack-clash-protecti on. Compiled with DWARF 5 debugging format. Does not include preprocessor macro info. (gdb) b 69 No line 69 in the current file. Make breakpoint pending on future shared library load? (y or [n]) n (gdb) There is a small difference in debug info (dwarf 4 for 20.04 and dwarf 5 for 22.04), source file name and compilation directory. What is strange is that gdb's 'info source' output seems to refer to the glibc longjmp source file as the current one. And the compilation directory is also glibc's. The "Located in" field is from the testcase source, also named longjmp.c. The "Contains" line is also based on the testcase source file. Investigating further, if you "list", it will output the sources from the testcase file as well. Finally, for 20.04, the "break" command will use the testcase source file, but in 22.04 it will use the glibc source file. I'm guessing the fact that glibc's source file in 20.04 is also called longjmp.c makes it work somehow. But in 22.04 the glibc source file is now ./setjmp/longjmp.c, and I guess gdb now attempts to insert a breakpoint in the glibc source file, which doesn't have line 63. So it all goes downhill from there. I'm not sure if this is a long-standing bug or if it is a somewhat recent regression. But gdb seems to be genuinely confused about which source file is the current one and which one to use for various commands. I'd expect gdb to pick one and stick with it, but it doesn't seem to be the case. Maybe we just uncovered a new bug with source handling.