From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id 3B8893858C39 for ; Wed, 6 Jul 2022 15:43:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3B8893858C39 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 5BD5422202; Wed, 6 Jul 2022 15:43:00 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 4565713A7D; Wed, 6 Jul 2022 15:43:00 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id bhjjD4StxWI9ZwAAMHmgww (envelope-from ); Wed, 06 Jul 2022 15:43:00 +0000 Message-ID: <7a6d5c0a-f39f-c708-897b-d5f46070d6f8@suse.de> Date: Wed, 6 Jul 2022 17:42:59 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Subject: Re: [PATCH 5/5] [gdb/symtab] Fix data race on per_cu->lang Content-Language: en-US From: Tom de Vries To: Tom Tromey Cc: gdb-patches@sourceware.org References: <20220629152914.13149-1-tdevries@suse.de> <20220629152914.13149-5-tdevries@suse.de> <877d4svih2.fsf@tromey.com> <35591557-02e9-d87c-e07b-49919282666e@suse.de> In-Reply-To: <35591557-02e9-d87c-e07b-49919282666e@suse.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-6.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE 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.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jul 2022 15:43:02 -0000 On 7/5/22 17:19, Tom de Vries wrote: > On 7/4/22 20:30, Tom Tromey wrote: >>>>>>> "Tom" == Tom de Vries writes: >> Tom> Fix this by guarding the write with a lock. >> >> I would rather we avoid locks.  Ideally the existing exclusion mechanism >> should be made to work, but if that fails, perhaps we can use another >> atomic. > > I gave a different approach a try: eliminating the field. > > That seems to work reasonably well, apart from one specific usage that I > disabled (mentioned in commit message). > Hmm, that same piece of code is where I run into https://sourceware.org/bugzilla/show_bug.cgi?id=29321 . And, it's a piece of code from a commit where I added per_cu->lang/unit_type. So, this starts to look like the actual cause of problems. Thanks, - Tom > I'm not sure this is a good idea though, but I thought I could at least > post it.  Currently testing. > > Thanks, > - Tom >