From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR02-VI1-obe.outbound.protection.outlook.com (mail-vi1eur02on2059.outbound.protection.outlook.com [40.107.241.59]) by sourceware.org (Postfix) with ESMTPS id 0DEC33858C50 for ; Thu, 9 Feb 2023 11:59:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0DEC33858C50 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=9+jRz0dWrgfhqGNjswLCzI8JSUO/fA1lfKwa/3czGm0=; b=M8fVceRu6l+jry0t9nZ2Aa9PypxbJsCMvvG4UMWJWW868L4fhcQQci/LAkqdUFLeg3RHBb3APxA8WQWuDoFhMMOmNj3v9j3zg2sia9k2isFMBwloWPy87cd3PtEiMCnDShXIkRiRx+aSmYHWHxruT355jOASL1Ou7zHR+krYHTI= Received: from DU2PR04CA0260.eurprd04.prod.outlook.com (2603:10a6:10:28e::25) by AS8PR08MB6472.eurprd08.prod.outlook.com (2603:10a6:20b:336::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6086.19; Thu, 9 Feb 2023 11:59:03 +0000 Received: from DBAEUR03FT022.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:28e:cafe::a4) by DU2PR04CA0260.outlook.office365.com (2603:10a6:10:28e::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6086.19 via Frontend Transport; Thu, 9 Feb 2023 11:59:03 +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 DBAEUR03FT022.mail.protection.outlook.com (100.127.142.217) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6086.19 via Frontend Transport; Thu, 9 Feb 2023 11:59:03 +0000 Received: ("Tessian outbound 6e565e48ed4a:v132"); Thu, 09 Feb 2023 11:59:03 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 35fb04a45fccd335 X-CR-MTA-TID: 64aa7808 Received: from 14ca5237cbbb.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 56D8511D-EA37-4A9E-8E0B-59A5E6B78781.1; Thu, 09 Feb 2023 11:58:56 +0000 Received: from EUR03-DBA-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 14ca5237cbbb.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 09 Feb 2023 11:58:55 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JQiSyEs2WO8PrDQ73Y9J5U01XvyxPee05bW+YVPytcp8sMUsNL+XGfjGTILdiHQD+p6eVV3xYGARkpI5MIuHxJ6/6TOcxY2MxRrbkVPNMcHxkbwDR33MuzS1QI8uSxtaWZX+yyyo1M0nkngIjG4phgPakw9QzIiBV6W0syfcs7l3Lq0/tpLbjcWDU17wYuTwP1fWdhRe9kJjbOniebaSj9QKU9Q28eDH0JthrPlsZXRmhFZMWcm5Jvdtwch8N3/IyL+sSFkD3oq0tuqT2mpLzqVC0RHREY2Jdb8PJ+k9jH045PE+i6g+jyficxvCy+iFl869x2DIhVx9n6+hbdUlsA== 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=9+jRz0dWrgfhqGNjswLCzI8JSUO/fA1lfKwa/3czGm0=; b=hI3CBFTwj1YYDSkzaVYiwM9FkE2m0WBZQXMwmVPXkK1gfXmMUQ7aJR+/hC9NBeBCExdX/LJtK+N/Un6Qt9Q/D9HXHldkl7dsnrEj8gErOXqmUBasgl2B3ON5+6JhKfEVsDQce+bWpxSOyR1snI/Ob7/EjC8m3ti2pvjnGzcUgffVQr1TIAyBYc6VDHfbntbqIh2EFr9Bqbnpffv2GM8U/EbTTquoMH7g2gb9tIRc6LoG8wr7PSLgXUFmIuuc1XWewAwFPdhUx1gj6W+QOCQrgy992ujvLGv6jwSz2QdUYddaCuU3DbbUC1YodcGF8XPir+eigObUBZT6KBcrjw0JdA== 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=9+jRz0dWrgfhqGNjswLCzI8JSUO/fA1lfKwa/3czGm0=; b=M8fVceRu6l+jry0t9nZ2Aa9PypxbJsCMvvG4UMWJWW868L4fhcQQci/LAkqdUFLeg3RHBb3APxA8WQWuDoFhMMOmNj3v9j3zg2sia9k2isFMBwloWPy87cd3PtEiMCnDShXIkRiRx+aSmYHWHxruT355jOASL1Ou7zHR+krYHTI= 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 DU0PR08MB8834.eurprd08.prod.outlook.com (2603:10a6:10:47b::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6064.34; Thu, 9 Feb 2023 11:58:53 +0000 Received: from VI1PR08MB3919.eurprd08.prod.outlook.com ([fe80::bced:32a3:b77e:90a6]) by VI1PR08MB3919.eurprd08.prod.outlook.com ([fe80::bced:32a3:b77e:90a6%7]) with mapi id 15.20.6086.019; Thu, 9 Feb 2023 11:58:52 +0000 Message-ID: <943e3c5c-091b-5a15-881d-58bf360d2d96@arm.com> Date: Thu, 9 Feb 2023 11:58:49 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 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> <2503e9bb-78d0-52ab-71b3-3c8fe6c9415d@arm.com> <53610c56-49e5-643d-b44a-abe70821e7be@suse.de> <70bee05b-f07b-8fe8-d766-dfbefff244dc@arm.com> From: Luis Machado In-Reply-To: <70bee05b-f07b-8fe8-d766-dfbefff244dc@arm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: LO4P123CA0254.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:194::7) To VI1PR08MB3919.eurprd08.prod.outlook.com (2603:10a6:803:c4::31) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: VI1PR08MB3919:EE_|DU0PR08MB8834:EE_|DBAEUR03FT022:EE_|AS8PR08MB6472:EE_ X-MS-Office365-Filtering-Correlation-Id: 8fda3230-05ca-4ea3-2e0f-08db0a9509b1 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: /eMsNbdF+mVoVXwARdqAMUj3it00+ocMYJZNV6gEQ/RHQsRvnaCacfzfbU3DfychtNimTLHjv9J/Q4+bf+HFFsWZ92taqPz/6HcwD5uB9z0kO3aJW6B61ZVATj4zd3dPReMPFO+wPefUfj22upgAlOqwNix1Y7Ji3DhmVb3wKSDia7AuE0mnO8g9C0JGULclP8rz+cIoYESuG0lyYOWJ/UBWswGWNc4Lt8EtzOsML7xfLqGFL25jOv+inrSYoVCaFQi4w2xiBL4CuDno1u/YYjomVXuPuh6mhFS5v2Mpqd3n1EbJ2RAqaepLmI29u9GZndc8eoRBnTdaUyd2/nmzst2ggFZEmC0rU1jGov99b7jbLl3ffH5pHXSKZ33WeDeMJH4K7u1Wjb/KchND+tqzG3VvGBS8BQbmEe9EyO8fDL/wH2FOwHNJzJ72vxYz3OIsMY0dGkPG72FQFjr1iI2wjdfiQx2aGwNY2B5KI3Pnc1al8/g3Ez3ewxP1saNSSXpCYhGCnBHfngSb9RMomuKvcru3fr+YLI+R7KeZSwoNuFHG8TpYlIQ9oJhi1HKjvXgNedGCKsnAED+3kmXdE6LAwwE4XtHiwcWFT5IBRoONYL3u461ylNFJyV1onP/DbRbpfR8p+b3BriajTCEdr2VHynWcw8tLysgHPgMPrLRqH5oU8B482WlSNuNwBvdV3ysyKri6yN6eQ8YCPxRuqvdaqMinz390ZNU222OtN4DUXJWndKPYTnkeasbM1prMJMFklsGKS3+sNILmpoxLdl2JiqOLGDtJ65hkpX77f7xf+gCJNv3c4OTGk2hDfp/QWcom 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)(396003)(39860400002)(376002)(366004)(346002)(136003)(451199018)(6486002)(8936002)(966005)(6512007)(186003)(31696002)(26005)(5660300002)(53546011)(6666004)(66556008)(66946007)(8676002)(316002)(19627235002)(6506007)(2906002)(41300700001)(86362001)(66476007)(478600001)(36756003)(44832011)(2616005)(31686004)(38100700002)(84970400001)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR08MB8834 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: DBAEUR03FT022.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 41807b38-c507-4bae-0e74-08db0a9502b5 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: xvUhTDakbwY9eMpuqSiHpSgyO7Er35JJlSGXXcOtXbbEbKUl4kLn3yXPj6ISd9ZdRTb8HLT33RFmT/EdMn1bZDazp/G8wJE5+v1lnpyuLBoxyGwbkC1CvdZmFcMSCd/WE2fqjdvYKtw7F6dJN+Bn7cFf9XlAqlKWTe5OclUVOPlG7hcDFkEV7onx3+7ikMuYMKN1HpBEXMW66KOvJIMMCoc6SKr4/sNO7WWjJ3F29o6LZYxH0VUasn5VEedV5hWXc3Gu6NlojU+rvqtF9VH4rYqNh5f9Ui9XFR8qtQx6CXHdDyDHUH74dpN+gQAvbuv0c8ZNslBME2Y1Oh8o+2A/V0NcfhFfWb+Ghnm/EC77fkFd1jA9Mq29vZQH0HUvvsEQY6ba+JEBaT3NTb/A7C8gg3oiMkMqg3KUDYe2LihJLs67zU3jbqvfLISJFDR2/EvN7uEepInL65DbUEQNqLDWgD1EjXewbugY0OMjOofiqTE4+X0031H0aCDVuwVpmg467JmKDEk+TpIGa8oyNJ9g/Z5laiTvZUNsRCzrFFWY0G8ZVLUEgivWQhztGDgC6nZz5vIqACGqJrjbfD5rqjZwjwJYmk4o4vYcFK5nwTaSjC+2qn8nc/1U+FM7YWTJqwo9FafFPqfbUk2dVD0/B3XS5hOLDCS9OlJn7PfloxU13903RZKtS7V7cR5ww637V+g1gYoKzjvwqaD+FLekvXjMSdNL8yqrdeYBjxGuCwflRgFVytnDuU2JNp230qHdNXKRZ84bK+lW/km/ewNTUZ5vBfGgoIi4NUSC0BLcuEFKgZ/hBiXCRxvVSPCrBu7YvvHN 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)(396003)(136003)(376002)(346002)(39860400002)(451199018)(36840700001)(46966006)(40470700004)(84970400001)(19627235002)(316002)(5660300002)(8676002)(70586007)(70206006)(186003)(36860700001)(8936002)(41300700001)(36756003)(31696002)(86362001)(82740400003)(81166007)(356005)(26005)(6512007)(6506007)(2616005)(6666004)(31686004)(53546011)(2906002)(40460700003)(40480700001)(44832011)(82310400005)(966005)(6486002)(47076005)(478600001)(336012)(43740500002);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Feb 2023 11:59:03.1912 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8fda3230-05ca-4ea3-2e0f-08db0a9509b1 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: DBAEUR03FT022.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB6472 X-Spam-Status: No, score=-6.6 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/9/23 10:37, Luis Machado via Gdb-patches wrote: > On 2/8/23 20:36, Tom de Vries wrote: >> On 2/8/23 19:06, Luis Machado wrote: >>> 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. >> >> I suspect the FAILs will disappear if we replace "break " with "break $srcfile:".  I'm not sure yet whether this is a fix or a workaround. > > I suppose. But it seems there is a different underlying issue of gdb getting confused about what is the current source file. > >> >> Please file a PR and attach the entire gdb.log, I want to take a look at it. > > Will do. Looking around I found https://sourceware.org/bugzilla/show_bug.cgi?id=19474, which seems to indicate some confusing cases aren't really a bug. > >> >> Thanks, >> - Tom >