Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 579804 - sys-libs/glibc-2.22-r4 breaks fork() in old binaries
Summary: sys-libs/glibc-2.22-r4 breaks fork() in old binaries
Status: RESOLVED DUPLICATE of bug 575498
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal critical (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-13 05:41 UTC by Luke-Jr
Modified: 2016-04-13 14:11 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge--info,18.24 KB, text/plain)
2016-04-13 05:41 UTC, Luke-Jr
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Luke-Jr 2016-04-13 05:41:26 UTC
Created attachment 430298 [details]
emerge --info

After upgrading from 2.21-r2, I found I was unable to start new Konsole windows from KDE's quicklauncher. Investigating further in GDB, I discovered that fork() is no longer working as used in KUniqueApplication. Instead of actually forking the process, it instead returns a pointer to __libc_fork. Attempting to reproduce the problem in a test case failed (fork worked normally), so I assume this is an ABI breakage issue.

Breakpoint 1, fork_resolve () at pt-fork.c:38
38  pt-fork.c: No such file or directory.
(gdb) up
#1  0x4ba8e236 in KUniqueApplication::start (flags=...)
    at /var/tmp/portage/kde-base/kdelibs-4.14.16/work/kdelibs-4.14.16/kdeui/kernel/kuniqueapplication.cpp:185
185   int fork_result = fork();
(gdb) down
#0  fork_resolve () at pt-fork.c:40
40  pt-fork.c: No such file or directory.
(gdb) fin
Run till exit from #0  fork_resolve () at pt-fork.c:40
0x4ba8e236 in KUniqueApplication::start (flags=...)
    at /var/tmp/portage/kde-base/kdelibs-4.14.16/work/kdelibs-4.14.16/kdeui/kernel/kuniqueapplication.cpp:185
185   int fork_result = fork();
Value returned is $2 = (__pid_t (*)(void)) 0x47b816f0 <__libc_fork>
(gdb) next
186   switch(fork_result) {
(gdb) print fork_result
$4 = 1203246832
(gdb) print/x fork_result
$5 = 0x47b816f0

Observe that fork_result's value here corresponds to the address of __libc_fork.
Comment 1 Luke-Jr 2016-04-13 05:44:35 UTC
Seems BASH has no trouble fork+exec'ing, and I didn't upgrade BASH after glibc, so not sure what's going on here... apparently not as simple as an ABI issue.
Comment 2 Marcin Mirosław 2016-04-13 08:08:49 UTC
Pleas see bug #575498
Comment 3 SpanKY gentoo-dev 2016-04-13 14:11:28 UTC

*** This bug has been marked as a duplicate of bug 575498 ***