Bug 458861

Summary: [RHEL5] sprof is unable to dlopen shared libraries
Product: Red Hat Enterprise Linux 5 Reporter: Olivier Fourdan <ofourdan>
Component: glibcAssignee: Jakub Jelinek <jakub>
Status: CLOSED ERRATA QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.2CC: dmair, drepper, fweimer, jan.kratochvil, kem, philip.r.schaffner, pmuller, tao
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-01-20 20:50:40 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Patch to add __RTLD_SPROF to dlopen_doit() mask none

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