Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 May 2017 22:20:05 +0200
From:      Andreas Longwitz <longwitz@incore.de>
To:        freebsd-dtrace@freebsd.org
Subject:   fbt:kernel:breadn_flags:entry): invalid address (0x0) in action #7
Message-ID:  <591E01F5.8080208@incore.de>

next in thread | raw e-mail | index | archive | help
Now running FreeBSD 10.3-STABLE #0 r317936 I try to understand the
problem described in

https://lists.freebsd.org/pipermail/freebsd-fs/2013-November/018610.html

using DTrace. Therefore I like to use the probe

       fbt:kernel:breadn_flags:entry

to see what is happening in ffs_vgetf() in source ffs_vfsops.c:

  #define bread(vp, blkno, size, cred, bpp) \
     breadn_flags(vp, blkno, size, NULL, NULL, 0, cred, 0, bpp)

  /* Read in the disk contents for the inode, copy into the inode. */
  error = bread(ump->um_devvp, fsbtodb(fs, ino_to_fsba(fs, ino)),
              (int)fs->fs_bsize, NOCRED, &bp);

I get the error

dtrace: error on enabled probe ID 22 (ID 31371:
fbt:kernel:breadn_flags:entry): invalid address (0x0) in action #6

probably because NOCRED is NULL:

  #define   NOCRED  ((struct ucred *)0)

I like to know if this case can be handled in DTrace, the parameter

  args[6]: struct ucred *

is sometimes a pointer and sometimes NOCRED.


-- 
Dr. Andreas Longwitz




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?591E01F5.8080208>