Message ID | 20241017-fix-race-pr-symtab-31626-v1-0-3a53459e9651@tromey.com |
---|---|
Headers |
Return-Path: <gdb-patches-bounces~patchwork=sourceware.org@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 221983858404 for <patchwork@sourceware.org>; Fri, 18 Oct 2024 00:04:12 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from omta38.uswest2.a.cloudfilter.net (omta38.uswest2.a.cloudfilter.net [35.89.44.37]) by sourceware.org (Postfix) with ESMTPS id 80F4C3858D37 for <gdb-patches@sourceware.org>; Fri, 18 Oct 2024 00:02:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 80F4C3858D37 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 80F4C3858D37 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=1729209793; cv=none; b=c5GcgqI+J6+WFDbY/vF7IquVTAJHM6PbyUPc0Zb2Gf7oIhVeXLoXprSh2OBAiyMQjYo2i0QoHASJVbfG+UdDoeE2hpu6esmdCPVbrRJ3YTKBOKhGWPkrb6hK2lzInoDt6ANt9KhdHzuq0LLBqoi8cK2TvkYUKpHS3RZN91YfkW4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1729209793; c=relaxed/simple; bh=4KQTyA2BI2w+V5sUI3/nIjKG1X8cV7DpUoJiVzDOOIc=; h=DKIM-Signature:From:Subject:Date:Message-Id:MIME-Version:To; b=ZvEwqOrFIfnMItmVuYqDqgVKj9XFacYotioF68Kdu4Zs/uMJOa40BR71tVbYNq3O14aNEOZTceomBIcqZDcxgTnvxkTSytBrdNw2fAXPpmq94yEeHUOkqAdP98zsQc/nYwg3gZEGSkAwP38G4hZsDCxrmwjzpSVTYvm2zk379ik= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from eig-obgw-5010a.ext.cloudfilter.net ([10.0.29.199]) by cmsmtp with ESMTPS id 1Tcptl4zOumtX1aS2tpgdt; Fri, 18 Oct 2024 00:02:42 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id 1aS0t4heJNH2w1aS1thAxE; Fri, 18 Oct 2024 00:02:41 +0000 X-Authority-Analysis: v=2.4 cv=a8E291SF c=1 sm=1 tr=0 ts=6711a5a1 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=IkcTkHD0fZMA:10 a=DAUX931o1VcA:10 a=ItBw4LHWJt0A:10 a=zstS-IiYAAAA:8 a=2CEPD9VAQqQiDDKcSSEA:9 a=QEXdDO2ut3YA:10 a=4G6NA9xxw8l3yy4pmD5M:22 a=6Ogn3jAGHLSNbaov7Orx:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=To:Content-Transfer-Encoding:Content-Type:MIME-Version: Message-Id:Date:Subject:From:Sender:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=PmcbkA9Q/cVY2afhtKcsR9PXBfBypgL41CWTAF4QDtE=; b=sxMyM1aA126CP1OVzwTnsbUhJN P9YOsfTD8SPAQi/hBjU/hVX04kNSW6XHycPo2Uq+ONK1XnVMcSQ0bLB1Hgp6rK5aoFjTBOXnuzAIO KKnQGd1Fu4QzRyHyrxUh9WD3h; Received: from c-67-190-86-1.hsd1.co.comcast.net ([67.190.86.1]:50290 helo=prentzel.local) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96.2) (envelope-from <tom@tromey.com>) id 1t1aS0-0025wO-1b for gdb-patches@sourceware.org; Thu, 17 Oct 2024 18:02:40 -0600 From: Tom Tromey <tom@tromey.com> Subject: [PATCH 0/2] Fix a data race with the background DWARF reader Date: Thu, 17 Oct 2024 18:02:36 -0600 Message-Id: <20241017-fix-race-pr-symtab-31626-v1-0-3a53459e9651@tromey.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIAJylEWcC/x3MQQ6CQAyF4auQrm1kRsCJVzEuOkOBLhhIS4yGc HdHll/y3r+DsQobPKodlN9isuQCd6kgTZRHRumLwde+cbW74yAfVEqMq6J9540i3lznO+QQXBP S0LbkodxX5bI9089XcSRjjEo5Tf/gojJKvs5kGyscxw8n4477igAAAA== X-Change-ID: 20241017-fix-race-pr-symtab-31626-e88148cf55a2 To: gdb-patches@sourceware.org X-Mailer: b4 0.14.2 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: 67.190.86.1 X-Source-L: No X-Exim-ID: 1t1aS0-0025wO-1b X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: c-67-190-86-1.hsd1.co.comcast.net (prentzel.local) [67.190.86.1]:50290 X-Source-Auth: tom+tromey.com X-Email-Count: 1 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfGGvtW0pywob3Mzhp5snzdaP8en8WOz12q4wUOUHQVZaSZ+f4/rS+7m/Is+XdKKwzzVL55IIrIOzRlKTdkqoT6qNE4hIWJVP1EHaBll2uOqYlmj8TjJn NQTi/1prqA+vxN7fFkYCB7N/LY2ASfQOuYfzTTfQYyXNicf5IOQdNjw1Z/zrv1rxD1tqktD6LLBIQm0QfGTeaE3r2CmkWrR8byk= X-Spam-Status: No, score=-3014.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, JMQ_SPF_NEUTRAL, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list <gdb-patches.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/gdb-patches/> List-Post: <mailto:gdb-patches@sourceware.org> List-Help: <mailto:gdb-patches-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=subscribe> Errors-To: gdb-patches-bounces~patchwork=sourceware.org@sourceware.org |
Series |
Fix a data race with the background DWARF reader
|
|
Message
Tom Tromey
Oct. 18, 2024, 12:02 a.m. UTC
This series fixes a race in the background DWARF reader. I was able to reproduce the original race manually (though not via dejagnu), and then confirmed (at least, there weren't warnings from TSAN) that this series fixes the problem. --- Tom Tromey (2): Use gdb_bfd_get_full_section_contents in auto-load.c Add locking when reading BFD sections gdb/auto-load.c | 11 ++++------- gdb/gdb_bfd.c | 23 +++++++++++++++++++++++ 2 files changed, 27 insertions(+), 7 deletions(-) --- base-commit: 876f0e78ba8244aa5705530fd8522928f05e6783 change-id: 20241017-fix-race-pr-symtab-31626-e88148cf55a2 Best regards,
Comments
On Thu, 17 Oct 2024 18:02:36 -0600 Tom Tromey <tom@tromey.com> wrote: > This series fixes a race in the background DWARF reader. > > I was able to reproduce the original race manually (though not via > dejagnu), and then confirmed (at least, there weren't warnings from > TSAN) that this series fixes the problem. > > --- > Tom Tromey (2): > Use gdb_bfd_get_full_section_contents in auto-load.c > Add locking when reading BFD sections > > gdb/auto-load.c | 11 ++++------- > gdb/gdb_bfd.c | 23 +++++++++++++++++++++++ > 2 files changed, 27 insertions(+), 7 deletions(-) > --- > base-commit: 876f0e78ba8244aa5705530fd8522928f05e6783 > change-id: 20241017-fix-race-pr-symtab-31626-e88148cf55a2 > > Best regards, > -- > Tom Tromey <tom@tromey.com> > Both patches LGTM. Reviewed-by: Kevin Buettner <kevinb@redhat.com>