Bug 458861 - [RHEL5] sprof is unable to dlopen shared libraries
Summary: [RHEL5] sprof is unable to dlopen shared libraries
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: glibc
Version: 5.2
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Jakub Jelinek
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-08-12 18:01 UTC by Olivier Fourdan
Modified: 2018-10-20 03:11 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-01-20 20:50:40 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Patch to add __RTLD_SPROF to dlopen_doit() mask (582 bytes, patch)
2008-08-12 18:01 UTC, Olivier Fourdan
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
CentOS 3021 0 None None None Never
Red Hat Product Errata RHBA-2009:0080 0 normal SHIPPED_LIVE glibc bug fix and enhancement update 2009-01-20 16:04:18 UTC

Description Olivier Fourdan 2008-08-12 18:01:45 UTC
Created attachment 314122 [details]
Patch to add __RTLD_SPROF to dlopen_doit() mask

Description of problem:

In recent glibc such as the one included in RHEL5, sprof is not able to open shared librairies anymore. That used to work in previous versions of the glibc such as the one we shipped in RHEL4

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

glibc-2.5-24

How reproducible:

100% reproducible

Steps to Reproduce:

1. LD_PROFILE_OUTPUT=${PWD}  LD_PROFILE=libgtk-x11-2.0.so.0 gnome-calculator
2. sprof libgtk-x11-2.0.so.0
3.

Actual results:

sprof: failed to load shared object `libgtk-x11-2.0.so.0'

Expected results:

Flat profile:

Each sample counts as 0.01 seconds.
  %   cumulative   self              self     total
 time   seconds   seconds    calls  us/call  us/call  name

index % time    self  children    called     name

[0]      0.0    0.00    0.00        0         g_param_spec_object [0]
...

Additional info:

The bug was introduced in dlfcn/dlopen.c in dlopen_doit() by adding a mask for the mode and that mode is missing __RTLD_SPROF so that sprof cannot open the shared lib.

The patch attached adds __RTLD_SPROF to the mode mode so that sprof works.

Comment 1 Ulrich Drepper 2008-09-17 03:13:08 UTC
Checked in upstream.  Should be backported.

Comment 3 RHEL Program Management 2008-09-19 08:31:01 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 6 Issue Tracker 2008-10-30 19:14:23 UTC
Another lead to follow up on. It might be that we can use some of the
userspace stap stuff. Evidently it is beginning to show up in 5.3.

Date: Fri, 17 Oct 2008 11:08:40 -0400
From: William Cohen <wcohen>
User-Agent: Thunderbird 2.0.0.16 (X11/20080723)
MIME-Version: 1.0
To: Adam Jackson <ajax>
Subject: Re: RHEL Tools roadmap (internal use only for now)
References: <48F7A4E3.3000305>
        <1224254556.11508.26.camel.devel.redhat.com>
In-Reply-To: <1224254556.11508.26.camel.devel.redhat.com>
X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26
X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26
X-loop: tools
Cc: tools <tools>
X-BeenThere: tools
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <tools.redhat.com>
List-Unsubscribe:
<http://post-office.corp.redhat.com/mailman/listinfo/tools>, 
        <tools-request?subject=unsubscribe>
List-Archive: <http://post-office.corp.redhat.com/archives/tools>
List-Post: <tools>
List-Help: <tools-request?subject=help>
List-Subscribe:
<http://post-office.corp.redhat.com/mailman/listinfo/tools>,
        <tools-request?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: tools-bounces
Errors-To: tools-bounces

Adam Jackson wrote:
> On Thu, 2008-10-16 at 13:32 -0700, Eric Bachalo wrote:
>> Attached is latest draft of RHEL tools roadmap slides.
>> Any comments are welcome.
> 
> I note userspace probing in systemtap in 5.3.  Neat!  A brief search on
> the systemtap wiki isn't turning up much about how to do this though.
> Got docs?

Hi Ajax,

You might use "man stapprobes" on with the systemtap-0.7.2-1.el5 in RHELU3
beta 
for more information on user-space probes.


-Will



This event sent from IssueTracker by woodard 
 issue 197199
it_file 169209

Comment 9 errata-xmlrpc 2009-01-20 20:50:40 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2009-0080.html


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