GNU bug report logs - #49167
[PATCH core-updates] gnu: jemalloc: --disable-initial-exec-tls

Previous Next

Package: guix-patches;

Reported by: Ryan Sundberg <ryan <at> arctype.co>

Date: Tue, 22 Jun 2021 05:47:02 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 49167 in the body.
You can then email your comments to 49167 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#49167; Package guix-patches. (Tue, 22 Jun 2021 05:47:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ryan Sundberg <ryan <at> arctype.co>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Tue, 22 Jun 2021 05:47:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Ryan Sundberg <ryan <at> arctype.co>
To: guix-patches <at> gnu.org
Cc: Ryan Sundberg <ryan <at> arctype.co>
Subject: [PATCH core-updates] gnu: jemalloc: --disable-initial-exec-tls
Date: Mon, 21 Jun 2021 22:44:24 -0700
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 <iyzsong <at> gmail.com>
 ;;; Copyright © 2017 Efraim Flashner <efraim <at> flashner.co.il>
 ;;; Copyright © 2017 Eric Bavier <bavier <at> member.fsf.org>
+;;; Copyright © 2021 Ryan Sundberg <ryan <at> arctype.co>
 ;;;
 ;;; 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)))))
-- 
2.31.1





Information forwarded to guix-patches <at> gnu.org:
bug#49167; Package guix-patches. (Tue, 22 Jun 2021 05:53:02 GMT) Full text and rfc822 format available.

Message #8 received at 49167 <at> debbugs.gnu.org (full text, mbox):

From: Ryan Sundberg <ryan <at> arctype.co>
To: 49167 <at> debbugs.gnu.org
Subject: Re: [PATCH core-updates] gnu: jemalloc: --disable-initial-exec-tls
Date: Mon, 21 Jun 2021 22:52:22 -0700
[Message part 1 (text/plain, inline)]
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
> 
> 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 <iyzsong <at> gmail.com>
>  ;;; Copyright © 2017 Efraim Flashner <efraim <at> flashner.co.il>
>  ;;; Copyright © 2017 Eric Bavier <bavier <at> member.fsf.org>
> +;;; Copyright © 2021 Ryan Sundberg <ryan <at> arctype.co>
>  ;;;
>  ;;; 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)))))
> 
[0001-gnu-jemalloc-disable-initial-exec-tls.patch (text/x-patch, attachment)]
[OpenPGP_signature (application/pgp-signature, attachment)]

Information forwarded to guix-patches <at> gnu.org:
bug#49167; Package guix-patches. (Tue, 22 Jun 2021 05:59:01 GMT) Full text and rfc822 format available.

Message #11 received at 49167 <at> debbugs.gnu.org (full text, mbox):

From: Ryan Sundberg <ryan <at> arctype.co>
To: 49167 <at> debbugs.gnu.org
Subject: Re: [PATCH core-updates] gnu: jemalloc: --disable-initial-exec-tls
Date: Mon, 21 Jun 2021 22:58:24 -0700
[Message part 1 (text/plain, inline)]
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 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
>>
>> 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 <iyzsong <at> gmail.com>
>>  ;;; Copyright © 2017 Efraim Flashner <efraim <at> flashner.co.il>
>>  ;;; Copyright © 2017 Eric Bavier <bavier <at> member.fsf.org>
>> +;;; Copyright © 2021 Ryan Sundberg <ryan <at> arctype.co>
>>  ;;;
>>  ;;; 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)))))
>>
[0001-gnu-jemalloc-disable-initial-exec-tls.patch (text/x-patch, attachment)]
[OpenPGP_signature (application/pgp-signature, attachment)]

Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Fri, 03 Sep 2021 10:07:02 GMT) Full text and rfc822 format available.

Notification sent to Ryan Sundberg <ryan <at> arctype.co>:
bug acknowledged by developer. (Fri, 03 Sep 2021 10:07:02 GMT) Full text and rfc822 format available.

Message #16 received at 49167-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Ryan Sundberg <ryan <at> arctype.co>
Cc: 49167-done <at> debbugs.gnu.org
Subject: Re: bug#49167: [PATCH core-updates] gnu: jemalloc:
 --disable-initial-exec-tls
Date: Fri, 03 Sep 2021 12:06:25 +0200
Hi Ryan,

Ryan Sundberg <ryan <at> arctype.co> skribis:

> From 8b97b60ab78ba1e616efaf477e629cfa2457b1a9 Mon Sep 17 00:00:00 2001
> From: Ryan Sundberg <ryan <at> arctype.co>
> 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.

It took a long while, but it’s now in ‘core-updates-frozen’ as
68dd6d809398297dc2ebef522186c9b9f2566739 (with minor tweaks so it would
apply and so that ‘jemalloc-4.5.0’ remains public.)

Thanks!

Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#49167; Package guix-patches. (Sat, 04 Sep 2021 23:41:01 GMT) Full text and rfc822 format available.

Message #19 received at 49167 <at> debbugs.gnu.org (full text, mbox):

From: Ryan Sundberg <ryan <at> arctype.co>
To: 49167 <at> debbugs.gnu.org
Subject: Re: bug#49167: closed (Re: bug#49167: [PATCH core-updates] gnu:
 jemalloc: --disable-initial-exec-tls)
Date: Sat, 4 Sep 2021 16:40:48 -0700
[Message part 1 (text/plain, inline)]
Awesome. Thanks Ludo. This will unblock the rocksdb-java package I've
been sitting on.

--
Sincerely,
Ryan Sundberg

On 9/3/21 3:07 AM, GNU bug Tracking System wrote:
> Your bug report
> 
> #49167: [PATCH core-updates] gnu: jemalloc: --disable-initial-exec-tls
> 
> which was filed against the guix-patches package, has been closed.
> 
> The explanation is attached below, along with your original report.
> If you require more details, please reply to 49167 <at> debbugs.gnu.org.
> 

[OpenPGP_signature (application/pgp-signature, attachment)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 03 Oct 2021 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 205 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.