Date: Tue, 07 May 2024 11:47:34 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 278826] [hpet] cdev->si_refcount leakage when enable hpet as timecounter hardware Message-ID: <bug-278826-227-Nilaeh6uOp@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-278826-227@https.bugs.freebsd.org/bugzilla/> References: <bug-278826-227@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D278826 --- Comment #4 from Austin Zhang <austin.zhang@dell.com> --- Normally, when a process exits, the si_refcount associated with /dev/hpet0 should return to its expected value, assuming it=E2=80=99s 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 ``` --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-278826-227-Nilaeh6uOp>