From nobody Tue May 24 18:00:09 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 416831B50024 for ; Tue, 24 May 2022 18:00:09 +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 4L726K0DsMz3lv7 for ; Tue, 24 May 2022 18:00:09 +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 D9135EF5 for ; Tue, 24 May 2022 18:00:08 +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 24OI080S052472 for ; Tue, 24 May 2022 18:00:08 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 24OI082l052471 for bugs@FreeBSD.org; Tue, 24 May 2022 18:00:08 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 264131] 2nd and subsequent events on a repeating EVFILT_TIMER are delivered with twice the requested timer period Date: Tue, 24 May 2022 18:00:09 +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: markj@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: bug_status cc 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=1653415209; 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=kJGCtJl1jNheE2oxCEj204dNQeLNBTnfA7XgC90T40g=; b=g5VmeiTMuoM4io42VS03y0f6veRv18rSfEX17XObD3EPngDlBuQ8M65FAJ5NwkECCLkM2e auZ29la5lYuh/wxjKOf4kFmah3KDGWVo4EqaegldBoyr2lmAU3ROqzsc/4RLYiXz0Q86NO CIjZCBSwJqMqRqBACaqWPxhAxdi+Gu/QbRYOmrFtJWnbc8W0LcZGLXW/suJYlbDUb7Tley sIlTca/GxE+5dCCh2UX8WD6YTev12qgNUiRhkuMRcjkw1tGYLmte931rAjP7RckaBnW9DC ipkOBbEV3w9VD6tyAXIJCOKbFitckqSaIckMGN4/eJaVqjhvCSXsdwQAwdqiyg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1653415209; a=rsa-sha256; cv=none; b=gLrPRX5vJE9y3c3yR4vAhV/fJxc+W4+KRX9yUdP22Edye61netODjcI3X1LnXNK5YZqM4r huB7FmIeuT9rCmdEcp0JqlyRVxBCPX2t/xq1JyahqMAxJeFTxO/c9da8whnsj6q8E44o6S K1WPxGlnHvIL3tSkL8bzosMa/UzaaxCq5jTVhQJFGHzcZg6rCMdafvCMEriJywB6EAjdez ZzrAXR0hGSfmrUHpGFqo3Dd6VMU0kxtuqyG4OF9iDVvW7WHQzy4eDgu5b5+qIUSj+wVjCT ydqjHcve1huT1ORLGVa13KtqjOt8aGfEOLuugI5pMT2ZY/XNBkf0juREm2d6YQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D264131 Mark Johnston changed: What |Removed |Added ---------------------------------------------------------------------------- Status|New |Open CC| |markj@FreeBSD.org --- Comment #1 from Mark Johnston --- Thanks for the report and test program. It looks like this is a regression from commit 7cb40543e964. This patch fixes the problem for me but needs mo= re thought: diff --git a/sys/kern/kern_event.c b/sys/kern/kern_event.c index 33607fe8c5f4..f1ee8de4e7ee 100644 --- a/sys/kern/kern_event.c +++ b/sys/kern/kern_event.c @@ -739,7 +739,7 @@ filt_timerexpire_l(struct knote *kn, bool proc_locked) if (delta =3D=3D 0) delta =3D 1; kn->kn_data +=3D delta; - kc->next +=3D (delta + 1) * kc->to; + kc->next +=3D delta * kc->to; if (now >=3D kc->next) /* overflow */ kc->next =3D now + kc->to; KNOTE_ACTIVATE(kn, 0); /* XXX - handle locking */ --=20 You are receiving this mail because: You are the assignee for the bug.=