From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id eIw3Iyp80WA5UAEAgWs5BA (envelope-from ) for ; Tue, 22 Jun 2021 07:59:06 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id WBgCHyp80WA9IgAA1q6Kng (envelope-from ) for ; Tue, 22 Jun 2021 05:59:06 +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 BB20615908 for ; Tue, 22 Jun 2021 07:59:05 +0200 (CEST) Received: from localhost ([::1]:58812 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lvZRA-0004WV-RV for larch@yhetil.org; Tue, 22 Jun 2021 01:59:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44504) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lvZR7-0004WN-RS for guix-patches@gnu.org; Tue, 22 Jun 2021 01:59:01 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:54270) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lvZR7-0002KD-KT for guix-patches@gnu.org; Tue, 22 Jun 2021 01:59:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lvZR7-0000ug-Kq for guix-patches@gnu.org; Tue, 22 Jun 2021 01:59:01 -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:59:01 +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.16243415133473 (code B ref 49167); Tue, 22 Jun 2021 05:59:01 +0000 Received: (at 49167) by debbugs.gnu.org; 22 Jun 2021 05:58:33 +0000 Received: from localhost ([127.0.0.1]:37583 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lvZQe-0000tx-Gx for submit@debbugs.gnu.org; Tue, 22 Jun 2021 01:58:33 -0400 Received: from mail.arctype.co ([138.68.9.245]:58661) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lvZQc-0000te-6N for 49167@debbugs.gnu.org; Tue, 22 Jun 2021 01:58: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 5A0EC11F07F for <49167@debbugs.gnu.org>; Mon, 21 Jun 2021 22:58:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arctype.co; s=mail; t=1624341504; bh=DhikskEDcqnqeC6ZyroKhYTdhc3b14KcDJoNp2Dxww8=; h=Subject:References:To:From:Date:In-Reply-To:From; b=tTyt4Sql9HwGrlI+2ouF4jejXI3IDPtJx4XggLw20F/r9bD7uuIILv9EHppeJnoVS zxTDAUfvqDLiLPPgH/GIByO8cIGc3inyxHTNxMGjFyOyzYJBQJNUPvaF25jFc9M/PB ku/KzhHmRRxdIOAfI01e1L3ELNFi1ach6C1RMXnEDbAZLqFaaT+7bBEmRxz3bJ8pvB HB1CEnf2cyqf+dH3hSyh4I0CsKE62jRsk04hbMmGWnp3iWXIA0x987tsLSiCeL2FMZ O96wyWpsEljEnd9JsUD9vMHwlpGceKl++w0kRkHFfdgt2UD8JFCIV7TcCt6mZhKq8f j6hI8PLtsUjpw== References: <20210622054423.31851-1-ryan@arctype.co> Message-ID: Date: Mon, 21 Jun 2021 22:58:24 -0700 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="cMJ5tCfuUucHRuj8BgDBo7xQaFUYkwqlY" 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=1624341546; 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=gYpL5T8I5YOyvVETadQhqrBQtkOvNje6JflZGOC15Zk=; b=FkJP+slU8LOeHXakLt840TcAYbx10n0koFAApffjOjOWUMU2bKUcv2bUyheMdyahfgtqK+ fv+gvE1Px0jUqcPLFOAKLRtrY5TSF+oR34FOACPyS4mqomJVO/1+hE0NI7mVDdSRL6Ns7N +4RiiZxHCroBG2nk8LxSxKdFBadlQtP4fLuwHsTM5TpjQdnhs6owCjXWTGDNUSNcNE9d0y W3HPWJTHBDxg6SCDxD1QPCdFu0R4dPB8PI2ZMorav7U/X8+9Cc/ne2vlH74oBXuqb0p62k xugdVrIhtoX2VwcX5f0ErALGG5YnethqClfZGJbGMdo/upC2hKN8Z3CVYYQQuw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1624341546; a=rsa-sha256; cv=none; b=lkd5/EHHdsxiB3Te4CrUbqlLQ1rq5NzmmwlFOuL1oY3yZhuPIkC7DNiO6+qzlklxudJR18 CNcNQ3NWPfvRSKHeWl74e7z79QztrBPMxbwtLGiFT0kRNS4AFwgZrGylx/SWT7ZPSlIdc8 Sm2dtdecze1+nnm/eVEqO5FQLvWMPjTY8G4QMVtrlUTsaYkft2pKQrWgTdEo42LnIQYdXL HMVTa7udr4Z6D9M889h8uWp/f2g9wE+aPfMAGdWQcSwYGw7aJNALimOBuMua6yAY2t8sDF 1MH6CXSqxlYqASY+SVSDzDBzfHS2n7iv8zVjvyQ18kLAzk8eOAm84eQHgfi3KA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=arctype.co header.s=mail header.b=tTyt4Sql; 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=tTyt4Sql; 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: BB20615908 X-Spam-Score: -5.02 X-Migadu-Scanner: scn1.migadu.com X-TUID: ifQMQ0CUIkip This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --cMJ5tCfuUucHRuj8BgDBo7xQaFUYkwqlY Content-Type: multipart/mixed; boundary="ArpsudfU5HQ6mkgbJPoS9adq7UdM8is3X"; 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: --ArpsudfU5HQ6mkgbJPoS9adq7UdM8is3X Content-Type: multipart/mixed; boundary="------------12B7447D52040EDC1F65D045" Content-Language: en-US This is a multi-part message in MIME format. --------------12B7447D52040EDC1F65D045 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Please excuse my clumsiness, THIS is the fixed patch file. (I accidentally re-sent the original patch.) -- Sincerely, Ryan Sundberg On 6/21/21 10:52 PM, Ryan Sundberg via Guix-patches via wrote: > Sorry, I missed a spot rebasing this last patch. Please use the attache= d > patch which builds. >=20 >=20 > -- > Sincerely, > Ryan Sundberg >=20 > 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 >> >> 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-initi= al-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 I= ntel 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))) >> =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 su= pport.") >> 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 pr= event >> + ;; shared libraries linked to libjemalloc from crashing on dl= open() >> + ;; https://github.com/jemalloc/jemalloc/issues/937 >> + ((#:configure-flags base-configure-flags '()) >> + `(cons "--disable-initial-exec-tls" ,base-configure-flags)))= ) >> + (inputs `(("perl" ,perl))))) >> --------------12B7447D52040EDC1F65D045 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 8b97b60ab78ba1e616efaf477e629cfa2457b1a9 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..d93cf41081 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-4.5.0) + ;; 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 --------------12B7447D52040EDC1F65D045-- --ArpsudfU5HQ6mkgbJPoS9adq7UdM8is3X-- --cMJ5tCfuUucHRuj8BgDBo7xQaFUYkwqlY Content-Type: application/pgp-signature; name="OpenPGP_signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="OpenPGP_signature" -----BEGIN PGP SIGNATURE----- wsB5BAABCAAjFiEEyVG5Gm1pvFAzyXC2aiMi+MCr96sFAmDRfAAFAwAAAAAACgkQaiMi+MCr96ua /AgA10MU1NPv9LjY6egN2rN4PtKd/PUI4GSXtoiTHQ6Auqpmstq+VDg+nAffuVJIH0fb+ymFP4wP +a+D63ioJpPuw9Cbz5fy+6TUVPuI4DAwpHkSCc4R41bG4u40yftWKK1uHa2F20DgtIFRXg7cpugF QA6WRhfXnCC4NevjRDfUq2WvXZqKh7uMD6kvl0+4H02lxgtQRjp/h06Lki/ReL68Vg8cwok6D7Hf DPjaT2IC+6BkRI31MIbFtHemklx8PWu107zn+xrG+MGjgikfMKThJ07F5xOZp/7vBOGZV9l25Yse ZDZ4MGbKzZAHCgCe5PTtVHOtuRsaqwj9iSJFB6wWUg== =2evo -----END PGP SIGNATURE----- --cMJ5tCfuUucHRuj8BgDBo7xQaFUYkwqlY--