X-Original-To: alpine-aports@mail.alpinelinux.org Delivered-To: alpine-aports@mail.alpinelinux.org Received: from mail.alpinelinux.org (dallas-a1.alpinelinux.org [127.0.0.1]) by mail.alpinelinux.org (Postfix) with ESMTP id 812AEDC5D95 for ; Tue, 23 Feb 2016 14:41:30 +0000 (UTC) Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.alpinelinux.org (Postfix) with ESMTPS id 40AE6DC2BCC for ; Tue, 23 Feb 2016 14:41:29 +0000 (UTC) Received: from mfilter31-d.gandi.net (mfilter31-d.gandi.net [217.70.178.162]) by relay6-d.mail.gandi.net (Postfix) with ESMTP id 1589BFB8E8; Tue, 23 Feb 2016 15:41:27 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mfilter31-d.gandi.net Received: from relay6-d.mail.gandi.net ([IPv6:::ffff:217.70.183.198]) by mfilter31-d.gandi.net (mfilter31-d.gandi.net [::ffff:10.0.15.180]) (amavisd-new, port 10024) with ESMTP id LmBoC1-qgRB8; Tue, 23 Feb 2016 15:41:25 +0100 (CET) X-Originating-IP: 193.248.36.207 Received: from [192.168.1.217] (LCaen-656-1-170-207.w193-248.abo.wanadoo.fr [193.248.36.207]) (Authenticated sender: marc.vertes@ugrid.net) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id E0A7BFB8F4; Tue, 23 Feb 2016 15:41:24 +0100 (CET) Content-Type: text/plain; charset=utf-8 X-Mailinglist: alpine-aports Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: Mime-Version: 1.0 (Mac OS X Mail 9.2 \(3112\)) Subject: Re: [alpine-aports] [PATCH] testing/mongodb: fix bug #5117 where mongo fails at start From: Marc Vertes In-Reply-To: <20160223150743.33e55efa@vostro.util.wtbts.net> Date: Tue, 23 Feb 2016 15:41:23 +0100 Cc: alpine-aports@lists.alpinelinux.org Content-Transfer-Encoding: quoted-printable Message-Id: <9D775D86-8A4D-49ED-8512-EBD572ECF6D6@ugrid.net> References: <1456083383-9196-1-git-send-email-marc.vertes@ugrid.net> <20160223150743.33e55efa@vostro.util.wtbts.net> To: Timo Teras X-Mailer: Apple Mail (2.3112) X-Virus-Scanned: ClamAV using ClamSMTP > Le 23 f=C3=A9vr. 2016 =C3=A0 14:07, Timo Teras a = =C3=A9crit : >=20 > On Sun, 21 Feb 2016 19:36:23 +0000 > Marc Vertes wrote: >=20 >> The check for recursion has been disabled, as it makes mongo shell >> aborting at start. There may be a better fix, perhaps ensuring >> that recursion is OK under musl, and maybe increasing stack space ? >=20 > Could you try if the following works instead: >=20 >=20 > --- /dev/null > +++ b/testing/mongodb/musl-process-stack-size.patch > @@ -0,0 +1,22 @@ > +--- = mongodb-src-r3.2.1.orig/src/mongo/platform/stack_locator_pthread_getattr_n= p.cpp > ++++ = mongodb-src-r3.2.1/src/mongo/platform/stack_locator_pthread_getattr_np.cpp= > +@@ -31,6 +31,7 @@ > + #include "mongo/platform/stack_locator.h" > +=20 > + #include > ++#include > +=20 > + #include "mongo/util/assert_util.h" > + #include "mongo/util/scopeguard.h" > +@@ -52,6 +53,11 @@ > + invariant(result =3D=3D 0); > + invariant(base !=3D nullptr); > + invariant(size !=3D 0); > ++ > ++ struct rlimit rl; > ++ > ++ invariant(getrlimit(RLIMIT_STACK, &rl) =3D=3D 0); > ++ size =3D rl.rlim_cur ? : 2 * 1024 * 1024; > +=20 > + // TODO: Assumes a downward growing stack. Note here that > + // getstack returns the stack *base*, being the bottom of the > --=20 > 2.7.1 >=20 It doesn't work. And on my side, I tried a similar modification (using = getrlimit) in src/third_party/mozjs-38/extract/js/src/jsnativestack.cpp = without success.=20 But I found a separate patch which works: --- src/mongo/scripting/mozjs/implscope.cpp.orig +++ src/mongo/scripting/mozjs/implscope.cpp @@ -258,6 +258,7 @@ // // TODO: What if we are running on a platform with very // large pages, like 4MB? + //JS_SetNativeStackQuota(_runtime, available.get() - (64 * = 1024)); JS_SetNativeStackQuota(_runtime, available.get() - (32 * = 1024)); } =20 So I believe that it should be a matter of increasing allocated stack at = thread creation. I'm still not able to do that, despite my various = attempts. Marc= --- Unsubscribe: alpine-aports+unsubscribe@lists.alpinelinux.org Help: alpine-aports+help@lists.alpinelinux.org ---