From: Ryan Sundberg via Guix-patches via <guix-patches@gnu.org>
To: 49167@debbugs.gnu.org
Cc: Ryan Sundberg <ryan@arctype.co>
Subject: [bug#49167] [PATCH core-updates] gnu: jemalloc: --disable-initial-exec-tls
Date: Mon, 21 Jun 2021 22:44:24 -0700 [thread overview]
Message-ID: <20210622054423.31851-1-ryan@arctype.co> (raw)
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@gmail.com>
;;; Copyright © 2017 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2017 Eric Bavier <bavier@member.fsf.org>
+;;; Copyright © 2021 Ryan Sundberg <ryan@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
next reply other threads:[~2021-06-22 5:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-22 5:44 Ryan Sundberg via Guix-patches via [this message]
2021-06-22 5:52 ` [bug#49167] [PATCH core-updates] gnu: jemalloc: --disable-initial-exec-tls Ryan Sundberg via Guix-patches via
2021-06-22 5:58 ` Ryan Sundberg via Guix-patches via
2021-09-03 10:06 ` bug#49167: " Ludovic Courtès
[not found] ` <handler.49167.D49167.16306636041607.notifdone@debbugs.gnu.org>
2021-09-04 23:40 ` [bug#49167] closed (Re: bug#49167: [PATCH core-updates] gnu: jemalloc: --disable-initial-exec-tls) Ryan Sundberg via Guix-patches via
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210622054423.31851-1-ryan@arctype.co \
--to=guix-patches@gnu.org \
--cc=49167@debbugs.gnu.org \
--cc=ryan@arctype.co \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).