Systemtap incompatible with ubuntu 18.04

Bug #1795545 reported by spbike
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
systemtap (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Under 16.04 I ran run:
$ stap nfsd-trace.stp
Mon Oct 1 19:48:05 2018 PDT 10.22.7.20:50434 nfsd.proc4.lookup grep /export/1/blank/build.2018-08-22/bin/grep

Works great.

Under 18.04 I tried:
# stap nfsd-trace.stp
semantic error: while processing probe module("nfsd").function("nfsd4_lookup@/build/linux-lZKWha/linux-4.15.0/fs/nfsd/nfs4proc.c:735").call from: nfsd.proc4.lookup from: nfsd.proc.lookup from: nfsd.proc.entries from: nfsd.proc.entries

The kernel being used:
Linux nas-7-0 4.15.0-22-generic #24-Ubuntu SMP Wed May 16 12:15:17 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

I thought I might need a newer systemtap, so I installed it from git on Sept 27th 2018. So the same run:
/share/apps/systemtap-2018-09-27# ./bin/stap ./share/systemtap/examples/network/nfsd-trace.stp
semantic error: while processing probe module("nfsd").function("nfsd4_read@/build/linux-lZKWha/linux-4.15.0/fs/nfsd/nfs4proc.c:744").call from: nfsd.proc4.read from: nfsd.proc.read from: nfsd.proc.entries from: nfsd.proc.entries

Other scripts like iostats.stp work as expected.

So basically from what I can tell the neither the ubuntu provided systemtap, nor the upstream systemtap works with the widely circulated nfsd-trace.stp file. It's been available from redhat's documentation as well as part of the upstream source under examples.

I expected the 18.04 result of "stap nfsd-trace.stp" to be much like the 16.04 result. Showing a log of NFS related I/O, path names, time stamps, etc.

Other NFS related scripts like nfsd-recent.stp works.

Revision history for this message
Frank Ch. Eigler (fche) wrote : Re: [Bug 1795545] [NEW] Systemtap incompatible with ubuntu 18.04
Revision history for this message
spbike (bill-broadley) wrote :

On 10/19/18 2:38 PM, Frank Ch. Eigler wrote:
> Hi -
>
> This commit appears to fix this problem.
>
> https://sourceware.org/git/gitweb.cgi?p=systemtap.git;a=commitdiff;h=8bc64034509474bee3fb7996b2a9e74c8bc27281
>

It tried it, here's that file with the patch:
        version = 4
        fh = & @nfsd4_compound_state($cstate)->current_fh

        if (@defined($u)) {
             count = $u->read->rd_length
             offset = $u->read->rd_offset
             vec = $rqstp->rq_vec
             vlen = $u->read->rd_vlen
        } else {
             count = $read->rd_length
             offset = $read->rd_offset
             vec = $rqstp->rq_vec
             vlen = $read->rd_vlen
        }

        uid = __rqstp_uid($rqstp)
        gid = __rqstp_gid($rqstp)

I installed systemtap-4.0, ran ./configure --prefix=/share/apps/systemtap-4.0;
make; make install

Then ran it:
root@nas-12-1:/share/apps/systemtap-4.0# ./bin/stap
./share/systemtap/examples/network/nfsd-trace.stp
semantic error: while processing probe
module("nfsd").function("nfsd4_commit@/build/linux-39dmni/linux-4.15.0/fs/nfsd/nfs4proc.c:579").call
from: nfsd.proc4.commit from: nfsd.proc.commit from: nfsd.proc.entries from:
nfsd.proc.entries

semantic error: failed to retrieve location attribute for 'commit' [man
error::dwarf]: identifier '$commit' at
/share/apps/systemtap-4.0/share/systemtap/tapset/linux/nfsd.stp:856:10
        dieoffset: 0x1b5709 from
/usr/lib/debug/lib/modules/4.15.0-36-generic/kernel/fs/nfsd/nfsd.ko
        function: nfsd4_commit at
/build/linux-39dmni/linux-4.15.0/fs/nfsd/nfs4proc.c:581
        source: count = $commit->co_count
                         ^

semantic error: failed to retrieve location attribute for 'commit' [man
error::dwarf]: identifier '$commit' at :856:10
        dieoffset: 0x1b5709 from
/usr/lib/debug/lib/modules/4.15.0-36-generic/kernel/fs/nfsd/nfsd.ko
        function: nfsd4_commit at
/build/linux-39dmni/linux-4.15.0/fs/nfsd/nfs4proc.c:581
        source: count = $commit->co_count
                         ^

Pass 2: analysis failed. [man error::pass2]

I'll try building the current git version and see if that helps.

Revision history for this message
spbike (bill-broadley) wrote :

On 10/19/18 2:38 PM, Frank Ch. Eigler wrote:
> Hi -
>
> This commit appears to fix this problem.
>
> https://sourceware.org/git/gitweb.cgi?p=systemtap.git;a=commitdiff;h=8bc64034509474bee3fb7996b2a9e74c8bc27281
>

Apparently that commit depends on other commits. But if building from
git://sourceware.org/git/systemtap.git it does work with 18.04.

Many thanks for the find, I find systemtap indispensable.

Emanuele Rocca (ema)
Changed in systemtap (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.