Sometimes you might see this error when usingcopyin
orcopyinstr
:invalid address (0x10c86e3ce) in action #2 at DIF offsetThis happens because the page in question hasn't been faulted in yet, or in general isn't available to the kernel or DTrace at this moment. This can happen if you're accessing the data in an:::entry
clause before the data is used.To work around this, let the function you're tracing do its work, cause the fault of the data into memory, then access the data in the
:::return
clause. You'll need to hang on the pointer because the function arguments are not passed to:::return
:syscall::open:entry { self->filename = arg0; } syscall::open:return /self->filename/ { @files[copyinstr(self->filename)] = count(); self->filename = 0; } END { trunc(@files, 5); }