[Pkg-mongodb-maintainers] [pkg-mongodb] 02/11: Fix spidermonkey-GC-related + GCC 6 segfaults

Apollon Oikonomopoulos apoikos at moszumanska.debian.org
Mon Oct 2 07:55:14 UTC 2017


This is an automated email from the git hooks/post-receive script.

apoikos pushed a commit to branch master
in repository pkg-mongodb.

commit d19fc4322cb71dd1d903820ec6ee6e3234f5e942
Author: Apollon Oikonomopoulos <apoikos at debian.org>
Date:   Mon Sep 25 14:32:57 2017 +0300

    Fix spidermonkey-GC-related + GCC 6 segfaults
    
    Apparently, mozjs 38 and up to 49 is prone to segfaults at GC time
    when built using GCC 6 or later. I've seen MongoDB crash a number of
    times with only mozjs GC operations in the stack trace.
    
    Fix this by disabling a couple of GCC 6+ optimizations, as discussed in
    https://trac.wildfiregames.com/ticket/4053 and
    https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70526#c14.
    
    Closes: #876755
---
 debian/patches/fix-mozjs-38-segfaults.patch | 29 +++++++++++++++++++++++++++++
 debian/patches/series                       |  1 +
 2 files changed, 30 insertions(+)

diff --git a/debian/patches/fix-mozjs-38-segfaults.patch b/debian/patches/fix-mozjs-38-segfaults.patch
new file mode 100644
index 0000000..fbcd151
--- /dev/null
+++ b/debian/patches/fix-mozjs-38-segfaults.patch
@@ -0,0 +1,29 @@
+Author: Apollon Oikonomopoulos <apoikos at debian.org>
+Description: Fix mozjs-related segfaults when built with GCC >=6
+ Apparently, mozjs 38 and up to 49 is prone to segfaults at GC time when built
+ using GCC 6 or later. I've seen MongoDB crash a number of times with only
+ mozjs GC operations in the stack trace. We're also currently having a segfault
+ on ARM64 that is probably related (#871906).
+ .
+ According to https://trac.wildfiregames.com/ticket/4053 and
+ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70526#c14, disabling a couple of
+ optimizations should fix this.
+Last-Update: 2017-09-25
+Forwarded: no
+--- a/src/third_party/mozjs-38/SConscript
++++ b/src/third_party/mozjs-38/SConscript
+@@ -92,6 +92,14 @@
+     'platform/' + env["TARGET_ARCH"] + "/" + env["TARGET_OS"] + "/include",
+ ])
+ 
++# Debian
++# Apparently, Spidermonkey 38 (and up to 49) is prone to segfaults at GC time
++# when built with GCC 6 or later. Disabling the following optimizations fixes
++# this.
++# See https://trac.wildfiregames.com/ticket/4053 and
++# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70526#c14 for more information
++env.Append(CXXFLAGS=["-fno-schedule-insns2", "-fno-delete-null-pointer-checks"])
++
+ sources = [
+     "extract/js/src/builtin/RegExp.cpp",
+     "extract/js/src/frontend/Parser.cpp",
diff --git a/debian/patches/series b/debian/patches/series
index 04379ff..8c32e33 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -10,3 +10,4 @@ use-mmapv1-on-i386
 fix-wt-checksum-on-arm64
 fix-ftbfs-with-gcc-7.patch
 arm64-48bit-va-compat.patch
+fix-mozjs-38-segfaults.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mongodb/pkg-mongodb.git



More information about the Pkg-mongodb-maintainers mailing list