Your message dated Tue, 10 Jul 2018 12:21:58 +0000
with message-id <e1fcrey-000221...@fasolo.debian.org>
and subject line Bug#902961: fixed in mozjs52 52.3.1-9
has caused the Debian Bug report #902961,
regarding mozjs52: FTBFS in recent unstable: ReserveProcessExecutableMemory() 
fails during tests
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
902961: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=902961
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Source: mozjs52
Version: 52.3.1-8
Severity: serious
Justification: fails to build from source (but built successfully in the past)

(X-Debbugs-Cc to contributors to #897178, to which this seems related,
and #902197)

After fixing #902197, the mozjs52 build-time tests failed on the amd64
Debian porterbox barriere. Specifically, the smoke-test in debian/test.sh
that's run before trying the actual test suite:

    "$SRCDIR/js/src/js" -e 'print("Hello, world")'

fails, with js exiting 1.

Running it under gdb reveals that this is because
ReserveProcessExecutableMemory() in js/src/jit/ProcessExecutableMemory.cpp
fails during startup, causing JS_Init() to fail. js helpfully has no
diagnostics at all for this, it just silently exits with EXIT_FAILURE.
(Ignore the first implementation of ReserveProcessExecutableMemory(),
which is for Windows; the Unix implementation is around line 300.)

That function gets a random address, and passes it as the first argument
of mmap(., 1 gigabyte, PROT_NONE, MAP_PRIVATE | MAP_ANON, -1, 0) on
64-bit machines, or the same but with 128M instead of 1G on 32-bit.
This now seems to be failing and returning NULL.

I was surprised to find that on the same machine, if I install gjs (a
GNOME wrapper around mozjs) and the slightly older mozjs 52.3.1-7 that it
depends on, gjs-console -c 'print("hello")' works OK. (We don't package
mozjs' own command-line tool 'js' any more, so no precompiled copy is
available.) The changes between 52.3.1-7 and what I'm compiling all seem
to be specific to non-amd64 architectures, so maybe this is about the
environment in which mozjs was built, rather than the source code used?

A hack that works to avoid this is to retry the mmap() without the address
hint, like in Jason Duerstock's debian/patches/ia64-support.patch,
but for non-IA64 architectures as well; see attached. I suspect this
might be the wrong solution, but perhaps it points someone who knows
this better than I do in the direction of a better solution...

This also makes me wonder whether the failure addressed by
ia64-support.patch was in fact a generic issue with newer $something
(kernel? compiler? dpkg-buildflags?), which happened to only be seen
by ia64 porters because everyone else was compiling and testing mozjs52
with an older $something?

    smcv
From: Simon McVittie <s...@debian.org>
Date: Tue, 3 Jul 2018 23:47:20 +0100
Subject: If executable memory can't be mapped,
 retry without randomization on all architectures

---
 js/src/jit/ProcessExecutableMemory.cpp | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/js/src/jit/ProcessExecutableMemory.cpp b/js/src/jit/ProcessExecutableMemory.cpp
index 31836f1..5e7ea5c 100644
--- a/js/src/jit/ProcessExecutableMemory.cpp
+++ b/js/src/jit/ProcessExecutableMemory.cpp
@@ -291,19 +291,13 @@ ReserveProcessExecutableMemory(size_t bytes)
     void* p = MozTaggedAnonymousMmap(randomAddr, bytes, PROT_NONE, MAP_PRIVATE | MAP_ANON,
                                      -1, 0, "js-executable-memory");
 
-#ifndef __ia64__
-    if (p == MAP_FAILED)
-        return nullptr;
-#else
     if (p == MAP_FAILED) {
-        // the comment above appears to be incorrect on ia64, so retry without the hint
         p = MozTaggedAnonymousMmap(NULL, bytes, PROT_NONE, MAP_PRIVATE | MAP_ANON,
                                      -1, 0, "js-executable-memory");
         if (p == MAP_FAILED)
             return nullptr;
     }
     return p;
-#endif
 }
 
 static void

--- End Message ---
--- Begin Message ---
Source: mozjs52
Source-Version: 52.3.1-9

We believe that the bug you reported is fixed in the latest version of
mozjs52, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 902...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Simon McVittie <s...@debian.org> (supplier of updated mozjs52 package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Tue, 10 Jul 2018 12:33:30 +0100
Source: mozjs52
Binary: libmozjs-52-0 libmozjs-52-dev
Architecture: source
Version: 52.3.1-9
Distribution: unstable
Urgency: medium
Maintainer: Debian GNOME Maintainers 
<pkg-gnome-maintain...@lists.alioth.debian.org>
Changed-By: Simon McVittie <s...@debian.org>
Description:
 libmozjs-52-0 - SpiderMonkey JavaScript library
 libmozjs-52-dev - SpiderMonkey JavaScript library - development headers
Closes: 902197 902961
Changes:
 mozjs52 (52.3.1-9) unstable; urgency=medium
 .
   * d/p/Disable-js-JIT-on-x32.patch, d/p/hppa-support.patch:
     Remove patches that are no longer listed in d/p/series
   * d/p/*.patch: Use gbp-pq style for metadata
   * d/p/Add-disable-layoutex-when-running-ICU-configure.patch:
     Explicitly disable Paragraph Layout support in bundled ICU. The
     bundled copy of ICU doesn't have the code for this optional feature,
     even if we find the icu-le-hb library during configure. In versions
     of mozjs52 compiled before Debian had icu-le-hb available, we didn't
     try to build that feature, so not having it is not a regression.
     Patch from Mike Hommey, via mozilla-unified. (Closes: #902197)
   * d/p/ia64-support.patch:
     Fix IA64 patch so it doesn't leave ReserveProcessExecutableMemory()
     returning an undefined result on !ia64 machines (Closes: #902961)
   * Standards-Version: 4.1.5 (no changes required)
   * Set Rules-Requires-Root to no
   * Regenerate js/src/old-configure with autoconf2.13 during build
     - d/p/pre-generate-old-configure.patch,
       d/p/Patch-pregenerated-old-configure-to-match-build-autoconf-.patch:
       Drop patches, no longer needed
   * Regenerate intl/icu/source/configure with autoreconf during build
   * d/rules: Delete all *.pyc files during clean
   * d/copyright: Move "Files: *" paragraph to the top as suggested by
     lintian
Checksums-Sha1:
 41b43e9c1ffb1702366a6b19d0b84ffc2469237c 2239 mozjs52_52.3.1-9.dsc
 3b5fd4a5e3af0c24fe973b143674398833bfdb93 29508 mozjs52_52.3.1-9.debian.tar.xz
 f4c1ded466f3ad0ad1b7ebf392778087003497bf 6993 mozjs52_52.3.1-9_source.buildinfo
Checksums-Sha256:
 1af9e1a4ba65c14d3a2b7476fdab3054b0aaea7d25790f381f1f2d78db009cea 2239 
mozjs52_52.3.1-9.dsc
 623131039dc407c1615186ada075f6936202afb8c9f26fd8fb25e586501228bc 29508 
mozjs52_52.3.1-9.debian.tar.xz
 557c94333ccef1d7c65c1900af893fc8b5435f66a234a396a93bcafbdbcd04c0 6993 
mozjs52_52.3.1-9_source.buildinfo
Files:
 9718e1e9113aecb391d92777c1a5cf66 2239 libs optional mozjs52_52.3.1-9.dsc
 b90ae8c58acf84614a3a92f0eaa114fc 29508 libs optional 
mozjs52_52.3.1-9.debian.tar.xz
 99509ecbb800aff211eada1d1896a3de 6993 libs optional 
mozjs52_52.3.1-9_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEENuxaZEik9e95vv6Y4FrhR4+BTE8FAltEnusACgkQ4FrhR4+B
TE832A//asHe4pCOhrgsAklu+1s9XgBDWJKir52KpZQFylKkBxjhFoqTv7R9Renp
9ofE3tFfEExvaSHDadXX+KQNrgLiUXUw/kilHLqApQcyI9pP7AFDAjwtbfBiiiS3
mOKBHu68t7V1a6GqpSxvoMEDQsB0DzWMt/ik4CT/LBVOMwcUhUr3CBtcEvDAkdY2
4o9PjBrw+/Osnzg1XaOMKAv3/XZSGr05wkJIeFXo/VeBnAETfV3L/ETJBUvZp2bM
OihaYibwEjl9tc0pbVaQ7DLMAmZR0XRa+ZG37nztowf1isVKeEa+OxrMKNkpcf1B
9BI0OFJoh7Q+6vGvxXgYvAEEqJeOtUw/4u2IBKC5ZAP+krHlRetDfeAJWJ852TNv
3RRq+QJNaFLC/MWIOSqvXeN/UPXNTZRtapT0GugCskf+DM2upztBXOAuH8Wz9DZE
dtle8pwzKlW7nGGVRUWQSmbqT6QjRroMpFEmSCiNYUgbvmzpD7158074uh5vGgZI
WdXgnSoGz95KmLcooAkA7XmL5N3b5cUhZy16pwECdI+3tWKdLRptOgox7BDN70st
T5Z+AxUC+1z/Hw+2CmIrOqhZqoMwFz7TZpxzpYcYn8hJ4y9lE6mfvo34ZI6mYFRC
7Nw8H1V6XVVaqnLhBbGGHAkxUXsfFXpWVNcR4Lzs+3kDGit9/gg=
=y32g
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to