Mail archive

Re: [alpine-aports] [PATCH] testing/mongodb: fix for #5117

From: Marc Vertes <>
Date: Tue, 23 Feb 2016 23:46:39 +0100

> Le 23 févr. 2016 à 18:44, Timo Teras <> a écrit :
> So the current patch is wrong. pthread_getattr_np returns valid and
> correct data for non-main threads. Only main thread should get the
> "treatment".
Ok, I agree, there is no need to patch the reporting of stack base / size which are correct (obtained by pthread_getattr_np in a non-main thread).

So the real problem comes from the small default stack size (80k) imposed by musl.

I saw that reducing the quota from 64k to 32k in StackLocator.available() which checks remaining stack space, was enough to avoid the initial crash.

So the normal thing to do would be increase a bit the stack space for created threads.

I can't use pthread_attr_setstacksize before pthread_create, because of the use of C++ threads (what a pile of crap!). I tried to force a non-zero stacksize in PR_CreateThread(), but it seems to do nothing.

The 2 last remaining options: test if g++ -fsplit-stack would work, or reduce quota as mentioned before.

What do you think ?


Received on Tue Feb 23 2016 - 23:46:39 UTC