From nobody Wed May 25 00:19:11 2022 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 905AC1B3D169 for ; Wed, 25 May 2022 00:19:12 +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 4L7BWg68sDz3nWR for ; Wed, 25 May 2022 00:19:11 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) 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 A3DE565DC for ; Wed, 25 May 2022 00:19:11 +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 24P0JBnL061948 for ; Wed, 25 May 2022 00:19:11 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from bugzilla@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 24P0JBxf061947 for bugs@FreeBSD.org; Wed, 25 May 2022 00:19:11 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: bugzilla set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 264131] 2nd and subsequent events on a repeating EVFILT_TIMER are delivered with twice the requested timer period Date: Wed, 25 May 2022 00:19:11 +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: 13.1-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: commit-hook@FreeBSD.org X-Bugzilla-Status: Open 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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1653437952; 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=EZcMKZsvbTyPL6LiLyxvhG1I4kJRewGlWON/DGehdHU=; b=scyY0ZFiHiVWFWLS6ZwL/W/MF/Q4bv5pUq4l5MqiBEzpPy8vZjsgU50u8imDAKdRxBagU3 UGRXM0E7RJ2Na56KdfLtcV3PSIjusOtegQR6AzJ1vrWxw5SbV8Avw6m57r2sN9fi7Jm0pg I5PF0S3qvK+vyVHxl2UgnNNTTWG+JTh12FMh4HwNhEIzcfoJpU1N0+uweKqIedXVsdJxyU F/35qX7mUpSN/bMuenlLprEGV1wXb7zUF4cfUkTddQWfxVIy4J+uhvzN+n35P7/Bvv81yP JCg0l2aFkHA2gPwYcMLKu8Vu2+pt5Usq4fn6/vCPZPl1WU0Hs5lA0O7W7MuhJg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1653437952; a=rsa-sha256; cv=none; b=AhNCrBl3fcyAJMd4OfBkM3DYNvH739RuXdjAUxQEYkyvjgOFVvySfNCDdIw6jTmgUGEiG/ 5Z7kuQjb3BAh6xI3mPB3WCIo9EfU2GYjplMz3jdY7PvJVta2mGiQWuHCMe8k3EpIVLsPjZ bup54oJlfeG8HDcKoBoswdaDjCl3SmE0vkg4+uskPO4xRthiylOgWXtYNlzdpQHf6qOvY5 NFxYWWuYkJZ2yqyqUbXXe9CRVIkPpUPcBo28JU+u/eBJCBxhM/79NetnkZDqkU1wKhYaw/ yAOnmqYkEkx6X10JXhXlBYFJaToE4mlNmKNF6cHnf8SZqERVmXF1QQALVwtOdw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D264131 --- Comment #2 from commit-hook@FreeBSD.org --- A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=3D524dadf7a8725dea144571843e611dbdb= d59d668 commit 524dadf7a8725dea144571843e611dbdbd59d668 Author: Mark Johnston AuthorDate: 2022-05-25 00:14:33 +0000 Commit: Mark Johnston CommitDate: 2022-05-25 00:14:33 +0000 kevent: Fix an off-by-one in filt_timerexpire_l() Suppose a periodic kevent timer fires close to its deadline, so that now - kc->next is small. Then delta ends up being 1, and the next timer deadline is set to (delta + 1) * kc->to, where kc->to is the timer period. This means that the timer fires at half of the requested rate, and the value returned in kn_data is similarly inaccurate. PR: 264131 Fixes: 7cb40543e964 ("filt_timerexpire: do not iterate over the interval") Reviewed by: kib MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D35313 sys/kern/kern_event.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --=20 You are receiving this mail because: You are the assignee for the bug.=