Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 225485

Summary: Intermittent segvs when prelink enabled
Product: [Fedora] Fedora Reporter: Ed Swierk <eswierk>
Component: kernelAssignee: Jakub Jelinek <jakub>
Status: CLOSED DUPLICATE QA Contact:
Severity: high Docs Contact:
Priority: medium    
Version: 6CC: n3npq
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-10-09 15:31:39 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Attachments:
Description Flags
/bin/ping and libraries before prelink -ua
none
/bin/ping and libraries after prelink -ua
none
/bin/ping coredump
none
/bin/su coredump none

Description Ed Swierk 2007-01-30 21:08:06 UTC
On a few of our FC6 machines, various programs intermittently crash with
SIGSEGV.  The two easiest test cases are:

  while ping -c 1 localhost; do :; done >/dev/null

and

  while sudo su -c true; do :; done >/dev/null

Each fails after a few seconds to a minute.

All the machines in question are running 32-bit i386 FC6, and have
prelink-0.3.9-2, glibc-2.5-10.fc6 installed.  Some were upgraded from FC4, while
others were installed with FC6 from scratch.  Some are single-core Celerons and
others are dual-core Pentium Ds.  There is no apparent correlation between the
machine's configuration and whether the crashing occurs on the machine.

On one machine, I tarred up /bin/ping and its dependent shared libraries, then
disabled prelink and ran "prelink -ua".  After this, the above tests do not crash.

Comment 1 Ed Swierk 2007-01-30 21:08:06 UTC
Created attachment 146963 [details]
/bin/ping and libraries before prelink -ua

Comment 2 Ed Swierk 2007-01-30 21:09:18 UTC
Created attachment 146964 [details]
/bin/ping and libraries after prelink -ua

Comment 3 Ed Swierk 2007-01-30 21:10:36 UTC
This issue seems related to (if not a duplicate of) bug 110665.

Comment 4 Ed Swierk 2007-01-30 21:15:41 UTC
Actually, the crash occurs on all our FC6 machines.  The ones I thought were
okay are actually still running FC4.


Comment 5 Jakub Jelinek 2007-01-30 21:23:34 UTC
ping is a PIE, my guess this is a dup of #217614.
What exact glibc do you have installed?  *.i686.rpm or *.i386.rpm?
Can you get a core dump?  ulimit -c unlimited; while ping -c 1 localhost; do :;
done >/dev/null
?  You'd need to run it as root, otherwise setuid ping won't create a core dump.

Comment 6 Ed Swierk 2007-01-30 21:45:34 UTC
Created attachment 146967 [details]
/bin/ping coredump

Comment 7 Ed Swierk 2007-01-30 21:46:13 UTC
Created attachment 146968 [details]
/bin/su coredump

Comment 8 Ed Swierk 2007-01-30 21:49:25 UTC
# rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' glibc iputils
coreutils prelink
glibc-2.5-10.fc6.i686
iputils-20020927-41.fc6.i386
coreutils-5.97-12.3.fc6.i386
prelink-0.3.9-2.i386


Comment 9 Jeff Johnson 2007-04-23 15:49:12 UTC
Yes, likely dupe of #217614.

I've just managed to figure a "fix" by unprelinking the libraries
that /bin/ping is linked too, cureing a previously observed segfault:

[root@skyline ~]# sh t
completed: 1867
[root@skyline ~]# prelink --undo /lib/libresolv.so.2
[root@skyline ~]# sh t
completed: 97
[root@skyline ~]# sh t
completed: 1746
[root@skyline ~]# prelink --undo /lib/tls/libc.so.6
[root@skyline ~]# sh t
completed: 11705
[root@skyline ~]# prelink --undo /lib/ld-linux.so.2
[root@skyline ~]# sh t
<... still running == likely fixed ...>

Here's the dinky t script:

#!/bin/sh

i=0
while `/bin/ping -c1 -w1 127.0.0.1 >& /dev/null`
do
    i="`expr $i + 1`"
done

echo "completed: $i"

Comment 10 Jeff Johnson 2007-04-23 15:52:25 UTC
Note that there was another element in #217614, whether glibc.i386 or glibc.i686 is installed.

My comment #9 has these (FC6 kernel, CentOS4.4 glibc&ping) packages installed:

[root@skyline ~]# rpm -q glibc kernel iputils
glibc-2.3.4-2.25.i686
kernel-2.6.18-1.2849prerel3.0.0_60.44.0.i686
iputils-20020927-18.EL4.3.i386




Comment 11 Jeff Johnson 2007-04-23 16:34:50 UTC
This appears the minimum necessary change to "cure" /bin/ping segfaults:

root@gt40 ~]# sh t
completed: 1076
[root@gt40 ~]# prelink --undo /lib/ld-linux.so.2
[root@gt40 ~]# sh t

< --- running almost an hour --- >

I can reproduce this problem on demand if that helps.

Comment 12 Jakub Jelinek 2007-10-09 15:31:39 UTC

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