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 1171823 - dereferencing pointer to incomplete type struct knfsd_fh
Summary: dereferencing pointer to incomplete type struct knfsd_fh
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: systemtap
Version: 7.2
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Frank Ch. Eigler
QA Contact: Martin Cermak
URL:
Whiteboard:
Depends On:
Blocks: 1172775
TreeView+ depends on / blocked
 
Reported: 2014-12-08 16:52 UTC by Martin Cermak
Modified: 2015-03-05 08:23 UTC (History)
4 users (show)

Fixed In Version: systemtap-2.6-8.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1172775 (view as bug list)
Environment:
Last Closed: 2015-03-05 08:23:16 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2015:0373 0 normal SHIPPED_LIVE systemtap bug fix and enhancement update 2015-03-05 12:50:46 UTC

Description Martin Cermak 2014-12-08 16:52:48 UTC
With systemtap-2.6-7.el7 and kernel-3.10.0-206.el7 I see following issue:

# stap -v -c 'ls /tmp/some-nfs-mounted-dir' -e 'probe nfsd.open{print(fh)}'
Pass 1: parsed user script and 114 library script(s) using 218252virt/35588res/3020shr/33140data kb, in 150usr/20sys/163real ms.
Pass  2: analyzed script: 3 probe(s), 4 function(s), 7 embed(s), 1 global(s)  using 342580virt/161080res/4156shr/157468data kb, in  1720usr/380sys/2110real ms.
Pass  3: translated to C into  "/tmp/stapOF3Ipl/stap_4c24a6feff91c0788091460de2197891_5006_src.c" using  342580virt/161380res/4456shr/157468data kb, in 200usr/60sys/254real ms.
/tmp/stapOF3Ipl/stap_4c24a6feff91c0788091460de2197891_5006_src.c: In function ‘function___svc_fh’:
/tmp/stapOF3Ipl/stap_4c24a6feff91c0788091460de2197891_5006_src.c:240:28: error: dereferencing pointer to incomplete type
  struct knfsd_fh *fh = &fhp->fh_handle;
                            ^
make[2]: *** [/tmp/stapOF3Ipl/stap_4c24a6feff91c0788091460de2197891_5006_src.o] Error 1
make[1]: *** [_module_/tmp/stapOF3Ipl] Error 2
WARNING: kbuild exited with status: 2
Pass 4: compiled C into "stap_4c24a6feff91c0788091460de2197891_5006.ko" in 650usr/270sys/843real ms.
Pass 4: compilation failed.  [man error::pass4]

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

<@fche> so the problem appears to be that struct svc_fh's declaration moved from  include/linux/nfsd/nfsfh.h to  
              fs/nfsd/nfsfh.h
<@fche> the latter is not accessible to stap's embedded-c code

Comment 1 David Smith 2014-12-08 20:05:56 UTC
Fixed upstream in commit f739850:

<https://sourceware.org/git/gitweb.cgi?p=systemtap.git;a=commitdiff;h=f73985072571f93684e7742733d8d06b477b02bf;hp=eb7d25eccd83ccda7f24e4281e4d3044395f56c6>

This commit should easily backport.

Comment 2 David Smith 2014-12-08 22:20:10 UTC
Upstream commit 957812a simplifies the previous fix and should be backported as well:

<https://sourceware.org/git/gitweb.cgi?p=systemtap.git;a=patch;h=957812abcb03ad5eb2b544c7fff111b967deb211>

Comment 3 Martin Cermak 2014-12-10 09:50:49 UTC
Using upstream 957812a bits, this looks fixed except on powerpc (using kernel-3.10.0-215.el7.ppc64):

=======
semantic error: not accessible at this address (pc: 0x191bc) [man error::dwarf]: identifier '$fhp' at /usr/share/systemtap/tapset/linux/nfsd.stp:1093:16
        dieoffset: 0x5376b from /usr/lib/debug/lib/modules/3.10.0-215.el7.ppc64/kernel/fs/nfsd/nfsd.ko.debug
        function: nfsd_open at fs/nfsd/vfs.c:822 inlined by nfsd_get_tmp_read_open at fs/nfsd/vfs.c:1129
        alternative locations: [0x191d4,0x191db], [0x191db,0x19264], [0x19264,0x19430], [0x19430,0x19480], [0x19480,0x19484], [0x19484,0x194d0], [0x194d0,0x1952c], [0x1952c,0x1953c], [0x1953c,0x19564]
        source:         fh = __svc_fh($fhp)
                                      ^
=======

Comment 5 Frank Ch. Eigler 2014-12-10 16:19:07 UTC
This last part seems like a pretty standard gcc debuginfo limitation issue,
set aside for later analysis.

Comment 9 errata-xmlrpc 2015-03-05 08:23:16 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://rhn.redhat.com/errata/RHEA-2015-0373.html


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