From patchwork Tue Jun 22 05:44:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ryan Sundberg X-Patchwork-Id: 30614 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 72A3E27BC83; Tue, 22 Jun 2021 06:47:10 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,T_DKIM_INVALID, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id B166A27BC81 for ; Tue, 22 Jun 2021 06:47:09 +0100 (BST) Received: from localhost ([::1]:57506 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lvZFc-00032n-L0 for patchwork@mira.cbaines.net; Tue, 22 Jun 2021 01:47:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42650) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lvZFW-00032O-Rj for guix-patches@gnu.org; Tue, 22 Jun 2021 01:47:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:54230) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lvZFW-0000Tg-KP for guix-patches@gnu.org; Tue, 22 Jun 2021 01:47:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lvZFW-0000cE-Hz for guix-patches@gnu.org; Tue, 22 Jun 2021 01:47:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49167] [PATCH core-updates] gnu: jemalloc: --disable-initial-exec-tls Resent-From: Ryan Sundberg Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 22 Jun 2021 05:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 49167 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49167@debbugs.gnu.org Cc: Ryan Sundberg X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16243407732307 (code B ref -1); Tue, 22 Jun 2021 05:47:02 +0000 Received: (at submit) by debbugs.gnu.org; 22 Jun 2021 05:46:13 +0000 Received: from localhost ([127.0.0.1]:37543 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lvZEi-0000b8-UX for submit@debbugs.gnu.org; Tue, 22 Jun 2021 01:46:13 -0400 Received: from lists.gnu.org ([209.51.188.17]:44988) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lvZEg-0000b0-Fm for submit@debbugs.gnu.org; Tue, 22 Jun 2021 01:46:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42558) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lvZEg-0002oQ-2L for guix-patches@gnu.org; Tue, 22 Jun 2021 01:46:10 -0400 Received: from mail.arctype.co ([138.68.9.245]:46094) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lvZEb-00082Z-DR for guix-patches@gnu.org; Tue, 22 Jun 2021 01:46:09 -0400 Received: from authenticated-user (mail.arctype.co [138.68.9.245]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.arctype.co (Postfix) with ESMTPSA id DC57711F07F; Mon, 21 Jun 2021 22:45:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arctype.co; s=mail; t=1624340731; bh=oyzAQ8zhrrjxGVpABUQtkf9h2j+smOmAdouyEMZJVRk=; h=From:To:Cc:Subject:Date:From; b=MJ0oNxhnkyIylVaqPLBh/quHVC/3yQ8yumdMiLM1JdjhXOjbQipQ6QBzT6B84JM3Y YDqo0lcknbS7HqbG3cfwesu+hqJcRg3a/9Wc2ukmiJIGdGsVjRti4w2CpUODF7NXPH Ao75Ag1BbSK+8J2ij2kjpRyDMHVXcsZBBYUPna345729ZDDqqgeBb2ZpSI3gQMDeu2 F8uKAiNtl5Xffhr3pspx8wVa+cCRtR/WcHDPOYZX4hzSSulZWDm0Hhq7Cm6IMi4wcV 4t2tFfOYVEmfO5UndFwzlxMg8k3vHuTkOX5vj/RVOS/VlWyx4qNk/yWQp92Qeq0bZe RCFOuQQjT8u1Q== Date: Mon, 21 Jun 2021 22:44:24 -0700 Message-Id: <20210622054423.31851-1-ryan@arctype.co> MIME-Version: 1.0 Received-SPF: pass client-ip=138.68.9.245; envelope-from=ryan@arctype.co; helo=mail.arctype.co X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: Ryan Sundberg X-ACL-Warn: , Ryan Sundberg via Guix-patches X-Patchwork-Original-From: Ryan Sundberg via Guix-patches via From: Ryan Sundberg X-getmail-retrieved-from-mailbox: Patches Disable the thread local storage model in jemalloc 5 to prevent shared libraries linked to libjemalloc from crashing on dlopen(). https://github.com/jemalloc/jemalloc/issues/937 This bug affects both Java JNI and python libraries which link to jemalloc 5, such as RocksDB, which will crash the program when loaded. * gnu/packages/jemalloc.scm (jemalloc)[arguments]: Add --disable-initial-exec-tls configure flag. --- gnu/packages/jemalloc.scm | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/gnu/packages/jemalloc.scm b/gnu/packages/jemalloc.scm index c4b87b540d..67a1ca8e14 100644 --- a/gnu/packages/jemalloc.scm +++ b/gnu/packages/jemalloc.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2015 Sou Bunnbu ;;; Copyright © 2017 Efraim Flashner ;;; Copyright © 2017 Eric Bavier +;;; Copyright © 2021 Ryan Sundberg ;;; ;;; This file is part of GNU Guix. ;;; @@ -29,10 +30,10 @@ #:use-module (gnu packages perl) #:use-module (guix build-system gnu)) -(define-public jemalloc +(define jemalloc-4.5.0 (package (name "jemalloc") - (version "5.2.1") + (version "4.5.0") (source (origin (method url-fetch) (uri (string-append @@ -40,7 +41,7 @@ version "/jemalloc-" version ".tar.bz2")) (sha256 (base32 - "1xl7z0vwbn5iycg7amka9jd6hxd8nmfk7nahi4p9w2bnw9f0wcrl")))) + "10373xhpc10pgmai9fkc1z0rs029qlcb3c0qfnvkbwdlcibdh2cl")))) (build-system gnu-build-system) (arguments `(#:phases @@ -58,7 +59,7 @@ ;; Transparent huge pages are only enabled by default on Intel processors '() '(#:configure-flags (list "--disable-thp"))))) - (inputs `(("perl" ,perl))) + (inputs '()) ;; Install the scripts to a separate output to avoid referencing Perl and ;; Bash in the default output, saving ~75 MiB on the closure. (outputs '("out" "bin")) @@ -69,10 +70,10 @@ fragmentation avoidance and scalable concurrency support.") (license bsd-2))) -(define-public jemalloc-4.5.0 +(define-public jemalloc (package - (inherit jemalloc) - (version "4.5.0") + (inherit jemalloc-4.5.0) + (version "5.2.1") (source (origin (method url-fetch) (uri (string-append @@ -80,5 +81,12 @@ fragmentation avoidance and scalable concurrency support.") version "/jemalloc-" version ".tar.bz2")) (sha256 (base32 - "10373xhpc10pgmai9fkc1z0rs029qlcb3c0qfnvkbwdlcibdh2cl")))) - (inputs '()))) + "1xl7z0vwbn5iycg7amka9jd6hxd8nmfk7nahi4p9w2bnw9f0wcrl")))) + (arguments + (substitute-keyword-arguments (package-arguments jemalloc-base) + ;; Disable the thread local storage model in jemalloc 5 to prevent + ;; shared libraries linked to libjemalloc from crashing on dlopen() + ;; https://github.com/jemalloc/jemalloc/issues/937 + ((#:configure-flags base-configure-flags '()) + `(cons "--disable-initial-exec-tls" ,base-configure-flags)))) + (inputs `(("perl" ,perl)))))