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 2040649 - fullpath_struct_path() seems to fail on RHEL8 (was OK on RHEL7)
Summary: fullpath_struct_path() seems to fail on RHEL8 (was OK on RHEL7)
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: systemtap
Version: 8.5
Hardware: All
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: Frank Ch. Eigler
QA Contact: Martin Cermak
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-01-14 11:06 UTC by Renaud Métrich
Modified: 2022-11-08 10:23 UTC (History)
7 users (show)

Fixed In Version: systemtap-4.7-1.el8
Doc Type: No Doc Update
Doc Text:
If this bug requires documentation, please select an appropriate Doc Type value.
Clone Of:
Environment:
Last Closed: 2022-11-08 09:35:22 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-108172 0 None None None 2022-01-14 11:08:09 UTC
Red Hat Product Errata RHBA-2022:7538 0 None None None 2022-11-08 09:35:31 UTC

Description Renaud Métrich 2022-01-14 11:06:32 UTC
Description of problem:

I have written a script that tries print current working directory, e.g.:
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
stap -v -e 'probe syscall.openat { printf("PID %lu CWD %s\n", pid(), fullpath_struct_path(task_cwd_path(task_current()))) }'
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------

This works fine on RHEL7 but not on RHEL8.
First I see warnings:
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
WARNING: Potential type mismatch in reassignment: identifier 'root_dentry' at /usr/share/systemtap/tapset/linux/dentry.stp:246:3
 source: 		root_dentry = @cast(task, "task_struct", "kernel")->fs->root->dentry
         		^
WARNING: Potential type mismatch in reassignment: identifier 'root_dentry' at :242:3
 source: 		root_dentry = & @cast(task, "task_struct", "kernel")->fs->root
         		^
...
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------

Then once I get a hit (on "openat" here), script dies:
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
ERROR: read fault [man error::fault] at 0x10 near operator '->' at /usr/share/systemtap/tapset/linux/dentry.stp:267:19
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------



task_cwd_path() returns the pointer to path struct and 
fullpath_struct_path() expects the arg to be a pointer to "struct path".


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

systemtap-4.5-3.el8.x86_64


How reproducible:

Always see above.

Comment 1 Frank Ch. Eigler 2022-01-17 17:48:47 UTC
stap 4.6 already built for rhel8 corrects the first WARNING diagnostics, but the read-fault is still there.  Chances are some more tapset porting for kernel changes needs to be done.

Comment 2 Martin Cermak 2022-05-16 10:11:44 UTC
Verified with systemtap-4.7-1.el{8,9} on top of 4.18.0-390.el8 and 5.14.0-90.el9 , all arches.

Comment 5 errata-xmlrpc 2022-11-08 09:35:22 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 (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-2022:7538


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