From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id WAf2HcR60WCkTQEAgWs5BA (envelope-from ) for ; Tue, 22 Jun 2021 07:53:08 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id AEuWGcR60WDnLQAAbx9fmQ (envelope-from ) for ; Tue, 22 Jun 2021 05:53:08 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 982A41C703 for ; Tue, 22 Jun 2021 07:53:07 +0200 (CEST) Received: from localhost ([::1]:58012 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lvZLO-0003jd-8W for larch@yhetil.org; Tue, 22 Jun 2021 01:53:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43480) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lvZLK-0003jU-JS for guix-patches@gnu.org; Tue, 22 Jun 2021 01:53:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:54258) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lvZLK-0005Qo-CB for guix-patches@gnu.org; Tue, 22 Jun 2021 01:53:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lvZLK-0000m1-Af for guix-patches@gnu.org; Tue, 22 Jun 2021 01:53: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:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49167 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49167@debbugs.gnu.org Received: via spool by 49167-submit@debbugs.gnu.org id=B49167.16243411522915 (code B ref 49167); Tue, 22 Jun 2021 05:53:02 +0000 Received: (at 49167) by debbugs.gnu.org; 22 Jun 2021 05:52:32 +0000 Received: from localhost ([127.0.0.1]:37563 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lvZKp-0000kx-Jz for submit@debbugs.gnu.org; Tue, 22 Jun 2021 01:52:32 -0400 Received: from mail.arctype.co ([138.68.9.245]:33745) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lvZKn-0000kd-61 for 49167@debbugs.gnu.org; Tue, 22 Jun 2021 01:52:30 -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 38DC111F07F for <49167@debbugs.gnu.org>; Mon, 21 Jun 2021 22:52:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arctype.co; s=mail; t=1624341143; bh=NNnjDbjjGtnyKpyOku/gwnGSpTUDZHzYje9T3OnV5hw=; h=Subject:To:References:From:Date:In-Reply-To:From; b=TdNvmCNtghFZADpRetvDHBDZX2uiHWe42z5raQ9r45ul/9hJo7wVIAQjZpCwOD3C4 OACOvpdjQp5c4YLZZeN4h1pp5JG9hmCFZW/HsHjomJUDdehurh5bpkc8ZLnOAvc9E4 xWDdwSv+ph/4iL+w80pDtrPtGZxWRU8s1Ux1nolUYhByFErMjetSZ6etPdN9p+/PoO zJr+WUuyOziavSb+nARV357KOHcbniXHDs5CH9L+rrqDnU0J6GMaR76hGblreqLXZo 4bhIQjF6DbX6oiZDlndz3TEuRgxRdg+FYv3yQbS0cgqr5HtDMmpOOmHszGxv/MG57u lUIIFRuPNJlAA== References: <20210622054423.31851-1-ryan@arctype.co> Message-ID: Date: Mon, 21 Jun 2021 22:52:22 -0700 MIME-Version: 1.0 In-Reply-To: <20210622054423.31851-1-ryan@arctype.co> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="jHI4JFPlg48tvUdQaXjaLvUQQ0TlUZDhf" 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+larch=yhetil.org@gnu.org Sender: "Guix-patches" Reply-to: Ryan Sundberg X-ACL-Warn: , Ryan Sundberg via Guix-patches From: Ryan Sundberg via Guix-patches via X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1624341188; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=Y7fAHNZZHO62MIui5MEeKGhJSZqiHz9GaFBWLOBS2lc=; b=SdNqxe8Orek1qrDn99EXsakr8rPw4/SwzqC27MltsnLJWTXFTm9fS/rB09GfKzrcReQHJ4 5frF9P5p9AldLcbIjzzQBXuaPdSaGsE9MDaXqin56f+wUHVHoOupw/P6sZs7W5F+vvHBcU AlGEZcPPTnWeCLSg2aDK5ytxj02WjCg0FE+KStFDkjwjY6/0dqM3iEQM4flwSOTjzjswCQ Ta0KPugU9AfrUt4ldT/wDIYZkj9uCqaSRLOs9fPzWtCvex7kWHQ43OCebGP0A4Uftro9h3 ksDPptYGiYRNrF24hsWdQd0q5+helc8Yy7JHFwAuKagCfyfV2/wvvIhC5NmjqA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1624341188; a=rsa-sha256; cv=none; b=jKFms2iy5Q2Azrp2/UvsVPFrKv42Sdl968kSBoxOJ2NSlmLKSGWRhhESlsgOBiEkr7F0ww BEvNqJ2t3z5qRnLIeAj1cvDY8WQ4JckcBXTu9CZvFps4a1DS3jN9+NhG/uvz5EqxCnbqdh zkR8MxgZL+QpNFqvR4CLp/7t5+LSx68FimoMBNZ3cXtT+IUlRt537UM1sYPAeS1FP6z6ux 3Szyo2EbdpbL/go+895ZDj3QykvE4jfgGzy4yIhoAhAFFC+a7P6E1c+rfsr6Tvi4K+hnCU DEOgUO9fJr01uqBAs4kEemIWbJmc+8Jazc5GW01Q2fRycmgg91hDAmcGsRh+1A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=arctype.co header.s=mail header.b=TdNvmCNt; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -5.02 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=arctype.co header.s=mail header.b=TdNvmCNt; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 982A41C703 X-Spam-Score: -5.02 X-Migadu-Scanner: scn0.migadu.com X-TUID: zJmyx7r1UGek This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --jHI4JFPlg48tvUdQaXjaLvUQQ0TlUZDhf Content-Type: multipart/mixed; boundary="G00xzA8OnFMMLN5hSAtyPbOVvCzrXVXJ9"; protected-headers="v1" From: Ryan Sundberg To: 49167@debbugs.gnu.org Message-ID: Subject: Re: [PATCH core-updates] gnu: jemalloc: --disable-initial-exec-tls References: <20210622054423.31851-1-ryan@arctype.co> In-Reply-To: <20210622054423.31851-1-ryan@arctype.co> --G00xzA8OnFMMLN5hSAtyPbOVvCzrXVXJ9 Content-Type: multipart/mixed; boundary="------------6F6DEA760CE529E5D554DA41" Content-Language: en-US This is a multi-part message in MIME format. --------------6F6DEA760CE529E5D554DA41 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Sorry, I missed a spot rebasing this last patch. Please use the attached patch which builds. -- Sincerely, Ryan Sundberg On 6/21/21 10:44 PM, Ryan Sundberg wrote: > 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 >=20 > This bug affects both Java JNI and python libraries which link to > jemalloc 5, such as RocksDB, which will crash the program when loaded. >=20 > * gnu/packages/jemalloc.scm (jemalloc)[arguments]: Add --disable-initia= l-exec-tls > configure flag. > --- > gnu/packages/jemalloc.scm | 26 +++++++++++++++++--------- > 1 file changed, 17 insertions(+), 9 deletions(-) >=20 > 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 =C2=A9 2015 Sou Bunnbu > ;;; Copyright =C2=A9 2017 Efraim Flashner > ;;; Copyright =C2=A9 2017 Eric Bavier > +;;; Copyright =C2=A9 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)) > =20 > -(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 In= tel processors > '() > '(#:configure-flags (list "--disable-thp"))))) > - (inputs `(("perl" ,perl))) > + (inputs '()) > ;; Install the scripts to a separate output to avoid referencing P= erl 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))) > =20 > -(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 sup= port.") > 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 pre= vent > + ;; shared libraries linked to libjemalloc from crashing on dlo= pen() > + ;; https://github.com/jemalloc/jemalloc/issues/937 > + ((#:configure-flags base-configure-flags '()) > + `(cons "--disable-initial-exec-tls" ,base-configure-flags))))= > + (inputs `(("perl" ,perl))))) >=20 --------------6F6DEA760CE529E5D554DA41 Content-Type: text/x-patch; charset=UTF-8; name="0001-gnu-jemalloc-disable-initial-exec-tls.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="0001-gnu-jemalloc-disable-initial-exec-tls.patch" =46rom a0f9f8206613efa659922f5164414832119a4d33 Mon Sep 17 00:00:00 2001 From: Ryan Sundberg Date: Fri, 29 Jan 2021 21:18:56 -0800 Subject: [PATCH] gnu: jemalloc: --disable-initial-exec-tls 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 =C2=A9 2015 Sou Bunnbu ;;; Copyright =C2=A9 2017 Efraim Flashner ;;; Copyright =C2=A9 2017 Eric Bavier +;;; Copyright =C2=A9 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)) =20 -(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 Inte= l processors '() '(#:configure-flags (list "--disable-thp"))))) - (inputs `(("perl" ,perl))) + (inputs '()) ;; Install the scripts to a separate output to avoid referencing Per= l 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))) =20 -(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 suppo= rt.") 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 preve= nt + ;; shared libraries linked to libjemalloc from crashing on dlope= n() + ;; https://github.com/jemalloc/jemalloc/issues/937 + ((#:configure-flags base-configure-flags '()) + `(cons "--disable-initial-exec-tls" ,base-configure-flags)))) + (inputs `(("perl" ,perl))))) --=20 2.31.1 --------------6F6DEA760CE529E5D554DA41-- --G00xzA8OnFMMLN5hSAtyPbOVvCzrXVXJ9-- --jHI4JFPlg48tvUdQaXjaLvUQQ0TlUZDhf Content-Type: application/pgp-signature; name="OpenPGP_signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="OpenPGP_signature" -----BEGIN PGP SIGNATURE----- wsB5BAABCAAjFiEEyVG5Gm1pvFAzyXC2aiMi+MCr96sFAmDRepYFAwAAAAAACgkQaiMi+MCr96vc qQf/VBzCo4Bb6PkC3/igNicU5TmPvtHx4tkJR4gCoyhfI78wEiMQ9RKc75f4jlE2kEoVWqSD2R4B msHD1y+TL4beQP3SlpWDteCT+7gcym0Lp5dtKCxV/cGywMTjDkoj6Kj3ZRzFDV7ya2TQm4Z7Voxl P/Emr5G7ZcCG2SfLt6KunCwn+q4/MrtwAODja20dsEmIsm2vt6eK6WyCarNZYDIGU7TY2JUoWL8g ix5IvQvZ/UnPKcWbK8aQEFfo2evxYsxRC6dz4d+qFBggXC67Owaz/5cLq8pFgL08CcnuVHwT0GSi tfbluh0I/TZyLppcOTcXFZfjgAzM9z0vaIhP/MA+Vg== =1Xrh -----END PGP SIGNATURE----- --jHI4JFPlg48tvUdQaXjaLvUQQ0TlUZDhf--