From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from omta38.uswest2.a.cloudfilter.net (omta38.uswest2.a.cloudfilter.net [35.89.44.37]) by sourceware.org (Postfix) with ESMTPS id 74F783858D20 for ; Sun, 12 Nov 2023 23:37:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 74F783858D20 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 74F783858D20 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=35.89.44.37 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699832270; cv=none; b=CjVrHWnoz4wsmFDjvTk+BEH6jK95Pj5ctvZeJ63zDxC+/zeGuzGawUH1saMmluNa/DlTHGly9jlVP4FlTZZ+FQ68rBzoOHMY2DMDM/WNSvqLJJOzT2ajsXDdnauO4KN2f0dz7ePf6pwh7XQJpRu/d4fenWgQHN0HPPUBnozglzs= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699832270; c=relaxed/simple; bh=X+UKpoHvOLZveBKKHFbut1TpXPTIYlvp5AV/HuBkKz8=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=FHSo8139o9lAcFCIa4hCJvYJSsRco+f2iprk7pUl+jYvhiFmAaWCo7hN+aRe4t+bzBQoy12ZeAxdjPHdDx69rCC4Dtph8p9q0fb2UZXUbcjj0R4uGbQKBiK2kRv8QvkB++X4J5IA+QQbAjnDwkWBiCwZaNoN9P3lGHqUsyWK+hU= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from eig-obgw-5005a.ext.cloudfilter.net ([10.0.29.234]) by cmsmtp with ESMTPS id 1oWprPu5FKOkL2K1RrJMpR; Sun, 12 Nov 2023 23:37:45 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id 2K1Qr3Neu1b9N2K1RrTtZs; Sun, 12 Nov 2023 23:37:45 +0000 X-Authority-Analysis: v=2.4 cv=FLYIesks c=1 sm=1 tr=0 ts=655161c9 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=OWjo9vPv0XrRhIrVQ50Ab3nP57M=:19 a=dLZJa+xiwSxG16/P+YVxDGlgEgI=:19 a=BNY50KLci1gA:10 a=Qbun_eYptAEA:10 a=20KFwNOVAAAA:8 a=YSxO9w8Vnu__kQx83zwA:9 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:References :Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=nGwbhWeJoFqpjUqOK5pb0H7Oc/rlV508a95uEYO3jkg=; b=pQsQLw9aooVBFB4ZwSMGgaYReq s8SX2eqQ9+wV5pVLYaq8e6e/JrN5Koz1bb/i0IyDOJKTbCAGZwRUywYxadLcxrhvXhqQXJUwhqK0W x0dSwlxNgm5YJUkO9C/VBk2KW; Received: from 97-122-77-73.hlrn.qwest.net ([97.122.77.73]:48020 helo=prentzel) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96.2) (envelope-from ) id 1r2K1Q-002g9i-1E; Sun, 12 Nov 2023 16:37:44 -0700 From: Tom Tromey To: Andrew Burgess Cc: Tom Tromey , gdb-patches@sourceware.org Subject: Re: [PATCH 1/2] gdb: move all bfd_cache_close_all calls in gdb_bfd.c References: <87o7gjlv6q.fsf@tromey.com> <87r0lc1kef.fsf@redhat.com> <87wmv2k5nb.fsf@tromey.com> <87o7gdvjhi.fsf@redhat.com> X-Attribution: Tom Date: Sun, 12 Nov 2023 16:38:02 -0700 In-Reply-To: <87o7gdvjhi.fsf@redhat.com> (Andrew Burgess's message of "Wed, 01 Nov 2023 10:46:49 +0000") Message-ID: <871qcu1r1h.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 97.122.77.73 X-Source-L: No X-Exim-ID: 1r2K1Q-002g9i-1E X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-77-73.hlrn.qwest.net (prentzel) [97.122.77.73]:48020 X-Source-Auth: tom+tromey.com X-Email-Count: 2 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfKrLG1Rnqh+ftm5onAOGp9LM4RGnpuQJ9su57qQviEwaO0t9G66KHZ3r/2jh1g2TNLMqFwPXX3SlEH0q0uVQfcvyKspKz2jwUh39IMXHOf04La04GEoJ Bl9jAz26FYLmoshA4pPgpIt+8torANYKJ/HhahU6Mz7i/WUp9Q70p//Uh6CJGlyRetSvsHxy3t+120MNR26ZSTRcMWEv8MJy0pk= X-Spam-Status: No, score=-3018.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,JMQ_SPF_NEUTRAL,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE 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: >>>>> "Andrew" == Andrew Burgess writes: Andrew> I'm trying to figure out what I should do to move this patch Andrew> forward? I think you should probably just check it in. Andrew> I guess the existing bfd_cache_close_all() calls could cause problems Andrew> for your background reader if the on-disk file changes between two reads Andrew> from a BFD, and if GDB's main thread calls bfd_cache_close_all() in Andrew> between those reads, e.g. one BFD section might indicate an offset into Andrew> another section, and after the on-disk file changes the section offset Andrew> is no longer valid... gdb already isn't really robust if the file changes while gdb is running, at least not when trust-readonly-sections is enabled. However, the background reader maps most section data in the main thread, before launching the indexer tasks. So, I guess maybe it could happen, but if you are rebuilding your program while invoking "file" you're already exposed to races. Tom