Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1752466

Summary: systemtap's probefunc() broken with gcc-toolset-9-binutils
Product: Red Hat Enterprise Linux 8 Reporter: Martin Cermak <mcermak>
Component: systemtapAssignee: Frank Ch. Eigler <fche>
systemtap sub component: gcc-toolset-10 QA Contact: Martin Cermak <mcermak>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: unspecified CC: dsmith, fche, fweimer, law, lberk, mcermak, mjw, mprchlik, ohudlick
Version: 8.1Keywords: Bugfix, Patch, Triaged
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: 8.0   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: gcc-toolset-10-systemtap-4.3-1.el8 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-11-04 03:51:34 UTC Type: Bug
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
tracker.stp
none
classes.cpp none

Description Martin Cermak 2019-09-16 12:14:26 UTC
We have some testcases that build a C++ program (with -g), put systemtap probes into it, and in those probes, they call probefunc() to get the probe point's function name as a string.

If latest gcc-toolset-9-binutils is used, probefunc() fails to return the function names, but returns some pointers(?) instead.  If OTOH gcc-toolset-9-binutils rpm is removed, so that base rhel binutils gets used, the testcases pass.  This problem is x86_64 specific:  


=======
8.1 Server x86_64 #  scl enable gcc-toolset-9 bash
gcc-toolset-9   8.1 Server x86_64 #
gcc-toolset-9   8.1 Server x86_64 # g++ classes.cpp -g -o classes
gcc-toolset-9   8.1 Server x86_64 # stap -c ./classes tracker.stp |& head
StandaloneFunction start: 0x40112a
StandaloneFunction end: 0x401148
StandaloneFunction start: 0x401131
inner::StandaloneFunction start: 0x401131
StandaloneFunction end: 0x40114d
inner::StandaloneFunction end: 0x40114d
StandaloneFunction start: 0x401138
moreinner::StandaloneFunction start: 0x401138
StandaloneFunction end: 0x401152
moreinner::StandaloneFunction end: 0x401152
gcc-toolset-9   8.1 Server x86_64 # rpm -q gcc-toolset-9-binutils binutils
gcc-toolset-9-binutils-2.32-15.el8.x86_64
binutils-2.30-57.el8.x86_64
gcc-toolset-9   8.1 Server x86_64 # rpm -e gcc-toolset-9-binutils
gcc-toolset-9   8.1 Server x86_64 # 
gcc-toolset-9   8.1 Server x86_64 # g++ classes.cpp -g -o classes
gcc-toolset-9   8.1 Server x86_64 # stap -c ./classes tracker.stp |& head
StandaloneFunction start: _Z18StandaloneFunctionv
StandaloneFunction end: main
StandaloneFunction start: _ZN5inner18StandaloneFunctionEv
inner::StandaloneFunction start: _ZN5inner18StandaloneFunctionEv
StandaloneFunction end: main
inner::StandaloneFunction end: main
StandaloneFunction start: _ZN9moreinner18StandaloneFunctionEv
moreinner::StandaloneFunction start: _ZN9moreinner18StandaloneFunctionEv
StandaloneFunction end: main
moreinner::StandaloneFunction end: main
gcc-toolset-9   8.1 Server x86_64 # 
=======

One of the possible explanations is that this is a binutils regression, so I'll start with that.

Comment 1 Martin Cermak 2019-09-16 12:15:36 UTC
Created attachment 1615527 [details]
tracker.stp

Comment 2 Martin Cermak 2019-09-16 12:16:22 UTC
Created attachment 1615528 [details]
classes.cpp

Comment 10 Frank Ch. Eigler 2020-01-08 19:48:57 UTC
we could backport commit 4ae4592f1106 into dts9's systemtap 4.1

Comment 11 Frank Ch. Eigler 2020-03-27 14:40:02 UTC
commit 4ae4592f1106e941023a5768d34c2381cc869631
Author: Frank Ch. Eigler <fche>
Date:   Wed Aug 21 19:29:45 2019 -0400

    PR23879, PR24875: fix task-finder-vma on f29+
    

previously fixed in systemtap 4.2

Comment 15 Martin Cermak 2020-08-25 15:41:41 UTC
Verified with gcc-toolset-10-systemtap-4.3-7.el8.

Comment 18 errata-xmlrpc 2020-11-04 03:51:34 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (gcc-toolset-10-systemtap bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:4784