From nobody Tue May 7 11:47:34 2024 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VYc2t647zz5Kfqq for ; Tue, 07 May 2024 11:47:34 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VYc2t3xnzz4scq for ; Tue, 7 May 2024 11:47:34 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1715082454; a=rsa-sha256; cv=none; b=Qefz6W5r4nSiC9M5132W6bd9mzujTNRxESOptG/wG0pyZHCsilyCduuBR6p5qFBDzUoY9G wwuynQrFopxpQx5lR0XOZOaj+u9ejXREC8Xo6FDkhxrgBrvB/SWEeg+tG7HSb6LxmIgyaj IJ2tjb4sCfyNxeNEeXKV3dZd59BphU21WCqbyQiQx+1lrsG0XPlOb6+l6zKks97T9xYWIY d0CcDR5yCmAUcPsqRecwiDiSnD2quRt11ovIHGdvs/8OXheYHkd3VAgm10r5faE3+35nMH odf9QZwfVvJs2qcKbGcb176WsbgkfhPQwdj4JeX0/tF58/oRfvFyKAbqQC3kQA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1715082454; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cKFKOHudegJyEteqGl0xr82sALa+sMKWuyzU8D+/EeI=; b=EM153sHAAGEdzbDk2SPYsnZ+Pr3wYdN2nFSLtQcayMu2Z3GXZ9y6EYyYrcVihSfvvSNRSc riEpg92rWnPsWqp83dTnYu7+BcVGnvXwVeza2uzQBtcqlSLZRXKRZ6iLUxjxiirR63sDtE S8g/5PBp9ZL2LMEjfLFjQ1rPr0rIjytRSs7UdkrIxjei2pIgxdegUwkrVb6zPTYXT8whXa jcxQm7rkWOLyhSmWPiEbUybOVCx9JycNF4Jj1ziiGj6JczzjeSxaH0ITKGcIWnCkcZH1JK B1pgRf9YUhKkW3rCOClKXeBR8aBrDw3wu68siqiGBUYShJjNOTBynAmAFP/KKg== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VYc2t3WwkzgN3 for ; Tue, 7 May 2024 11:47:34 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 447BlYuV090805 for ; Tue, 7 May 2024 11:47:34 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 447BlYXg090804 for bugs@FreeBSD.org; Tue, 7 May 2024 11:47:34 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 278826] [hpet] cdev->si_refcount leakage when enable hpet as timecounter hardware Date: Tue, 07 May 2024 11:47:34 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 15.0-CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: austin.zhang@dell.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D278826 --- Comment #4 from Austin Zhang --- 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.=