This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: Read fault when running example network/nfsd-trace.stp stap
- From: Yun-Chih Chen <b03902074 at ntu dot edu dot tw>
- To: David Smith <dsmith at redhat dot com>
- Cc: systemtap at sourceware dot org
- Date: Wed, 31 May 2017 06:35:17 +0800
- Subject: Re: Read fault when running example network/nfsd-trace.stp stap
- Authentication-results: sourceware.org; auth=none
- References: <CANeCTtTg0g9zP06XOVbKn-zoGujcsJiMNBebLC3vjDQ53NyYLg@mail.gmail.com> <0574e90c6ac44b1e8f4fb44029b69e7f@EXCHCAS07.ntu.internal>
On Wed, May 31, 2017 at 2:44 AM, David Smith <dsmith@redhat.com> wrote:
> Hmm. The good news here is that systemtap is properly exiting here
> instead of accessing that NULL pointer and crashing your system.
>
> Does this work for a while then fail or does it always fail on the
> first read request?
It always fail at the first NFSv3 read request (NFSv4 is okay).
To speed up the tracing, I ended up printing inode number only and get
filename from inode number at post-processing stage:
probe kernel.function("nfsd_vfs_read@fs/nfsd/vfs.c") !,
module("nfsd").function("nfsd_vfs_read@fs/nfsd/vfs.c") ? {
i = $file->f_inode;
inode = @cast(i, "struct inode")->i_ino;
printf("N %d %d %d\n", gettimeofday_ms(), inode);
}