Reproduced on stonking with glibc 2.44-1ubuntu1. glibc 2.44 <spawn.h> redirects posix_spawn_file_actions_addchdir to posix_spawn_file_actions_addchdir_np via __REDIRECT_NTH. gnulib compiles spawn_faction_addchdir.c to call posix_spawn_file_actions_addchdir_np. Because asm redirection cannot be removed with #undef, gcc emits posix_spawn_file_actions_addchdir_np calling itself. This causes infinite recursion: - i386 crashes with SIGSEGV (exit code 139). - amd64, arm64, ppc64el hang in test-execute.sh and test-posix_spawn-chdir until builder timeout.
glibc 2.44 already implements posix_spawn_file_actions_addchdir in libc. The patch guards spawn_faction_addchdir.c under defined __GLIBC__ && defined __USE_XOPEN2K24XSI so gnulib does not redefine it, letting callers link directly to libc. Verified on stonking (glibc 2.44-1ubuntu1, amd64): - test-execute.sh: PASS - test-posix_spawn-chdir: PASS - all 478 gnulib tests pass/skip with 0 failures, full package builds. Debian BTS: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1149910 Attached debdiff: gettext_1.0-5ubuntu1.debdiff ** Description changed: + [ Impact ] + gettext 1.0-5 fails to build from source on Ubuntu stonking with glibc >= 2.44. + During dh_auto_test, tests calling posix_spawn with chdir action (test-posix_spawn-chdir and test-execute.sh) fail: + - On i386: crash with SIGSEGV (exit code 139) from infinite recursion. + - On amd64, arm64, ppc64el, s390x: child processes hang until the 150-minute builder timeout. + This blocks gettext in stonking-proposed. + + [ Fix ] + In glibc 2.44, <spawn.h> redirects posix_spawn_file_actions_addchdir to posix_spawn_file_actions_addchdir_np via __REDIRECT_NTH. + gnulib compiles spawn_faction_addchdir.c to call posix_spawn_file_actions_addchdir_np. + Because asm redirection cannot be undone by #undef, gcc emits posix_spawn_file_actions_addchdir_np calling itself. + + The patch guards spawn_faction_addchdir.c under defined __GLIBC__ && + defined __USE_XOPEN2K24XSI. On glibc >= 2.44, libc already provides the + function, so gnulib skips redefining it and callers link directly to + libc. + + [ Test Plan ] + 1. On Ubuntu stonking with glibc 2.44-1ubuntu1: + dpkg-buildpackage -b -uc -us + 2. Verify gnulib tests pass: + PASS: test-execute.sh + PASS: test-posix_spawn-chdir + 3. Verify binary deb packages are built. + + [ Where problems could occur ] + The guard is restricted to '#if defined __GLIBC__ && defined __USE_XOPEN2K24XSI'. Older glibc versions or non-glibc systems use existing code. + glibc 2.44 provides posix_spawn_file_actions_addchdir directly in libc.so.6. + + [ Other Info ] + - Debian BTS report: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1149910 + - Development series: stonking (26.10) + - Target release: Ubuntu stonking + - Bug reference: LP: #2167365 + + --- [ Original Report ] gettext 1.0-5 fails to build from source in stonking. Regressing architectures (built before, fail now): amd64, amd64v3, arm64, armhf, i386, ppc64el, s390x. Build log(s): - https://launchpad.net/ubuntu/+source/gettext/1.0-5/+build/33595016/+files/buildlog_ubuntu-stonking-amd64.gettext_1.0-5_BUILDING.txt.gz - https://launchpad.net/ubuntu/+source/gettext/1.0-5/+build/33595017/+files/buildlog_ubuntu-stonking-amd64v3.gettext_1.0-5_BUILDING.txt.gz - https://launchpad.net/ubuntu/+source/gettext/1.0-5/+build/33595018/+files/buildlog_ubuntu-stonking-arm64.gettext_1.0-5_BUILDING.txt.gz - https://launchpad.net/ubuntu/+source/gettext/1.0-5/+build/33595019/+files/buildlog_ubuntu-stonking-armhf.gettext_1.0-5_BUILDING.txt.gz - https://launchpad.net/ubuntu/+source/gettext/1.0-5/+build/33595020/+files/buildlog_ubuntu-stonking-i386.gettext_1.0-5_BUILDING.txt.gz - https://launchpad.net/ubuntu/+source/gettext/1.0-5/+build/33595021/+files/buildlog_ubuntu-stonking-ppc64el.gettext_1.0-5_BUILDING.txt.gz - https://launchpad.net/ubuntu/+source/gettext/1.0-5/+build/33595023/+files/buildlog_ubuntu-stonking-s390x.gettext_1.0-5_BUILDING.txt.gz - Diagnosis (deterministic matcher): testsuite-failure — dh_auto_test: + Diagnosis (deterministic matcher): testsuite-failure -> dh_auto_test: error: make -j1 check TESTSUITEFLAGS="-j1 --verbose" VERBOSE=1 returned exit code 2. Root Cause Analysis: gnulib tests (test-posix_spawn-chdir, test-execute.sh) segfault (i386) or hang (amd64) across most architectures due to a known incompatibility with glibc 2.44. The failure is caused by a known gnulib posix_spawn wrapper conflict with glibc 2.44 headers that leads to infinite recursion. Fixing it requires updating the gnulib submodule or backporting specific gnulib/glibc patches, which is too complex for an automated patch. ** Changed in: gettext (Ubuntu) Status: New => Confirmed ** Tags added: patch ** Bug watch added: Debian Bug tracker #1149910 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1149910 ** Patch added: "gettext 1.0-5ubuntu1 debdiff for stonking" https://bugs.launchpad.net/ubuntu/+source/gettext/+bug/2167365/+attachment/6005437/+files/gettext_1.0-5ubuntu1.debdiff ** Also affects: gettext (Debian) via https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1149910 Importance: Unknown Status: Unknown -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2167365 Title: gettext 1.0-5 FTBFS on amd64, amd64v3, arm64, armhf, i386, ppc64el, s390x To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/gettext/+bug/2167365/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
