This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
On 08/26/2016 07:01 PM, Carlos O'Donell wrote:
> + pthread_t thr; > + int ret = pthread_create (&thr, attr, thread_func, closure); > + if (ret != 0)Could we make this more robust by looping on EAGAIN and trying to create the thread until it succeeds or we timeout the test? This way embedded systems with less memory might operate correctly, and we might avoid the slow reaping problems in the linux kernel?
This would be undesirable because it would paper over glibc or kernel bugs. Such bugs typically involve races in RLIMIT_NPROC accouting, for example:
<https://sourceware.org/ml/libc-alpha/2012-09/msg00538.html> <https://sourceware.org/ml/libc-alpha/2013-04/msg00294.html>I believe this has subsequently been fixed in the kernel, but it appears to have resurfaced in Linux 4.6+ in some configurations (far fewer than before).
Florian
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |