From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gnu.wildebeest.org (gnu.wildebeest.org [45.83.234.184]) by sourceware.org (Postfix) with ESMTPS id 275CC3858D28 for ; Mon, 25 Apr 2022 14:18:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 275CC3858D28 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=klomp.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=klomp.org Received: from reform (deer0x0b.wildebeest.org [172.31.17.141]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by gnu.wildebeest.org (Postfix) with ESMTPSA id E3A80302BBED; Mon, 25 Apr 2022 16:18:02 +0200 (CEST) Received: by reform (Postfix, from userid 1000) id 63A6D2E822D8; Mon, 25 Apr 2022 16:18:02 +0200 (CEST) Date: Mon, 25 Apr 2022 16:18:02 +0200 From: Mark Wielaard To: elfutils-devel@sourceware.org Cc: Dirk =?iso-8859-1?Q?M=FCller?= Subject: Re: [PATCH] debuginfod, libdwfl: Initialize libcurl and dlopen debuginfod-client lazily Message-ID: References: <20220422215343.270433-1-mark@klomp.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220422215343.270433-1-mark@klomp.org> X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: elfutils-devel@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Elfutils-devel mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Apr 2022 14:18:05 -0000 On Fri, Apr 22, 2022 at 11:53:43PM +0200, Mark Wielaard wrote: > We used to go out of our way to initialize libcurl early before any other > thread/code was running. But this meant that we might pay startup cost, > which under FIPS is significant, even for code that never uses libdebuginfod > or TLS libcurl connections. Although curl_global_init itself isn't thread-safe > we can use pthread_once to make sure we don't race against ourselves. This > still means we might race against any application code that might use > libcurl. But we can assume they will have called curl_global_init before > calling dwfl_begin or debuginfod_begin. Pushed. Mark