Bug #1841

SMB dtrace provider is incomplete

Added by Rich Lowe about 8 years ago. Updated 9 months ago.

cifs - CIFS server and client
Start date:
Due date:
% Done:


Estimated time:


When probes were added to smbsrv, the obvious intent was that a SMB provider exist.
Unfortunately, the work was only half done, so instead we have probes like these:

7463        sdt            smbsrv         smb_post_write_and_unlock -smb_op-WriteAndUnlock-done
7464 sdt smbsrv smb_pre_write_and_unlock -smb_op-WriteAndUnlock-start
7473 sdt smbsrv smb_post_unlock_byte_range -smb_op-UnlockByteRange-done
7474 sdt smbsrv smb_pre_unlock_byte_range -smb_op-UnlockByteRange-start
7512 sdt smbsrv smb_post_lock_and_read -smb_op-LockAndRead-done
7513 sdt smbsrv smb_pre_lock_and_read -smb_op-LockAndRead-start
7550 sdt smbsrv smb_post_locking_andx -smb_op-LockingX-done
7551 sdt smbsrv smb_pre_locking_andx -smb_op-LockingX-start
7552 sdt smbsrv smb_post_lock_byte_range -smb_op-LockByteRange-done
7553 sdt smbsrv smb_pre_lock_byte_range -smb_op-LockByteRange-start

This is because DTRACE_SMB uses the _smb convention, but the work to sdt_subr was not done to create a "real" smb provider from them, so they remain in sdt, with silly names.



Updated by Rich Lowe about 8 years ago

It's worth noting that these probes don't look even somewhat useful as members of an actual smb provider. The fix here is not to just fix up sdt_subr and cause such a thing to exist.


Updated by Gordon Ross over 4 years ago

  • Assignee set to Gordon Ross

Updated by Gordon Ross 10 months ago

The dtrace probes in the SMB1 code are almost all in the wrong places to be useful, so part of this work is to fix those.
The "begin" probes need to be after message parsing, tree lookup, file ID lookup, so the begin probe can provide access to those objects.
Some of the "done" probes also are poorly placed.

There's also some dtrace translator "magic" missing in usr/src/lib/libdtrace


Updated by Gordon Ross 10 months ago

  • Subject changed from DTrace smb provider was mis-implemented, doesn't exist. to SMB dtrace provider is incomplete
  • Status changed from New to In Progress

Updated by Gordon Ross 9 months ago

Testing involves running dtrace with these two scripts (new with this work) and observing the output.

Fix has been in production for a couple years.


Updated by Electric Monk 9 months ago

  • Status changed from In Progress to Closed
  • % Done changed from 0 to 100

git commit 93bc28dbaee6387120d48b12b3dc1ba5f7418e6e

commit  93bc28dbaee6387120d48b12b3dc1ba5f7418e6e
Author: Gordon Ross <>
Date:   2019-06-04T02:09:35.000Z

    1841 SMB dtrace provider is incomplete
    11180 SMB2 IOCTL FSCTL_LMR_REQUEST_RESILIENCY Returns Incorrect Response
    Portions contributed by: Joyce McIntosh <>
    Reviewed by: Evan Layton <>
    Reviewed by: Matt Barden <>
    Reviewed by: Joyce McIntosh <>
    Approved by: Richard Lowe <>


Updated by Electric Monk 9 months ago

git commit 262d6380c033d57f7438d7ef213bfe967788a59c

commit  262d6380c033d57f7438d7ef213bfe967788a59c
Author: Gordon Ross <>
Date:   2019-06-05T23:14:10.000Z

    1841 SMB dtrace provider is incomplete (fix dtrace breakage)
    Approved by: Richard Lowe <>

Also available in: Atom PDF