Bug 136027 - Static linked binaries are seg faulting
Static linked binaries are seg faulting
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: glibc (Show other bugs)
rawhide
i386 Linux
medium Severity high
: ---
: ---
Assigned To: Jakub Jelinek
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-10-16 18:18 EDT by Brian Bruns
Modified: 2007-11-30 17:10 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-10-18 05:51:53 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
static compiled bash which is seg faulting (972.75 KB, application/octet-stream)
2004-10-16 20:36 EDT, Brian Bruns
no flags Details

  None (edit)
Description Brian Bruns 2004-10-16 18:18:54 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.3)
Gecko/20040910 K-Meleon/0.9

Description of problem:
With the latest glibc version, static linked binaries are seg
faulting.  Regular dynamic linked binaries are working fine.

Backing out glibc to glibc-2.3.3-53 fixes the problem, and once again
the binaries work correctly.

Version-Release number of selected component (if applicable):
glibc-2.3.3-68

How reproducible:
Always

Steps to Reproduce:
1. Upgrade to latest glibc-2.3.3-68
2. Try to run any static linked binary
    

Actual Results:  [root@everest ~]# ldd `which mysql`
        not a dynamic executable


[root@everest ~]# mysql
Segmentation fault


Expected Results:  Program should have run

Additional info:
Comment 1 Rik van Riel 2004-10-16 20:11:59 EDT
While this bug doesn't make much sense (and the filer has admitted it
on irc) , it's filed by somebody whose observation skills I tend to trust.

Wonder if it's got anything to do with prelink and/or non-PIE binaries
breaking, or something else getting in the way ?

If FC3's current libc somehow breaks statically linked binaries from
3rd parties, this might be a showstopper.
Comment 2 Rik van Riel 2004-10-16 20:25:29 EDT
OK, the gdb output I got on irc makes a little more sense.  Looks like
the static binary he has tries to load the vsyscall page ...

<Bruns> Reading symbols from shared object read from target
memory...(no debugging symbols found)...done.
<Bruns> Loaded system supplied DSO at 0xffffe000
<Bruns> Program received signal SIGSEGV, Segmentation fault.
<Bruns> 0x00000000 in ?? ()

No debugging symbols so no backtrace ... but the DSO looks obvious.
Comment 3 Rik van Riel 2004-10-16 20:27:15 EDT
<Bruns> this is a stock 2.6.8.1 kernel

ok, another crucial data point...
Comment 4 Brian Bruns 2004-10-16 20:36:53 EDT
Created attachment 105334 [details]
static compiled bash which is seg faulting

This is one of the multiple static binaries on the system which seg fault when
the glibc is updated.  I can attach more if necessary
Comment 5 Roland McGrath 2004-10-17 15:49:25 EDT
Old static binaries that may use NSS (which bash can, e.g. for ~user
lookups) are not guaranteed to work unless you supply them with the
exact libnss* DSOs from the glibc version originally linked with.
If this is the only problem, this is not something we will change.

If there is a problem with freshly made static binaries, or static
binaries that do not use any dynamic modules at all, then we can look
into it.  But that would need a recipe to make such a binary from
source.  We cannot just use unknown binaries you give us.
Comment 6 Rik van Riel 2004-10-17 16:17:04 EDT
Sounds like an item for the release notes - though admittedly I don't
know enough about glibc to tell for sure...

Roland, if this indeed a release note worthy item, would you mind
writing up a paragraph or so for the FC3 release notes ? ;)
Comment 7 Roland McGrath 2004-10-17 16:21:04 EDT
This is not a new or one-time issue.  It is a specified limitation of
using static linking with glibc.  It should already be documented
somewhere, since it's been true of static linking with glibc since 2.0. 
Comment 8 Jakub Jelinek 2004-10-18 05:51:53 EDT
Furthermore, when linking such statically linked applications,
linker already warns about this, e.g.:
warning: Using 'getgrnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
Comment 9 Brian Bruns 2004-10-26 13:01:36 EDT
I'll note that the breakage is gone with glibc-2.3.3-73, and the
static binaries that were seg faulting are now running fine again.

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