[Bug nptl/34378] New: pthread_create should not return ENOMEM as EAGAIN
fweimer at redhat dot com via Glibc-bugs <[email protected]> Thu, 09 Jul 2026 08:19:33 +0000
| Newsgroups | gmane.comp.lib.glibc.bugs |
|---|---|
| Message-ID | <[email protected]/bugzilla/> |
https://sourceware.org/bugzilla/show_bug.cgi?id=34378
Bug ID: 34378
Summary: pthread_create should not return ENOMEM as EAGAIN
Product: glibc
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: nptl
Assignee: unassigned at sourceware dot org
Reporter: fweimer at redhat dot com
CC: drepper.fsp at gmail dot com
Target Milestone: ---
The EAGAIN failure can be spurious due to kernel task accounting bugs. (Futex
wake due to thread exit happens before all thread resources are deallocated.)
Some applications have retry loops around pthread_create, immediately retrying
again after pthread_create returns fails with EAGAIN, to work around these
kernel bugs. POSIX says we need to report memory allocation failures as EAGAIN,
not just thread-related resource shortages, so applications retry for what is
technically an ENOMEM error because they see it as an EAGAIN error. This is
wasteful.
--
You are receiving this mail because:
You are on the CC list for the bug.