From nobody Fri Jun 17 04:29:38 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 3A4728534C2 for ; Fri, 17 Jun 2022 04:29:39 +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 4LPR026XYLz3FT3 for ; Fri, 17 Jun 2022 04:29:38 +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 BD8B918F20 for ; Fri, 17 Jun 2022 04:29:38 +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 25H4TctN009093 for ; Fri, 17 Jun 2022 04:29:38 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 25H4Tc3r009092 for bugs@FreeBSD.org; Fri, 17 Jun 2022 04:29:38 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 264729] RTC clock is set incorrectly upon resume if NTP is in use Date: Fri, 17 Jun 2022 04:29:38 +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-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: crahman@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 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=1655440178; 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=5V/arui00qvRrds3qIe7r6Aigg/+IBbmQIwoMovFuAc=; b=NViPHdUNzRVcOveinFAl1NHvQ1BCWDQJMHkeqDxSZ5RAFa6QYTDkUoQyLeONnUAgE8ZfkI TUOHYI1r5SjdWigkyYMpZGp4W7uVQv4HZkbG9hxqw/O2RP2CSiKjMtwKzhIEA/IyGIHbxV Hz5+UO4UhyIBUvI0EaozrZsPIZaPMKp1a664Po+gdt7zUlPci72KtXUy2XRkLiMKQXuCJO cXth/Wfzmo5E0LX9LK8EGLxknpDplRLIloS0a+Jf7qhtPzbrfjDkZ+sXikQnOeVOSOrfWT 8oHewdMsZYuRLbv5+1Xl6RwEvwir8dJ8cqQSnMT6PQ36H1TkeWElvkbmw8rfmQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1655440178; a=rsa-sha256; cv=none; b=w9FkkUhGKAN+qsGmb4sx65FsZ61U9pTfq7darEXiiHWrLRxjW+eI7AVNzxH0jdy9+PZsLK 5uYUVrkZnBMKT/v2mCUFXDxP7s3xvfdxIqhE2tOnXtATtQTmgbhasb4DKLda7k8Mo973Sv Lut+w+tIZjHXvo5NfDfVsiElvtdvlqg7uVrsr4Xc71Do8CxzMbX6UnL3Ss37oGh/ZjQ+Sm TmUjba2PMGWMJARQ8eJn985cjOOXPL0gE3XXV10VMS5ir2En14flvBv8PGQJB3HeZKahVw 0m1DQJ0OU2JWa7Er81rhvogfV07JkyresCGUQztgMamWg9mgLXWMtD9iL7mxeQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D264729 Bug ID: 264729 Summary: RTC clock is set incorrectly upon resume if NTP is in use Product: Base System Version: 13.1-RELEASE Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: crahman@gmail.com Upon resuming after a suspend, if ntpd is running, kern_ntptime.c's schedul= ed periodic_resettodr() will often run before subr_rtc.c's inittodr(). As a result, the rough kernel time gets stored into the RTC before it is used to initialize the kernel time. As a result, the time after a suspend/resume cycle is often many minutes (or occasionally, hours) wrong. Ideally resettodr() would be run before a suspend completed, and any pending periodic_resettodr()'s would be postponed until after inittodr() is run dur= ing resumes. --=20 You are receiving this mail because: You are the assignee for the bug.=