* [Bug 219947] Undocumented EAGAIN behavior for clone/pthread_create
2025-03-28 10:26 [Bug 219947] New: Undocumented EAGAIN behavior for clone/pthread_create bugzilla-daemon
@ 2025-03-28 18:28 ` bugzilla-daemon
2025-03-28 18:37 ` bugzilla-daemon
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: bugzilla-daemon @ 2025-03-28 18:28 UTC (permalink / raw)
To: linux-man
https://bugzilla.kernel.org/show_bug.cgi?id=219947
Carlos O'Donell (carlos@redhat.com) changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |carlos@redhat.com
--- Comment #1 from Carlos O'Donell (carlos@redhat.com) ---
Error number EGAIN is the best error return code for this scenario, from among
those that pthread_create() can return.
The in-progress execve() could fail, at which point pthread_create() called
again would succeed.
It deserves documenting that pthread_create() could fail with EAGAIN if an
in-progress execve() is making forward-progress ahead of the thread, but could
fail, in which case the thread could be created later.
--
You may reply to this email to add a comment.
You are receiving this mail because:
You are watching the assignee of the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread* [Bug 219947] Undocumented EAGAIN behavior for clone/pthread_create
2025-03-28 10:26 [Bug 219947] New: Undocumented EAGAIN behavior for clone/pthread_create bugzilla-daemon
2025-03-28 18:28 ` [Bug 219947] " bugzilla-daemon
@ 2025-03-28 18:37 ` bugzilla-daemon
2025-03-28 19:44 ` bugzilla-daemon
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: bugzilla-daemon @ 2025-03-28 18:37 UTC (permalink / raw)
To: linux-man
https://bugzilla.kernel.org/show_bug.cgi?id=219947
--- Comment #2 from Carlos O'Donell (carlos@redhat.com) ---
Example:
diff --git a/man/man3/pthread_create.3 b/man/man3/pthread_create.3
index 22926990e..ecb08b8e2 100644
--- a/man/man3/pthread_create.3
+++ b/man/man3/pthread_create.3
@@ -126,6 +126,12 @@ or the maximum number of PIDs,
was reached (see
.BR proc (5)).
.TP
+.B EAGAIN
+An in-progress kernel operation is preventing the creation of the
+thread, e.g.
+.BR execve (2),
+but if such an operation fails, the thread creation can be retried.
+.TP
.B EINVAL
Invalid settings in
.IR attr .
---
Note that I'm not saying that the kernel implementation is right or wrong. I
think it's an open design question if you should block, or return EAGAIN. Each
has pros and cons.
--
You may reply to this email to add a comment.
You are receiving this mail because:
You are watching the assignee of the bug.
^ permalink raw reply related [flat|nested] 6+ messages in thread* [Bug 219947] Undocumented EAGAIN behavior for clone/pthread_create
2025-03-28 10:26 [Bug 219947] New: Undocumented EAGAIN behavior for clone/pthread_create bugzilla-daemon
2025-03-28 18:28 ` [Bug 219947] " bugzilla-daemon
2025-03-28 18:37 ` bugzilla-daemon
@ 2025-03-28 19:44 ` bugzilla-daemon
2025-03-28 21:25 ` bugzilla-daemon
2025-03-31 6:57 ` bugzilla-daemon
4 siblings, 0 replies; 6+ messages in thread
From: bugzilla-daemon @ 2025-03-28 19:44 UTC (permalink / raw)
To: linux-man
https://bugzilla.kernel.org/show_bug.cgi?id=219947
Alejandro Colomar (alx@kernel.org) changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |alx@kernel.org
--- Comment #3 from Alejandro Colomar (alx@kernel.org) ---
(In reply to Carlos O'Donell from comment #2)
> Example:
>
> diff --git a/man/man3/pthread_create.3 b/man/man3/pthread_create.3
> index 22926990e..ecb08b8e2 100644
> --- a/man/man3/pthread_create.3
> +++ b/man/man3/pthread_create.3
> @@ -126,6 +126,12 @@ or the maximum number of PIDs,
> was reached (see
> .BR proc (5)).
> .TP
> +.B EAGAIN
> +An in-progress kernel operation is preventing the creation of the
> +thread, e.g.
> +.BR execve (2),
> +but if such an operation fails, the thread creation can be retried.
> +.TP
> .B EINVAL
> Invalid settings in
> .IR attr .
> ---
>
> Note that I'm not saying that the kernel implementation is right or wrong. I
> think it's an open design question if you should block, or return EAGAIN.
> Each has pros and cons.
Would you mind sending the patch to the mailing list, with a commit message
(i.e., full output of git-format-patch(1))?
--
You may reply to this email to add a comment.
You are receiving this mail because:
You are watching the assignee of the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread* [Bug 219947] Undocumented EAGAIN behavior for clone/pthread_create
2025-03-28 10:26 [Bug 219947] New: Undocumented EAGAIN behavior for clone/pthread_create bugzilla-daemon
` (2 preceding siblings ...)
2025-03-28 19:44 ` bugzilla-daemon
@ 2025-03-28 21:25 ` bugzilla-daemon
2025-03-31 6:57 ` bugzilla-daemon
4 siblings, 0 replies; 6+ messages in thread
From: bugzilla-daemon @ 2025-03-28 21:25 UTC (permalink / raw)
To: linux-man
https://bugzilla.kernel.org/show_bug.cgi?id=219947
--- Comment #4 from Carlos O'Donell (carlos@redhat.com) ---
(In reply to Alejandro Colomar from comment #3)
> Would you mind sending the patch to the mailing list, with a commit message
> (i.e., full output of git-format-patch(1))?
I'd like to give Kramer the opportunity to review, and possibly post their own
version, otherwise I'll post a patch next week.
--
You may reply to this email to add a comment.
You are receiving this mail because:
You are watching the assignee of the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread* [Bug 219947] Undocumented EAGAIN behavior for clone/pthread_create
2025-03-28 10:26 [Bug 219947] New: Undocumented EAGAIN behavior for clone/pthread_create bugzilla-daemon
` (3 preceding siblings ...)
2025-03-28 21:25 ` bugzilla-daemon
@ 2025-03-31 6:57 ` bugzilla-daemon
4 siblings, 0 replies; 6+ messages in thread
From: bugzilla-daemon @ 2025-03-31 6:57 UTC (permalink / raw)
To: linux-man
https://bugzilla.kernel.org/show_bug.cgi?id=219947
--- Comment #5 from L. Kramer (lennart.kramer@wibu.com) ---
> I'd like to give Kramer the opportunity to review, and possibly post their
> own version, otherwise I'll post a patch next week.
Yeah I'm fine with the wording. Would it make sense to also add a similar note
to the clone man page?
--
You may reply to this email to add a comment.
You are receiving this mail because:
You are watching the assignee of the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread