This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 905184 - Ld.so.cache ignored on arm when objects that have ABI headers are mixed with objects without.
Ld.so.cache ignored on arm when objects that have ABI headers are mixed with ...
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: glibc (Show other bugs)
18
arm Linux
unspecified Severity high
: ---
: ---
Assigned To: Carlos O'Donell
Fedora Extras Quality Assurance
:
Depends On:
Blocks: ARMTracker
  Show dependency treegraph
 
Reported: 2013-01-28 14:16 EST by Brendan Conoboy
Modified: 2013-03-31 15:00 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-03-31 15:00:53 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Sourceware 15006 None None None Never

  None (edit)
Description Brendan Conoboy 2013-01-28 14:16:55 EST
Description of problem:

A patch to binutils (http://sourceware.org/git/?p=binutils.git;a=commit;h=cd49363b8ae1725522ea29ccc0dda7b138f3d5aa) has introduced an unintended regression in ld.so.  Specifically, when an object that has the new ABI header is compared against an object that has *no* ABI header it is considered a mismatch in ld.so.cache.  The desired behavior is that no ABI header is treat it as the equivalent of a wildcard.

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

Unknown.  Presumably the behavior has been in glibc for a while but only came up as a result of binutils adding the elf fields glibc needed.

How reproducible:

Every time.

Steps to Reproduce:
1. Install a library that is only available via ld.so.cache (EG, /usr/lib/atlas/libf177blas.so).  This library will be visable via 'ldconfig -p'.
2. Link an executable with -L/usr/lib/atlas
3. Running the executable will result in libf177blas.so not being found.
4. If you add /usr/lib/atlas to LD_LIBRARY_PATH the executable will work.  It's just ld.so.cache that is broken.
  
Actual results:

Shared library not found.

Expected results:

Dynamic linker finds library, proceeds normally.

Additional info:

Binutils is doing the right thing by marking objects with their ABI, but we can't retroactively fix all the objects built prior to the October/November binutils update.  We just need glibc to treat unmarked objects as using the same ABI as objects that are marked.
Comment 1 Fedora Admin XMLRPC Client 2013-01-28 15:09:38 EST
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 2 Carlos O'Donell 2013-01-29 10:16:51 EST
Working on a fix for this.
Comment 3 Carlos O'Donell 2013-02-05 18:27:11 EST
Still working on this.

I've been informed that this should be checked in ASAP e.g. tonight or tomorrow.

I can't get it all done tonight, I still need some more testing.

Likely tomorrow morning, and post upstream, and get it into rawhide.
Comment 4 Carlos O'Donell 2013-02-05 18:27:40 EST
Any other branches that this needs checking into?
Comment 5 Brendan Conoboy 2013-02-05 18:50:11 EST
Please check in to both f18 updates and rawhide.
Comment 6 Carlos O'Donell 2013-02-06 14:52:07 EST
Retesting patch.
Comment 7 Carlos O'Donell 2013-02-07 00:14:37 EST
Patch sent upstream:
http://sourceware.org/ml/libc-alpha/2013-02/msg00120.html

We want to reserve the ld.so.cache value with upstream before we use it.
Comment 8 Carlos O'Donell 2013-02-07 22:54:50 EST
Upstream accepted the patch.

I'll commit upstream tomorrow.

I'm almost done the rawhide commit, but I've run out of time tonight.

I'll commit rawhide tomorrow morning.

Following the rawhide committ I'll do a larger backport to F18. The F18 backport requires more additional changes and more testing.
Comment 9 Carlos O'Donell 2013-02-08 11:39:52 EST
The fix for this is in rawhide and thus F19.

Still working on the F18 fix.
Comment 10 Carlos O'Donell 2013-02-08 12:33:52 EST
Committed upstream:

commit b39949d21179bd0b08a083e4f7e35d0c98e11294
Author: Carlos O'Donell <carlos@redhat.com>
Date:   Fri Feb 8 12:26:12 2013 -0500

    ARM: Support loading unmarked objects from cache.
    
    ARM now supports loading unmarked objects from
    the dynamic loader cache. Unmarked objects can
    be used with the hard-float or soft-float ABI.
    We must support loading unmarked objects during
    the transition period from a binutils that does
    not mark objects to one that does mark them with
    the correct ELF flags.
    
    Signed-off-by: Carlos O'Donell <carlos@redhat.com>
Comment 11 Carlos O'Donell 2013-02-08 12:44:55 EST
Brendan,

Can you confirm that you actually see this issue in F18?

The F18 glibc is based on 2.16 which doesn't have any of the code to safely support mixed ABI environments. The 2.16 loader will load any of the objects from any of the ABIs.

Therefore there can be no bug in F18. At best it would be a new feature request for F18.

Can you confirm please?
Comment 12 Brendan Conoboy 2013-02-08 15:40:20 EST
Have not observed on F18.  As long as an F18 doesn't contain the mixed ABI recognition code we no need to do anything there.
Comment 13 Peter Robinson 2013-03-31 15:00:53 EDT
Fixed in F-19+

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