cadets / freebsd-old

FreeBSD src tree http://www.FreeBSD.org/
Other
12 stars 7 forks source link

variable type issues #146

Closed lc525 closed 2 years ago

lc525 commented 2 years ago

On commit 01735d95960 running the following minimal script produces dtrace errors:

*:syscall:::entry {
  self -> ts = timestamp;
}

*:syscall:::return/self->ts/ {
 @[probefunc] = quantize(timestamp - self->ts);
 self->ts = 0;
}

First, if run as above, dtrace returns with in predicate: predicate result must be of scalar type. If I further change the predicate to be /self->ts!=0/ then the error becomes quantize( ) argument #1 must be of scalar type.

This suggests there's something wrong with the assignment of types to self->ts

dstolfa commented 2 years ago

I can't seem to reproduce this on HEAD. Could you confirm it's still a problem?

lc525 commented 2 years ago

Indeed, no longer able to reproduce this on current HEAD ( f287a2c )

lc525 commented 2 years ago

A variant of this happens again for 45b0a61

It does get triggered on probes of the form host_name:syscall:::entry but everything works just fine for probes of the type syscall:::entry

Minimal script to reproduce:

#!/usr/sbin/dtrace -Es

scylla4-nfs-experiments-vm-0:syscall:::entry
{
  self->ts = timestamp;
}

scylla4-nfs-experiments-vm-0:syscall:::return
/self->ts != 0/
{
  @[probefunc] = quantize(timestamp - self->ts);
    self->ts = 0;
}
dstolfa commented 2 years ago

GitHub issue tracking is not very good. The commit says partially fixes, not fixes. Reopening.

dstolfa commented 2 years ago

This is now related to #124.