From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2051.outbound.protection.outlook.com [40.107.22.51]) by sourceware.org (Postfix) with ESMTPS id C37AD3858C50 for ; Thu, 9 Feb 2023 10:37:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C37AD3858C50 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=DLJ0fxL1K6QzKUiCr91w22x6T+EhNa7ZVaXwu0J/mxI=; b=hooROac29dvYFQUq2KTbn136xJkSWdCKf8OgUFK3YIHESnrB3EerIUaQcgVTjALsEbRmSRqpowUKFkhIe67TeVabX1QELm1VmNOwssD0oGYhI7tl+asic2vVSWWue3FUqusI1O8I5AmKmGzF2S3QmbuhpSYVy+fsk4pqag2nz6E= Received: from AM6P195CA0066.EURP195.PROD.OUTLOOK.COM (2603:10a6:209:87::43) by AS8PR08MB7792.eurprd08.prod.outlook.com (2603:10a6:20b:52c::6) 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 10:37:48 +0000 Received: from AM7EUR03FT032.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:87:cafe::1e) by AM6P195CA0066.outlook.office365.com (2603:10a6:209:87::43) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6086.17 via Frontend Transport; Thu, 9 Feb 2023 10:37:48 +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 AM7EUR03FT032.mail.protection.outlook.com (100.127.140.65) 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 10:37:47 +0000 Received: ("Tessian outbound 43b0faad5a68:v132"); Thu, 09 Feb 2023 10:37:47 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: d2e05ce5303d5f14 X-CR-MTA-TID: 64aa7808 Received: from eb00bc0fca9d.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id AEE8FE9C-86EF-4F99-8F81-D2E3A8F4DF45.1; Thu, 09 Feb 2023 10:37:40 +0000 Received: from EUR05-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id eb00bc0fca9d.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 09 Feb 2023 10:37:40 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZO/PoYMDYq39BTmY9SIfRK22XqSo3rWzSC1ud9ELAtJ+S+lELGh9RjkVOS4WojpYboIu23ZCWeDBaYtkEGxSDHExRGa1kpqbZms6F1mkrH3Q9rIAiPmeilDscZaUZWy4haRBXNFZJUDvoCuTGKhAJnHkdqhzhonsGJwR0CMAN6OrurgrjHUTNTOc9OKHcSmZqtOFCHsVdmei23BnYTgT/IvWtud5vW8wzlzPsfS8ukySOZ52jK3CVmMDev/qAHCqSRExfhd0M5lR2lyVSQ6cyxWH1zfiPIhIRNmpzlJ+kIzRn/YhSX0Z0CPynLm+2v1fFUrZZvqpMnvaJfqGNhbotg== 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=DLJ0fxL1K6QzKUiCr91w22x6T+EhNa7ZVaXwu0J/mxI=; b=OBn0C4cDh7G/aqed82XTYjSstNHKlRRxIeUrMS00If77WYe/TlT6ZHynzQpD6Adz+JvBHS2zqhwd915VwdCRQb1ZB2ParD+1MzaBGvUfMgu0aeNmzHAcGNcblQbvrRomcMO67OeutMK+cC06SbQ61hHb/uNV41CWLhyKl5zDV2pN9iBVkluRH73PoSdOlMP43pBSeOoaAIyLqQ0iW3ku6bTIYiFXe/LnaDHAw9lhXy6E4kt7SIu0im7TOH4XtuK/ljchAG66Pk/Oa9DOKDEigHChpBqikTGDY+DBGIuxr/SgwoAmOFn2w6wUVQ31ZvdWNf+KSQF3Z2MAJMDDgurSNg== 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=DLJ0fxL1K6QzKUiCr91w22x6T+EhNa7ZVaXwu0J/mxI=; b=hooROac29dvYFQUq2KTbn136xJkSWdCKf8OgUFK3YIHESnrB3EerIUaQcgVTjALsEbRmSRqpowUKFkhIe67TeVabX1QELm1VmNOwssD0oGYhI7tl+asic2vVSWWue3FUqusI1O8I5AmKmGzF2S3QmbuhpSYVy+fsk4pqag2nz6E= 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 DBAPR08MB5639.eurprd08.prod.outlook.com (2603:10a6:10:1a2::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6086.17; Thu, 9 Feb 2023 10:37:38 +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 10:37:38 +0000 Message-ID: <70bee05b-f07b-8fe8-d766-dfbefff244dc@arm.com> Date: Thu, 9 Feb 2023 10:37:36 +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 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> Content-Language: en-US From: Luis Machado In-Reply-To: <53610c56-49e5-643d-b44a-abe70821e7be@suse.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: LO4P123CA0393.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:18f::20) To VI1PR08MB3919.eurprd08.prod.outlook.com (2603:10a6:803:c4::31) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: VI1PR08MB3919:EE_|DBAPR08MB5639:EE_|AM7EUR03FT032:EE_|AS8PR08MB7792:EE_ X-MS-Office365-Filtering-Correlation-Id: 82ade6ad-df2d-438f-587e-08db0a89afdb 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: WwwFLR1n7r8YOf5sgCAbgKBae2sHlVxJxnWRTt15uzV81s7FC7dpEzSJCHfHd66p7K9uusamU7IfoY3+6fG+DkLB7d8I2WcZGPGbYxMM3vrttU5WQLkf0oQAdnB7L54mtxO47iyvbrWy4aGd7NxsXBBCQ+ZegR7MK2GCMvZrENtiRTfWY/k4k24/0Lloe+p3K9jPlGtnAPm27FQcNFjUypaN2DNg7NvoDiZ3tutU0zuwW7B830QruD8DNo7y5vhBPhNNGF+ddErqTxm14p0YsH93n7YSh9oXKYgF/f6zZtfIBm37whOz0InfgtQoyxaZvGYsWTocRKoMMtoqdwyqYcBffZzOVPUsbba8n0xEWLGR8iK5sbpdh4+lOMd9jmgRqcZDOxicjY9EdadapBAgNtZkhHRsiNv4fY+rjcmgSZrO97rUrMSEdWYLukzp5gXlULqO8Nq27UyjkML9SClUJX2+0HgYMcZjbsEhRlo+TXhUO/HCM1Y/7Up3gwk3hmLbzMzOInn7GAibB9GM2ps2C7yFKr2MjinwkYUKSpnOzRe3xOHaAuC/J8tLmtNVx1cybrRHSns5uAf6sGmFL61K3h/c6WQmFwixDDnmGsFWX8QOAnQrEmpdKNTstBWX73JOCDfkqKOdgPZm9jXd69vNABTYY55sur3RBlXfoNsc+6ErcDDCpZ6veyORuw8cl8hBSCle0dxsXI0aUviaC0qUQcbR2Hci+G9xd8m8gvpp/S8aomi2T3nPgrIP1vrviFVqPEk1iVA3EzMzNK1SOFJJZXJ1kJzrdKjeyXjS8J3ptmQ7KxXD6/hhi8pg+7isPY8v 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)(136003)(376002)(396003)(366004)(451199018)(19627235002)(53546011)(6506007)(6512007)(26005)(186003)(316002)(8936002)(2906002)(5660300002)(36756003)(44832011)(86362001)(478600001)(6486002)(31696002)(66476007)(66556008)(66946007)(84970400001)(41300700001)(31686004)(8676002)(38100700002)(2616005)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBAPR08MB5639 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: AM7EUR03FT032.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: a4d36712-0905-479e-d6bb-08db0a89aa02 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 3AUVKFdkEtLtZFjvZNAD44NHxDwbRVL0su3kogPs+1iD6isjylE2s7UDDajNoPI/uFY4wsxIb2dyzDpoCQspyg4DH5QvC13tUqAfs+9SdpqaPhijb4kFJTWQVpirufr1CloZW2pgSrigyoeb/gB1li+ziyNl4DGrZmtwH1KhLz8PL59INVclyVfNdW23CHKXXiz4ZgOJl8qj/nVeDD94TERCYdGgVqyZcuJXqZM6Wv4Ftfj9iEjXCnWJX0BRREqv0NKYNTa47rcQUfh5Jbw0vV86VnnP4V97KxEUyVKlebNc1XoeXUDrGmY2KmxPgAGCDjKF7eEuhJ2Li54ylJTVJKeOo2s6uIGAGkyrwf+qZpv24PhIjuGCfqWoE0B4c3yg21SOWEAg1bUuLDR8OjoZtFg/+PvmseCX0wqNwIpsB2LnPEIBykc7UrZ6z4PZ114oca8HmbRSMINuPLdqkG07QeuMH3K0rso844O9TmTCttOEVzfVB0l+dhs6ZIFzoVXTPNrrK/hWLPqUSxsZB/dJWlJxGedggaXcaWj1L5Mju1RAgHJqn6kvL306sJu4EhMKzcX28InUJVfFcbRontTpPfvtaxUZdD5ME+WG+/snjVHootWl3d8nu7l/mxfOw/+bzth61VO9xTUc7wnq+FA+k7IAPeR0Kj/WK3X8AcYuaxrDbvh/kXX2p/OQzQqdPaktelt1a4/2XsuyzhFZ9lZv8QuH7RVM3i904E/uOEdW7Pxu8K0+Aj1a7gf9VYNxsYu8XYEfD5CasYZ6X3+YfFXbHxMB8AHIfr6oBPQyvIdyeX/TtU87iw/HKTFeIH2mE/0C 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)(396003)(346002)(39860400002)(376002)(451199018)(36840700001)(46966006)(40470700004)(36756003)(82310400005)(2906002)(40480700001)(6486002)(478600001)(36860700001)(6506007)(336012)(26005)(53546011)(2616005)(6512007)(186003)(8676002)(47076005)(41300700001)(70586007)(40460700003)(70206006)(44832011)(31696002)(5660300002)(86362001)(8936002)(81166007)(19627235002)(82740400003)(316002)(356005)(31686004)(84970400001)(43740500002);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Feb 2023 10:37:47.8367 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 82ade6ad-df2d-438f-587e-08db0a89afdb 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: AM7EUR03FT032.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB7792 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/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. > > Thanks, > - Tom