Skip to content

Oh where oh where can my arg5 be? #62

@rzezeski

Description

@rzezeski

As I mentioned in #61, I'm seeing some issues around usdt while working on oxidecomputer/opte#145. I'm going to eschew the background and get straight to it.

Issue

EDIT: This is an M1 (ARM) mac.

On macOS I cannot seem to pass more than five arguments to a probe. As part of my change to OPTE (in the above link) I added an epoch argument to the port__process__return probe, now giving it a total of six arguments, pushing the res argument to arg5 position. After doing this the probe always fires with an arg5 of NULL.

$ sudo dtrace -Zn 'port-process-return { trace(arg5); }'
Password:
dtrace: description 'port-process-return ' matched 0 probes
CPU     ID                    FUNCTION:NAME
  5  14747 _ZN4opte6engine4port4Port25port_process_return_probe17hec39bcf71fd676a8E:port-process-return                 0
  2  14747 _ZN4opte6engine4port4Port25port_process_return_probe17hec39bcf71fd676a8E:port-process-return                 0
  4  14747 _ZN4opte6engine4port4Port25port_process_return_probe17hec39bcf71fd676a8E:port-process-return                 0
  9  14747 _ZN4opte6engine4port4Port25port_process_return_probe17hec39bcf71fd676a8E:port-process-return                 0
  6  14747 _ZN4opte6engine4port4Port25port_process_return_probe17hec39bcf71fd676a8E:port-process-return                 0
  7  14747 _ZN4opte6engine4port4Port25port_process_return_probe17hec39bcf71fd676a8E:port-process-return                 0
  8  14747 _ZN4opte6engine4port4Port25port_process_return_probe17hec39bcf71fd676a8E:port-process-return                 0
  8  14747 _ZN4opte6engine4port4Port25port_process_return_probe17hec39bcf71fd676a8E:port-process-return                 0
  7  14747 _ZN4opte6engine4port4Port25port_process_return_probe17hec39bcf71fd676a8E:port-process-return                 0
  8  14747 _ZN4opte6engine4port4Port25port_process_return_probe17hec39bcf71fd676a8E:port-process-return                 0
  8  14747 _ZN4opte6engine4port4Port25port_process_return_probe17hec39bcf71fd676a8E:port-process-return                 0
  6  14747 _ZN4opte6engine4port4Port25port_process_return_probe17hec39bcf71fd676a8E:port-process-return                 0
  6  14747 _ZN4opte6engine4port4Port25port_process_return_probe17hec39bcf71fd676a8E:port-process-return                 0

Reproduce

  1. Clone the opte repo onto a macOS box and checkout the opte-143-set-fw-rules branch.
  2. In one window trace arg5 of the port-process-return probe.
$ sudo dtrace -Zn 'port-process-return { trace(arg5); }'
  1. In another window run the OPTE unit tests with the usdt feature.
$ cd opte
$ cargo test --features usdt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions