Bug 136027 - Static linked binaries are seg faulting
Summary: Static linked binaries are seg faulting
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: glibc
Version: rawhide
Hardware: i386
OS: Linux
medium
high
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-10-16 22:18 UTC by Brian Bruns
Modified: 2007-11-30 22:10 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-10-18 09:51:53 UTC
Type: ---
Embargoed:


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

Description Brian Bruns 2004-10-16 22:18:54 UTC
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-17 00:11:59 UTC
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-17 00:25:29 UTC
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-17 00:27:15 UTC
<Bruns> this is a stock 2.6.8.1 kernel

ok, another crucial data point...

Comment 4 Brian Bruns 2004-10-17 00:36:53 UTC
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 19:49:25 UTC
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 20:17:04 UTC
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 20:21:04 UTC
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 09:51:53 UTC
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 17:01:36 UTC
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.