From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2069.outbound.protection.outlook.com [40.107.22.69]) by sourceware.org (Postfix) with ESMTPS id 8425A3850854 for ; Fri, 17 Mar 2023 17:29:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8425A3850854 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=PNFYKfL87zW+M+pc5QIzUMw9RVv6cRn2g4QyVwvZuuk=; b=dXoO7rf1nznjWE2HJB8O6yCZgWiI44Wa06SYzmtmBc6shtqhN6ebm6GnTRdgN1K1R+ox+Oll/F8NpwHZ/gYUu6KJ1VRHY3AEJyS33qltxOEJyty5kHT3dBXryHt2QI/WqpblNnio0Nh0YaiAOKCy2JTrR63M71/Lgs45oqHfXpQ= Received: from AM6PR0202CA0062.eurprd02.prod.outlook.com (2603:10a6:20b:3a::39) by DB4PR08MB8175.eurprd08.prod.outlook.com (2603:10a6:10:381::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.31; Fri, 17 Mar 2023 17:29:48 +0000 Received: from AM7EUR03FT037.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:3a:cafe::c3) by AM6PR0202CA0062.outlook.office365.com (2603:10a6:20b:3a::39) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.35 via Frontend Transport; Fri, 17 Mar 2023 17:29: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 AM7EUR03FT037.mail.protection.outlook.com (100.127.140.225) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6199.20 via Frontend Transport; Fri, 17 Mar 2023 17:29:48 +0000 Received: ("Tessian outbound 2ba0ed2ebb9f:v135"); Fri, 17 Mar 2023 17:29:47 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: dec217c7b7e5166a X-CR-MTA-TID: 64aa7808 Received: from 60e7af832412.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id FED0541C-D48F-4B18-9537-27827C71382D.1; Fri, 17 Mar 2023 17:29:40 +0000 Received: from EUR01-VE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 60e7af832412.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 17 Mar 2023 17:29:40 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SEmkxPNjEoiZ2f40Yt+KLMwXOCvD/PyqqIRLZ+h18SjIYiSt3lhjd6MBLdAu1Fs4MnYTaAGJmC8wiei1qjTaG/fifRchHedYbFF5/0nIlkUW1nmtwS2yD3y7pUZWPlb3+c0ixnnp1rVw8QyV3c1/dD43089s86XM8/FKlTScqOeTmhwSfY/zemrG0R9AyJ1EAj1VXZU+zBRw4H0vFVR3zu4/rSjC2ZM/K5x+8MbGryZxpgDPPihEi0sLHVoaGjgoPLPZxXHl43qRCCyjmiSki70rLHLhJzSwo/3PFaBiIgEtAp7IHihnj981Wpth5nVM5btSVmqcg2Kfh8i/SKhokg== 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=PNFYKfL87zW+M+pc5QIzUMw9RVv6cRn2g4QyVwvZuuk=; b=eXYUMIMbRsATCZ41JZMurri6+teHf77IR1DFf5sNTzlLiuTq9Ywng606o+XvTZUaxl72UCFGGcMijYpwNJoZ+UZmLUdQe/tu1fiqMk6YrHQy5nHiQrQnG8/C75fS6FxRgfhrj+OKkgzYKoBtH5oVZqLB/6zGKQlvJ5a0rz+gcPdHjiXXg+anIjUVzr9XLOtcZn2V4+5ghdVQFEXnLpdki8IlZVcPO+9k2sAb+4knQ97bEJi7ZvPBl4MDtjbnvjQzOf5U3DQMZH554EF2NNWqaQjngZIis20J7Mn7nmTFcK2BjVy+4/pDvnJSZW1arvTJI8bJXeU8abYmb2xSTOltcw== 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=PNFYKfL87zW+M+pc5QIzUMw9RVv6cRn2g4QyVwvZuuk=; b=dXoO7rf1nznjWE2HJB8O6yCZgWiI44Wa06SYzmtmBc6shtqhN6ebm6GnTRdgN1K1R+ox+Oll/F8NpwHZ/gYUu6KJ1VRHY3AEJyS33qltxOEJyty5kHT3dBXryHt2QI/WqpblNnio0Nh0YaiAOKCy2JTrR63M71/Lgs45oqHfXpQ= 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 PAVPR08MB9354.eurprd08.prod.outlook.com (2603:10a6:102:301::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.35; Fri, 17 Mar 2023 17:29: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%5]) with mapi id 15.20.6178.035; Fri, 17 Mar 2023 17:29:38 +0000 Message-ID: <070fbd13-e03c-a4e8-1372-3f7813b7db92@arm.com> Date: Fri, 17 Mar 2023 17:29:27 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Subject: Re: Slow "symbol-file" when using GDB 12.1 on Windows hosts Content-Language: en-US To: Adrian Oltean , Adrian Oltean via Gdb , Eli Zaretskii References: From: Luis Machado In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: SN7PR18CA0022.namprd18.prod.outlook.com (2603:10b6:806:f3::21) To VI1PR08MB3919.eurprd08.prod.outlook.com (2603:10a6:803:c4::31) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: VI1PR08MB3919:EE_|PAVPR08MB9354:EE_|AM7EUR03FT037:EE_|DB4PR08MB8175:EE_ X-MS-Office365-Filtering-Correlation-Id: 4765bf9a-25c2-4e4e-6ab5-08db270d3522 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: jyI3G7cRvssaPkWZMf1vXFSqCS8yoiU0SlD++OmOHLfsuknfQ179P+F/S0OXZNT2hrFY915laNXge+tr8pTj+LB5ig7PO99HZLgWLATchFPR1U42e1wg+bhElo2CjxCRLmXhLuKF4W9yxRwJgDg4Td6b+WTAuU/uoXt4AjYoJRKBIs1afWPixPJ5KXGet6cC6N03HrUNGCUhhnaiyQBr/PJqAZoHYbzVeg8Yjy4Svj+TMRjcMySL2Ax4dK5sHPFspzByY/9Ycq99c59L2EUWx2D8UC4q+tThWfEdk4/G/a4DuZfVMYZBUlUNIAjcFncrlBstNBLbqKbOUzyRDc9R3PXfqsvX1lEpN+afNUiQOUZq5ISPGno7XapVCycl2kBjfJHM6JKF5xOxH5tWNBnfksGT5bxYhbd+N/H3VnnANN9gaFzol8OMk+2U8FcXlBnGbO6RjUMMBdf3xuwEAqctc8DIpzmvXqhEmWNDOmFyrRYdVamZWkkdl45rWXz8Po2eBDDLN+BuatXAIAYOUW0QorUfj5iE+dBrnxJaY9xEW4kHgpqhBJqfJLfVAOKw+O6gZMNTLkwV7YPmcFoPb2cgL5yWJzKuSnGfK7lPdLPsruYS/HpcRpiChWpKd4JDNFH/S7zzj/ykexacUPlaf7CJ9UTg4HN7qwlHqudR8W1ZO3n0InpaB15g3DJZxzD8irHLygIMwFXoL2aOS5NLhhAS8C8zJaI63sN+N7CRKb/Ztw3yikOLFq+GXlmJsTqe/OG1 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)(376002)(366004)(396003)(39860400002)(346002)(136003)(451199018)(8936002)(44832011)(5660300002)(41300700001)(8676002)(86362001)(36756003)(31696002)(38100700002)(2906002)(6486002)(6666004)(83380400001)(478600001)(186003)(2616005)(26005)(6506007)(6512007)(31686004)(66556008)(53546011)(66476007)(66946007)(316002)(110136005)(45980500001)(43740500002)(460985005);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAVPR08MB9354 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: AM7EUR03FT037.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 1ebfe32c-0644-4ac7-8fb1-08db270d2ec8 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 46g45RLhHt4sV8hLpp4f+D4hOe3fzZVdrL0cVRmjYXPG07dqAqlekp8DS+8+mII5yy/cTg+k0XX71pE8Ubxn5yHYppsgwqPChHlLu2tG/qmCGSmFxfSFjEp4VjZezfOG/zEB4w7wdSsGxsEknytYyBUQOzMrmOJd2JKnki5gitkPr0GuHsBxyJ9WsZ9c+qLHT1nFBB7mEUf+aylJQNYBxsplUi9GygauO+JOa9t6heju1FKUNFvkTaCRqyOVC/Tst94+XNdCDJpgfgQl097uVpB50Ho1vO7bpSZwiZ2HMYM+ij+hNXnqRDF01Voq6iEZGadZIU0otDSfD7b60fU0lBg9/2zUMnrNdWtNxTKfD/ec07C1JEL3KPVwNhCYXNtwXfEtO5y/IV3t8IWu7vFEg/B2eTwXwJrIg6NdZ8mYe8pAnxNcVVmYFL4+fc0KX7GuKdOUW3EU8NLJAZysW3Ltg6S4U1ebMwAHe76NLfg5ZCg9pC4rP9r7eYsb9FxaqqpG612yQl3rhK8rk9h+XqPBMivPlZIZlsP2b8WhuS7c/+w8ib+F31vjkO4HbKjBQPu3+2ywsWBRrpM4nfuRHOXbxA1Je6pCQDBEmTY88kO8S3TGURN3L4zjvZ5YHSrQV2d1CshODAhnjXvXknuCk0ETiRmXlWWh6bsyGs8M6tlEqgc+SQKi9NkdxXf4h1B1xLO9W4oRW3QZ5MzBRSn8isXwHJ4JpfZ40H4eBMh7TeyLgYVC8Fqu06gs8j21sjaPMDBnOowjkMK8/n65UmRDJraOgw== 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)(346002)(39850400004)(376002)(396003)(451199018)(36840700001)(46966006)(40470700004)(31686004)(40460700003)(2906002)(36756003)(8936002)(41300700001)(5660300002)(44832011)(36860700001)(31696002)(356005)(86362001)(81166007)(82740400003)(478600001)(70206006)(6666004)(70586007)(40480700001)(6486002)(8676002)(82310400005)(26005)(336012)(47076005)(83380400001)(110136005)(316002)(2616005)(6512007)(6506007)(53546011)(186003)(43740500002)(460985005);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Mar 2023 17:29:48.1625 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4765bf9a-25c2-4e4e-6ab5-08db270d3522 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: AM7EUR03FT037.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB4PR08MB8175 X-Spam-Status: No, score=-6.5 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 3/15/23 15:50, Adrian Oltean via Gdb wrote: > Hi, > > We recently upgraded the GDB version (from 10.3 to 12.1) in one of our IDEs and > found a painful performance issue on some Windows-based machines. I used > Process Monitor to identify the events that occur during a "symbol-file" invocation. > This is the command that now (GDB 12.1) seems to take ~2 seconds in the most > favorable case, and ~20 seconds in the worst case (on some machines). Note that > this happens with basic/small ELF files. Moreover, in GDB 10.3 execution of > "symbol-file" is almost instant. > > The relevant list of events reported by Process Monitor is the following: > Time of Day,Process Name,PID,Operation,Path,Result,Detail > 43:02.7, arm-none-eabi-gdb.exe, 13604, ReadFile, C:\MyIDE\workspace\MyProject\Debug\MyProject.axf, SUCCESS, "Offset: 272,405, Length: 512" > 43:02.7, arm-none-eabi-gdb.exe, 13604, CreateFile, C:\MyIDE\workspace\MyProject\Debug , SUCCESS, "Desired Access: Read Data/List Directory, Synchronize, Disposition: Open, Options: Directory, Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened" > 43:02.7, arm-none-eabi-gdb.exe, 13604, QueryDirectory,C:\MyIDE\workspace\MyProject\Debug\MyProject.axf.dwp, NO SUCH FILE, "FileInformationClass: FileBothDirectoryInformation, Filter: MyProject.axf.dwp" > 43:02.7, arm-none-eabi-gdb.exe, 13604, CloseFile, C:\MyIDE\workspace\MyProject\Debug,SUCCESS, > 43:02.7, arm-none-eabi-gdb.exe, 13604, CreateFile, C:\MyIDE\workspace\MyProject\Debug\Users\MyUsername\Documents\MyIDE\workspace\MyProject\Debug\, PATH NOT FOUND, "Desired Access: Read Data/List Directory, Synchronize, Disposition: Open, Options: Directory, Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a" > 43:02.7, arm-none-eabi-gdb.exe, 13604, CreateFile, C:\Users\MyUsername\Users\MyUsername\Documents\MyIDE\workspace\MyProject\Debug\, PATH NOT FOUND, "Desired Access: Read Data/List Directory, Synchronize, Disposition: Open, Options: Directory, Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a" > 43:05.9, arm-none-eabi-gdb.exe, 13604, CreateFile, C:\Windows\CSC\v2.0.6\namespace\lib, NAME NOT FOUND, "Desired Access: Read EA, Write EA, Read Attributes, Write Attributes, Delete, Read Control, Synchronize, Disposition: Open, Options: Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a" > 43:05.9, arm-none-eabi-gdb.exe, 13604, CreateFile, \\lib\debug\Users\MyUsername\Documents\MyIDE\workspace\MyProject\Debug\,BAD NETWORK PATH, "Desired Access: Read Data/List Directory, Synchronize, Disposition: Open, Options: Directory, Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a" > 43:05.9, arm-none-eabi-gdb.exe, 13604, CreateFile, C:\Windows\CSC\v2.0.6\namespace\lib, NAME NOT FOUND, "Desired Access: Read EA, Write EA, Read Attributes, Write Attributes, Delete, Read Control, Synchronize, Disposition: Open, Options: Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a" > 43:05.9, arm-none-eabi-gdb.exe, 13604, CreateFile, C:\MyIDE\workspace\MyProject\Debug, SUCCESS, "Desired Access: Read Data/List Directory, Synchronize, Disposition: Open, Options: Directory, Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened" > 43:05.9, arm-none-eabi-gdb.exe, 13604, QueryDirectory, C:\MyIDE\workspace\MyProject\Debug\MyProject.axf.dwp, NO SUCH FILE, "FileInformationClass: FileBothDirectoryInformation, Filter: MyProject.axf.dwp" > > I see attempts to read files/folders that aren't actually present on my machine. Also, > a folder like "C:\Windows\CSC" (see "C:\Windows\CSC\v2.0.6\namespace\lib" above) isn't > accessible on my machine without admin privileges (I don't have this, according to > company policy). I observe that an attempt to access such a file/folder (or a network-specific > path) hangs GDB for a few seconds. Questions: > > 1. Is GDB trying to find debug symbols in all those folders? Or what's with them? > 2. What is the code from GDB that artificially builds all those paths? > 3. GDB 10.2 does not seem to access "C:\Windows\CSC\v2.0.6\namespace\lib", nor > "\\lib\debug\Users\MyUsername\...". Is this related to a recent change? Can someone > point to the relevant change in this case? > > 1. Is there a command to stop GDB from attempting to access those files/folders? > > Thank you, > Adrian I vaguely remember Eli ran into Windows-hosted gdb slowdowns before, but I'm not sure if it is related to what's been described here. Eli?