https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=278826

--- Comment #4 from Austin Zhang <austin.zh...@dell.com> ---
Normally, when a process exits, the si_refcount associated with /dev/hpet0
should return to its expected value, assuming it’s incremented and decremented
correctly during cdev ops. However, we can inflate the si_refcount using a
simple bash script below:

while true; do uname >/dev/null;done


This unusually high count suggests that the si_refcount isn't being managed
properly
```
[root@freebsd-main ~]# while true; do uname >/dev/null;done
^C
[root@freebsd-main ~]# dtrace -n 'fbt::dev_ref:entry {printf("[%s]: invoke
dev_ref: %s, refcount:%d", execname, args[0]->si_name, args[0]->si_refcount)}'
dtrace: description 'fbt::dev_ref:entry ' matched 1 probe
CPU     ID                    FUNCTION:NAME
  1  43845                    dev_ref:entry [uname]: invoke dev_ref: hpet0,
refcount:42439
```

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to