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 1737112 - Port OpenJDK jstack systemtap tapset to ppc64[be,le] & aarch64
Summary: Port OpenJDK jstack systemtap tapset to ppc64[be,le] & aarch64
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: java-1.8.0-openjdk
Version: 8.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 8.0
Assignee: Andrew John Hughes
QA Contact: OpenJDK QA
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-08-02 16:54 UTC by Andrew John Hughes
Modified: 2021-09-03 15:18 UTC (History)
5 users (show)

Fixed In Version: java-1.8.0-openjdk-1.8.0.242.b08-4.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-04-28 15:46:27 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:1646 0 None None None 2020-04-28 15:47:03 UTC

Description Andrew John Hughes 2019-08-02 16:54:13 UTC
This bug was initially created as a copy of Bug #1434241

I am copying this bug because: 

Change is in java-1.8.0-openjdk for RHEL 7 and so we shouldn't regress it on RHEL 8.

+++ This bug was initially created as a clone of Bug #1373848 +++

Steps to Reproduce:
1. stap -v -e 'probe hotspot.jni.GetStringUTFChars { log(probestr); print_jstack_full(); log(" === "); }' -c "java Hello" 2>&1 | c++filt

Additional info:
Hello.java: public class Hello{public static void main(String args[]){System.out.println("Hello World!");}}


--- Additional comment from Lukas Zachar on 2016-09-06 12:23:55 EDT ---

What is the systemtap support for other arches than x86_64?

On x86_64 it works (kernel-devel-4.5.0-7.el7, systemtap-3.0-6.el7)
On aarch64, ppc64, ppc64le, s390x I'm getting:

Pass 1: parsed user script and 113 library scripts using 159488virt/44096res/6400shr/35648data kb, in 500usr/10sys/517real ms.
semantic error: while resolving probe point: identifier 'hotspot' at <input>:1:7
        source: probe hotspot.jni.GetStringUTFChars { log(probestr); print_jstack_full(); log(" === "); }
                      ^

semantic error: probe point mismatch (similar: oneshot, tcp, init, scsi, stap): identifier 'hotspot' at :1:7
        source: probe hotspot.jni.GetStringUTFChars { log(probestr); print_jstack_full(); log(" === "); }
                      ^

Pass 2: analyzed script: 0 probes, 0 functions, 0 embeds, 0 globals using 160064virt/44096res/6400shr/36224data kb, in 10usr/0sys/10real ms.
Pass 2: analysis failed.  [man error::pass2]

--- Additional comment from Frank Ch. Eigler on 2016-09-06 12:42:44 EDT ---

Lukas, systemtap in general is fine on all of those platforms.  Perhaps openjdk doesn't include the systemtap tapset .stp files in its non-x86 java-*-openjdk-devel subrpms?

--- Additional comment from Andrew John Hughes on 2016-09-06 14:53:19 EDT ---

OpenJDK provides the SystemTap tapset for all JIT architectures; on java-1.8.0-openjdk, that's x86, x86_64, sparc, sparc64, AArch64, ppc64 & ppc64le. So three of the four you tried should work (s390x doesn't have them).

How much they've been tested I don't know. ppc64, ppc64le and AArch64 are all new JITs that were added after the tapsets.

--- Additional comment from Lukas Zachar on 2016-09-07 04:37:43 EDT ---

Ah, maybe I see the problem. I've run stap -vvv and it systemtap does not search in directory where openjdk installs stp.

ppc64) 
....
Searched: "/usr/share/systemtap/tapset/linux/*.stp", found: 71, processed: 71
Processing tapset "/usr/share/systemtap/tapset/powerpc/registers.stp"
Searched: "/usr/share/systemtap/tapset/powerpc/*.stp", found: 1, processed: 1

x86_64)
Searched: "/usr/share/systemtap/tapset/linux/*.stp", found: 71, processed: 71
Processing tapset "/usr/share/systemtap/tapset/x86_64/hotspot-1.8.0.102-3.b14.el7.x86_64.stp"
Processing tapset "/usr/share/systemtap/tapset/x86_64/hotspot_gc-1.8.0.102-3.b14.el7.x86_64.stp"
Processing tapset "/usr/share/systemtap/tapset/x86_64/hotspot_jni-1.8.0.102-3.b14.el7.x86_64.stp"
Processing tapset "/usr/share/systemtap/tapset/x86_64/jstack-1.8.0.102-3.b14.el7.x86_64.stp"
Processing tapset "/usr/share/systemtap/tapset/x86_64/registers.stp"
Searched: "/usr/share/systemtap/tapset/x86_64/*.stp", found: 5, processed: 5

----------------------------

ppc64 openjdk contains following stp (/usr/share/... is symlink to /usr/lib/...):

/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.102-3.b14.el7.ppc64/tapset/hotspot-1.8.0.102-3.b14.el7.ppc64.stp
/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.102-3.b14.el7.ppc64/tapset/hotspot_gc-1.8.0.102-3.b14.el7.ppc64.stp
/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.102-3.b14.el7.ppc64/tapset/hotspot_jni-1.8.0.102-3.b14.el7.ppc64.stp
/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.102-3.b14.el7.ppc64/tapset/jstack-1.8.0.102-3.b14.el7.ppc64.stp
/usr/share/systemtap/tapset/ppc64/hotspot-1.8.0.102-3.b14.el7.ppc64.stp
/usr/share/systemtap/tapset/ppc64/hotspot_gc-1.8.0.102-3.b14.el7.ppc64.stp
/usr/share/systemtap/tapset/ppc64/hotspot_jni-1.8.0.102-3.b14.el7.ppc64.stp
/usr/share/systemtap/tapset/ppc64/jstack-1.8.0.102-3.b14.el7.ppc64.stp

----------------------------

I've tried to symlink openjdk's stp to /usr/share/systemtap/tapset/powerpc/, but
Processing tapset "/usr/share/systemtap/tapset/powerpc/jstack-1.7.0.111-2.6.7.4.el7.stp"
parse error: expected literal string or number
        saw: operator '*' at /usr/share/systemtap/tapset/powerpc/jstack-1.7.0.111-2.6.7.4.el7.stp:141:6
     source:   %: **ERROR** unknown architecture
                  ^

1 parse error.
WARNING: tapset "/usr/share/systemtap/tapset/powerpc/jstack-1.7.0.111-2.6.7.4.el7.stp" has errors, and will be skipped
Processing tapset "/usr/share/systemtap/tapset/powerpc/jstack-1.8.0.102-3.b14.el7.ppc64.stp"
parse error: expected literal string or number
        saw: operator '*' at /usr/share/systemtap/tapset/powerpc/jstack-1.8.0.102-3.b14.el7.ppc64.stp:103:6
     source:   %: **ERROR** unknown architecture
                  ^

1 parse error.
WARNING: tapset "/usr/share/systemtap/tapset/powerpc/jstack-1.8.0.102-3.b14.el7.ppc64.stp" has errors, and will be skipped

Should I open new bug for that?

--- Additional comment from Frank Ch. Eigler on 2016-09-07 05:02:38 EDT ---

It should not be a big problem putting ppc & ppc64 .stp files into the same tapset/powerpc/ subdirectory.  (I don't recall why stap collapses those two.)

Yeah, jstack.stp's  probe hotspot.vm_init_end needs some explicit porting work to other architectures:

  // Should really check arch of user space (for 32bit jvm on 64bit kernel).
  %( arch == "i386" %?
     sp_register = "esp";
     fp_register = "ebp";
     pc_register = "eip";
     ptr_size = 4;
     ptr_mask = 0xFFFFFFFF;
  %: %(arch == "x86_64" %?
     sp_register = "rsp";
     fp_register = "rbp";
     pc_register = "rip";
     ptr_size = 8; // XXX - might be probing 32-on-64 jvm.
     ptr_mask = 0xFFFFFFFFFFFFFFFF;
  %: **ERROR** unknown architecture
  %) %)

needs other arches handled.  Plus the "arch of user space" check can be done with the systemtap function call probing_32bit_app().

Let's use a separate bug for porting of jstack.stp.  At the least, we could arrange for the error to be a runtime one rather than a parse-time one.

--- Additional comment from Andrew John Hughes on 2016-09-07 11:34:16 EDT ---

This is going to need to change tapsets in all three versions of the JDK.

I'm guessing it's also going to be something for RHEL 7.4 now.

--- Additional comment from Andrew John Hughes on 2016-09-07 11:36:43 EDT ---

Switching to RHEL 7.4 as 7.3 is past dev-freeze.

--- Additional comment from Andrew John Hughes on 2016-09-07 12:24:25 EDT ---

Bug 1373986 will handle java-1.7.0-openjdk. Not worth updating java-1.6.0-openjdk at this stage.

--- Additional comment from Andrew John Hughes on 2017-03-21 00:45:02 EDT ---

Support has been added for AArch64 and directories for all architectures adjusted to match those used by SystemTap.

We'll split ppc64[le,be] support into a separate bug.

--- Additional comment from Andrew John Hughes on 2017-03-21 00:46:34 EDT ---

https://brewweb.engineering.redhat.com/brew/buildinfo?buildID=545161

Comment 13 Andrew John Hughes 2020-03-28 07:24:46 UTC
Updated summary to reflect the fact this now also fixes the directory path on aarch64 too.

Comment 18 errata-xmlrpc 2020-04-28 15:46:27 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, 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:1646


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