Bug 2502638 - posix_spawn_file_actions_addchdir replacement becomes an infinite loop with glibc 2.44 prerelease header-only POSIX alias
Summary: posix_spawn_file_actions_addchdir replacement becomes an infinite loop with ...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: glibc
Version: rawhide
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Carlos O'Donell
QA Contact: Fedora Extras Quality Assurance
URL: https://sourceware.org/bugzilla/show_...
Whiteboard:
Depends On:
Blocks: 2485708
TreeView+ depends on / blocked
 
Reported: 2026-07-19 19:06 UTC by Jason Montleon
Modified: 2026-08-03 21:03 UTC (History)
19 users (show)

Fixed In Version: gnulib-0-60.20260801git9748dc4.fc45
Clone Of:
Environment:
Last Closed: 2026-08-03 20:59:37 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Sourceware 34437 0 None None None 2026-07-31 13:45:11 UTC

Description Jason Montleon 2026-07-19 19:06:41 UTC
Since glibc commit 7594b4e ("posix: Add POSIX aliases to some spawn functions", Lucas Chollet, committed to master 2026-04-07 during the 2.44 development cycle) tests are failing, hanging until the build is cancelled for at least m4, gettext, and gnulib.

This commit is included in Fedora since glibc-2.43.9000-9.fc45

To reproduce you can do as little as:
```
cat << EOF > test.c
#include <spawn.h>
 
int
posix_spawn_file_actions_addchdir (posix_spawn_file_actions_t *fa,
                                   const char *path)
{
  return posix_spawn_file_actions_addchdir_np (fa, path);
}
 
int
main (void)
{
  posix_spawn_file_actions_t fa;
  posix_spawn_file_actions_init (&fa);
  return posix_spawn_file_actions_addchdir (&fa, "/");
}
EOF
 
gcc -D_GNU_SOURCE -O2 -o test test.c && ./test
```

Without `-D_GNU_SOURCE -O2` you will not see a problem.

_USE_XOPEN2K24XSI is only defined when _XOPEN_SOURCE >= 800, and _GNU_SOURCE implies _XOPEN_SOURCE 800. With -O2 it hangs, otherwise it crashes.

Reproducible: Always

Steps to Reproduce:
1. Try to build m4, gettext, or gnulib in rawhide
2. Observe that tests hang and never complete
Actual Results:
Test hang

Expected Results:
Tests complete

Additional Information:
I have not found any reports or fixes against glibc, gnulib, m4, or gettext upstream, only a report against gnulib at https://bugzilla.redhat.com/show_bug.cgi?id=2485708

We have observed the m4, gettext, and gnulib builds hanging on https://riscv-kojipkgs.fedoraproject.org/koji/ but it appears they also did on the main koji during the mass rebuild.

Comment 1 Sergio Basto 2026-07-23 01:25:26 UTC
I updated Gnulib to the stable-202607 branch and the latest git snapshot, but we are still unable to complete the test suite. 

The Fedora Koji build consistently hangs after PASS: test-error.sh:
https://koji.fedoraproject.org/koji/taskinfo?taskID=148168073

This appears to be the same infinite loop issue described in this bug

Comment 2 Peter Lemenkov 2026-08-03 20:59:37 UTC
I've just finished building a gnulib-0-57.20260302git4a3650d.fc45 which contains all the fixes required.

Comment 3 Peter Lemenkov 2026-08-03 21:03:49 UTC
Sorry I meant gnulib-0-60.20260801git9748dc4.fc45 of course


Note You need to log in before you can comment on or make changes to this bug.