View Issue Details

IDProjectCategoryView StatusLast Update
00019931003.1(2024)/Issue8System Interfacespublic2026-07-28 08:55
Reporterenh Assigned To 
PrioritynormalSeverityEditorialTypeEnhancement Request
Status ResolvedResolutionAccepted As Marked 
NameElliott Hughes
OrganizationGoogle
User Reference
Sectionpthread_create()
Page Number1717
Line Number57305-57041
Interp Status---
Final Accepted Textsee 0001993:0007462
Summary0001993: pthread_create() should allow failure with ENOMEM, not just EAGAIN
Descriptionpthread_create() is currently defined to allow EAGAIN or EPERM. while _some_ resource issues fit EAGAIN, others do not warrant a retry loop. glibc and bionic both want to return ENOMEM in particular as an unretriable failure.
Desired Actionadd

[ENOMEM]
The system lacked the necessary resources to create another thread, and a retry is unlikely to succeed.

to the errors section
Tagstc1-2024

Activities

nick

2026-07-27 15:22

manager   bugnote:0007462

Last edited: 2026-07-27 15:27

Page 507, lines 17839-17841 state:
Implementations may generate error numbers listed here under circumstances other than those
described, if and only if all those error conditions can always be treated identically to the error
conditions as described in this volume of POSIX.1-2024.

Thus it is acceptable for pthread_create to fail with ENOMEM if the new process image requires more memory than is allowed by the
hardware or system-imposed memory management constraints.

However, this is common existing practice; therefore add at page 1717 after line 57040:
    

    The pthread_create() function may fail if:
        

        [ENOMEM] Insufficient memory exists to create the new thread.
    

m.kealey

2026-07-28 08:53

reporter   bugnote:0007463

Something can exist without being available.

Using "exists" in that context implies that there is not sufficient physical memory present in the device to create a new thread, rather than that there is currently insufficient free memory available right now.

That would make ENOMEM practically impossible on most systems.

Issue History

Date Modified Username Field Change
2026-07-21 20:00 enh New Issue
2026-07-27 15:22 nick Note Added: 0007462
2026-07-27 15:24 nick Status New => Resolved
2026-07-27 15:24 nick Resolution Open => Accepted As Marked
2026-07-27 15:24 nick Page Number (page or range of pages) => 1717
2026-07-27 15:24 nick Line Number (Line or range of lines) => 57305-57041
2026-07-27 15:24 nick Interp Status => ---
2026-07-27 15:24 nick Final Accepted Text => see 0001993:0007462
2026-07-27 15:24 nick Tag Attached: tc1-2024
2026-07-27 15:25 nick Note Edited: 0007462
2026-07-27 15:25 nick Note Edited: 0007462
2026-07-27 15:27 nick Note Edited: 0007462
2026-07-28 08:53 m.kealey Note Added: 0007463