From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03on2040.outbound.protection.outlook.com [40.107.105.40]) by sourceware.org (Postfix) with ESMTPS id 6E5B43858D28 for ; Wed, 18 Jan 2023 14:23:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6E5B43858D28 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=TLtKPR3cUMp/UeyUKtYs2yzqfpGRsOW+yQbiKOTNEpM=; b=DYBik7IckbrMdxAx8gF6hGO/fmvbK97SFzombw5pCzREvfYW3R90ulEzLLPkkst72jmHYEV4RTOcDiK3pFBTZqFHfHZCDWYqAa6QhSaEF1U+P+PGqKXGRfLjYUzbiqoF2HuombC4M47RS2324AZxatiXq+wk1eHM8e4zta1RN2w= Received: from DUZPR01CA0186.eurprd01.prod.exchangelabs.com (2603:10a6:10:4b3::15) by DU2PR08MB7357.eurprd08.prod.outlook.com (2603:10a6:10:2f0::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.24; Wed, 18 Jan 2023 14:23:00 +0000 Received: from DBAEUR03FT009.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:4b3:cafe::5d) by DUZPR01CA0186.outlook.office365.com (2603:10a6:10:4b3::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.19 via Frontend Transport; Wed, 18 Jan 2023 14:23:00 +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 DBAEUR03FT009.mail.protection.outlook.com (100.127.143.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.13 via Frontend Transport; Wed, 18 Jan 2023 14:23:00 +0000 Received: ("Tessian outbound baf1b7a96f25:v132"); Wed, 18 Jan 2023 14:22:59 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 2fcba36ca1c53691 X-CR-MTA-TID: 64aa7808 Received: from 9b8396a50dae.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 17905B6D-00FA-4FF8-91E3-9E44C23F1318.1; Wed, 18 Jan 2023 14:22:54 +0000 Received: from EUR04-HE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 9b8396a50dae.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 18 Jan 2023 14:22:54 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iMgKFduj/58Z7LKw3lFoSbODzQAf2srN4ktTr+t61L9Q4XsXXM5eGy/VJgNLhlJ+N7FNYwahOhVt31VFWYxQpuGO9q3dsmFnQY6ch2NAYUjfX4mJ2+stU9VTHlqP962fWUXMOA0RIFQuiXp4zZVW75wEWWKA47LJixW8XyZ0C5DviY/JGP3smmOjmMB/SUY3CbsPID0ylCLGRSGKm7XcpJamoEsmH1xbLbDM2u3FYHg5RZAyrfqPKRSOkH7vsKg2P+DGFjUou7tYB86ADxKxm886zF98JKMvm3ErjoqHhAXVnuhfwEdbsbcoF5HIjzHHgDyT7EWj0IhZgxt3df+2Aw== 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=TLtKPR3cUMp/UeyUKtYs2yzqfpGRsOW+yQbiKOTNEpM=; b=ZYCIbkWsf3eRMO3XZVh29/mnoXtQaiqg5iXkCTQNVgz1nb3cMkEbCcD8nkEpdJE7XS2b7xfwh3kHWlyzXlyXE8YzBZW7MWcheXGQqLuKcQyrDcpIK2ZQGg3Fd+qTMuoLQO8sJOWxqfpHYc+JBgvfqUnrPga6c78EkUeRf5DOkIdob05FiVIq+DJ2b0wlkHq1WdYCN/rspleLRqh1xyrgE+AtAzVy3tJYnK5dsEJOKlH4ktYew0mMLRE0oxzoaN2W588KQsZ0+amcdZWLT1CjqKrVdhnuQkp2pjA0rQLAybK4PdT/qpu5hi9zGeKRgSb69XlT0TUbb5+Qg5M3CB1UZw== 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=TLtKPR3cUMp/UeyUKtYs2yzqfpGRsOW+yQbiKOTNEpM=; b=DYBik7IckbrMdxAx8gF6hGO/fmvbK97SFzombw5pCzREvfYW3R90ulEzLLPkkst72jmHYEV4RTOcDiK3pFBTZqFHfHZCDWYqAa6QhSaEF1U+P+PGqKXGRfLjYUzbiqoF2HuombC4M47RS2324AZxatiXq+wk1eHM8e4zta1RN2w= 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 AS8PR08MB10347.eurprd08.prod.outlook.com (2603:10a6:20b:57f::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.12; Wed, 18 Jan 2023 14:22:52 +0000 Received: from VI1PR08MB3919.eurprd08.prod.outlook.com ([fe80::eed7:25a3:e4ea:187a]) by VI1PR08MB3919.eurprd08.prod.outlook.com ([fe80::eed7:25a3:e4ea:187a%6]) with mapi id 15.20.5986.023; Wed, 18 Jan 2023 14:22:52 +0000 Message-ID: <90ba687c-952f-9fa8-b6d4-90d9735621a8@arm.com> Date: Wed, 18 Jan 2023 14:22:51 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: [PING] [PATCH] gdb/arm: Fix backtrace for pthread_cond_timedwait Content-Language: en-US To: Jan Kratochvil Cc: gdb-patches@sourceware.org, Alan Hayward References: <8bcfa5a5-ed74-db8c-ce4b-0fad472cb486@arm.com> From: Luis Machado In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P123CA0238.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:1a7::9) To VI1PR08MB3919.eurprd08.prod.outlook.com (2603:10a6:803:c4::31) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: VI1PR08MB3919:EE_|AS8PR08MB10347:EE_|DBAEUR03FT009:EE_|DU2PR08MB7357:EE_ X-MS-Office365-Filtering-Correlation-Id: 89923f51-46bb-4263-d2e3-08daf95f808a 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: hel70vAwAlS2tkhr/nPyxbkPtdc6rAQt6guNwZSW5Chw87BnDVpel6C89INz58Dyd0DaNoYVxjDCYgLi3W9NlLj8H34CXSG+SaL59nrRiGoDfPPaf9ucpZOWjDISJS/SQt0Z/3mMWnVt6cB8YQnM8xpJW/nK3rlAMmDEnE9tgCrNF3LOC38a58HOWEK2fMzut4O4hY769UohM3rzkRXkHcqbP/9AaoyNAncCRoCPIPdGhFcCzn7HETNTCERozQWYEzHAvHKrLfe0VnExuRffodYRzVt5kRPuYLfCY+InnkugmB1Fjo5boWOcMensWydGHL659RM9kfJm2L90AQ86SGo/ZIUwdjfp1MrMYPRwkqmkAwFzIS/E/duAFIjFThNSukvXYdWcNNRPMr99rpOdgav0LNMboPgG3wbdxWjJ8m72Th9oEbBTjuVor+lE3N52kVGQ3sH/387Wu/Aw8iOiSFUWlHsFIkO8SjVeWlCT6GfkJ6MLTw5s1HWhJxm+3kFSeLgD7EIqTEl/vuWlz+IIKfzGpvpLiYieyi0e4tVfciUq5COFj7wS2XmfOdJG+W3iwsS0aYySjG/wl/g5a+Vx69qksYlQ4/gE4Tsr+MRrSiMNSowdj3X9z9u5lbFeFs/+fbWOIitkSEJ/i4B2FbUCFoyGqzNg5AUux37gJWmFodBJZiNbBgGfR2saiQ/v9UAKX4IggdtPC4R9Iv+kGY9vFI5VwEuKoF5PGqYXMnEvHGMgRGdvDWEOigrfHh7GFu0o 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:(13230022)(4636009)(396003)(376002)(136003)(366004)(346002)(39860400002)(451199015)(36756003)(4326008)(8676002)(66946007)(66476007)(6506007)(66556008)(44832011)(6512007)(478600001)(26005)(5660300002)(186003)(53546011)(6486002)(8936002)(6916009)(316002)(2616005)(41300700001)(2906002)(38100700002)(31686004)(31696002)(84970400001)(86362001)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB10347 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: DBAEUR03FT009.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 836b3743-b022-44ef-39a2-08daf95f7b7b X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 9/E/EDp4jehTttvj2iI3FSij1lvcTKgVn/stV5//JGElcKTdkSgSy8TI/2MCUvmieR6EKZ+IzaRytU+U/pGgsqG8r6n2TDdhSxhQh3FrErfWMIbEJ4v0ZBgPpo2xG1F6w7ugzsJaca9Lr8lPxJwBf+sQ+IZBVu/8p6qUyksa0SsKAGwwdwEvt9xztzglb6Dg18IoSi7IZraQZhZxuGPfYjywvwN7hQiyejcQGBiEgjNGUI7vPlNKsENMepsgvU3zbi1WKu8p8YVe5ZAz94AcsbJ94HfdMq9GHDessOJ5/l/oGI/sFlSMQOAWUQubBzhOEe0ySWQpsGYOuZOj33aHOs0ObPh5y2lW0S4ceuyMcJBku53Aqj0Rn/nyDVegGfngcqFGb1EFngInWH4KbylrEnphwvK47vQxQ2/1v46ESHewVOdg3yIpbq9ZIRuIdIXD3wQC49vWdqFlIz6I2aXMeQiZDKUNW1eE4hiTbOl4sNV2coFvVVOJFCJqevbm8EkXcQfpjeHrcplseeyrOmbbQVjntHYUEHzFfEdiTpN86jPI7WtdgY/svjhVDl6reS/HkjGKDD45JgQp9BZ8KVPiNpVRf5fF5ZIi3lK8Tt9hKSBK7HnRdZCkptgrPLL3gdLK8fkzF2EKXuM5ugGnHbpUcwHNESsfv3O3RhM6Zu5TDnvPANyTyffjhgCEIT8AsjfODClYcSD7+J0gFlyt5fhuh+XlYp45WfCnITxkFg6weWghsUcsSbNGrKMVHmbZUm+1fN/PxGzrbUbASdvebVV1Nw== 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:(13230022)(4636009)(39860400002)(136003)(376002)(396003)(346002)(451199015)(36840700001)(40470700004)(46966006)(2616005)(6506007)(84970400001)(6486002)(316002)(336012)(186003)(26005)(6512007)(478600001)(53546011)(31686004)(81166007)(47076005)(41300700001)(6862004)(5660300002)(8936002)(4326008)(8676002)(44832011)(40460700003)(70206006)(2906002)(40480700001)(82740400003)(356005)(36860700001)(36756003)(70586007)(82310400005)(86362001)(31696002)(43740500002);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jan 2023 14:23:00.0137 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 89923f51-46bb-4263-d2e3-08daf95f808a 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: DBAEUR03FT009.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR08MB7357 X-Spam-Status: No, score=-6.2 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: Hi Jan, On 1/18/23 11:51, Jan Kratochvil wrote: > Hi Luis, > > On Tue, 17 Jan 2023 19:14:01 +0800, Luis Machado wrote: >> I see the same results with a patched and unpatched gdb: >> >> PASS: gdb.arch/arm-pthread_cond_timedwait-bt.exp: successfully compiled posix threads test case >> PASS: gdb.arch/arm-pthread_cond_timedwait-bt.exp: advance to break-line >> PASS: gdb.arch/arm-pthread_cond_timedwait-bt.exp: thread 2 for svc check >> UNTESTED: gdb.arch/arm-pthread_cond_timedwait-bt.exp: pc points to svc >> >> Do you see something different? > > Yes, on Raspbian 11 (bullseye), Linux version 5.15.32-v7l+, Raspberry 4. > > What OS do you run? I'm on Ubuntu 22.04/20.04, but running 32-bit on a 64-bit system via Docker. There seems to be a divergence in the expected pattern of the svc instruction. I see the following: x/i $pc => 0xf7eadb04 <__libc_do_syscall+4>: svc 0 The test seems to be expecting a pattern of x/i $pc => 0xf7eadb04 <__libc_do_syscall+4>: svc 0x00000000 If I replaced the pattern to force a match, the test continues until the unwinder check. Then it runs into a UNTESTED again because I see the dwarf2 unwinder being used. That may be because I have debug info installed I suppose. I wonder if there is a way to force gdb not to use the dwarf2 unwinder for libc, even if it is available on the system. > > There is the unfortunate dependency on system pthread_cond_timedwait() > implementation. The testcase could provide also its own .S implementation but > then it could be incompatible with the rest of system glibc. > > > Jan