From nobody Fri Jun 24 09:38:28 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 42867872C1E for ; Fri, 24 Jun 2022 09:38:28 +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 4LTsW76fzgz3Mhb for ; Fri, 24 Jun 2022 09:38:27 +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 C49B351F7 for ; Fri, 24 Jun 2022 09:38:27 +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 25O9cR5O017892 for ; Fri, 24 Jun 2022 09:38:27 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 25O9cRGH017891 for bugs@FreeBSD.org; Fri, 24 Jun 2022 09:38:27 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 264867] kevent EVFILT_TIMER, timer expiration with twice the period Date: Fri, 24 Jun 2022 09:38:28 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 13.1-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: felice.tufo@gmail.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: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter attachments.mimetype attachments.created Message-ID: 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=1656063508; 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; bh=+HyGHy47oAaqRWHJBQAvV0Um2oL6oqiYcywLf8smCsA=; b=J3CPvN23ne01S3danrEIpiMFzvaieqSqnL+n9wxdq9wvYU11lwAIYYRKt2LwptczdOcrDV nnYxQ1xSRqW/11rn8N3ASURtM2p7NTHBNrF8WVtW2Lsk5aXsVFRB8kIiyqkSpmefD9S7Br udQqyPg0TdWLWiFpt/RvZoeoBuvwZca77VYcxjQUIvYnuJWUN++k7SIMMhKRHfjathjUAO A6IJ6jKDzNiii9kf48ajM8E65+DXuGE0tysp+Idh+G1GOYLZuMNH4FLMTMaFhXpdqD5z5z jolqSvshtGnRuJgWQDIeRUej+HTTINVGtLBCUOEy4Im+Zrqgd1Dg3uiCYL5gGQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1656063508; a=rsa-sha256; cv=none; b=FVPO/FQk/ZpsKEr5LrM+7GyYy889rvpv9n0rZiS9jgDuXPfe7uyAw3LusJEZ85HXNuaFcM R+2Fq1TiUfHM7LqPBQ306GOzKlXfwA/qyRKRD5tt4hwWHVy4tEsaBvkiy+IuDEHbZNFo3S gJ97SNW1hEaMGGL+xhnlX76lUr9E/AJ3Eh0vg+N1AwxGyi5wdM2RP3ueLm5safRgef4lm6 8EKM+XbeTFAUUOoqwGHSz/NYm2NTk/w47+MsvdPqio45XOG1yyA+N0yXNAB+hG5Qb6LZj8 o167JD9ZFn4NOsY67n46+A73nCiINCUfTuFUDApp/MXZnu/I0+4u/YzcjzaecA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D264867 Bug ID: 264867 Summary: kevent EVFILT_TIMER, timer expiration with twice the period Product: Base System Version: 13.1-STABLE Hardware: amd64 OS: Any Status: New Severity: Affects Only Me Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: felice.tufo@gmail.com Attachment #234909 text/plain mime type: Created attachment 234909 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D234909&action= =3Dedit example reproducing the problem I'm trying to use kevent to implement a periodic (50ms) event generator, the application can tolerate a 10% error on the programmed period. I know that FreeBSD is not a hard realtime OS, so just trying to evaluate how good it is for my specific needs. The problem is that every now and then (after some hours running) the timer expires well after the programmed period and what makes me think I'm running into an issue is that it happens *very* often with twice the programmed per= iod (100ms for a 50 ms programmed period... 40ms for a 20ms programmed period... etc.). Bug 264131 seems to be something similar, but that was deterministic behavi= our. Moreover I see the same problem on FreeBSD 12.2. I attach the example I use to reproduce the problem (using multithreading to make the issue happen faster). The example is compiled with clang on an updated FreeBSD 13.1 machine, on a skylake platform with 8-cores and 32Gb RAM, no other applications running (= not even sendmail). Thanks --=20 You are receiving this mail because: You are the assignee for the bug.=