This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [patch] Fix for BZ 22207 -- intermittent failure to create threads on 32-bit machines
- From: Florian Weimer <fweimer at redhat dot com>
- To: Paul Pluzhnikov <ppluzhnikov at google dot com>, GLIBC Devel <libc-alpha at sourceware dot org>
- Cc: "H.J. Lu" <hjl dot tools at gmail dot com>
- Date: Tue, 26 Sep 2017 08:04:28 +0200
- Subject: Re: [patch] Fix for BZ 22207 -- intermittent failure to create threads on 32-bit machines
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx06.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx06.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=fweimer at redhat dot com
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 96E3B25C28
- References: <CALoOobOc1oypj=cDpFHoL-bCJ8qC9aEPB6RnbSQ7=umAWp4KHw@mail.gmail.com>
On 09/26/2017 02:09 AM, Paul Pluzhnikov wrote:
+ /* With default 8MiB Linux stack size, creating 1024 threads can cause
+ VM exhausiton on 32-bit machines. Reduce stack size of each thread to
+ 128KiB for a maximum required VM size of 128MiB. */
+ xpthread_attr_setstacksize (&attr, 128 * 1024);
Is there a reason why you do not use PTHREAD_STACK_MIN?
Thanks,
Florian