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 670647 - Markers using %rbx register incorrectly masked to low byte
Summary: Markers using %rbx register incorrectly masked to low byte
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: systemtap
Version: 6.1
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: rc
: ---
Assignee: Frank Ch. Eigler
QA Contact: qe-baseos-tools-bugs
URL:
Whiteboard:
Depends On: 670646
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-01-18 21:51 UTC by William Cohen
Modified: 2011-05-19 13:54 UTC (History)
9 users (show)

Fixed In Version: systemtap-1.4-2.el6
Doc Type: Bug Fix
Doc Text:
Clone Of: 670646
Environment:
Last Closed: 2011-05-19 13:54:51 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:0651 0 normal SHIPPED_LIVE systemtap bug fix and enhancement update 2011-05-19 09:37:25 UTC

Description William Cohen 2011-01-18 21:51:24 UTC
+++ This bug was initially created as a clone of Bug #670646 +++

When attempting to build an executable of Ruby that includes systemtap marker
using SystemTap 1.4 some arguments for markers were truncated to 8 bits in
size.

The problem is caused by the
sdt_uprobe_var_expanding_visitor::get_register_width() function "%rbx" as being
a bytes sized (8 bit) register rather that a full 64-bit registers.


To replicate problem on rhel6 or fedora:

1) install systemtap-1.4 on the machine
2a) make sure that the systemtap dtrace is available in /usr/bin/dtrace
2b) make sure that the uprobes modules is available, as root:

  make -C /usr/share/systemtap/runtime/uprobes

3) download the 
http://people.redhat.com/wcohen/ruby-1.8.7.299-6.el6.dtrace_4.src.rpm
3) build and install the ruby rpms
4) Verify that probes are available with:

 stap  -L  'process("/usr/lib64/libruby.so.1.8").mark("*")

5) Use the following script to demonstrate the problem 

 stap  -e  'probe
process("/usr/lib64/libruby.so.1.8").function("rb_class2name").return
{printf("$return=0x%x %s\n", $return, user_string($return))} probe
process("/usr/lib64/libruby.so.1.8").mark("function__entry"){printf("$arg1=0x%x\n",
$arg1)}'

in another window run a ruby program for example

 ruby ~/rpmbuild/BUILD/ruby-1.8.7.299/ruby-1.8.7-p299/sample/biorhythm.rb 

See something like the following out from the systemtap script where $arg1 is
just the low 8 bits of the pointer:

$return=0x9d4450 Hash
$arg1=0x50
$return=0x9c5c30 String
$arg1=0x30

Comment 1 Frank Ch. Eigler 2011-01-18 21:56:50 UTC
problem well-understood and patch nearly in hand; need to fix it to avoid generating erroneous trace data

Comment 4 errata-xmlrpc 2011-05-19 13:54:51 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-2011-0651.html


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