You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
rtc_cmos rtc_cmos: Alarms can be up to one month in the future after waking from suspend #3011
Description
rtc_cmos rtc_cmos: Alarms can be up to one month in the future on CML_RVP_SDW after waking from suspend
happened in inner daily test 4834 model=CML_RVP_SDW testcase=check-suspend-resume-50
[console log]
2021-06-23 22:52:49 UTC [ERROR] Caught kernel log error
===========================>>
[ 4739.061314] kernel: rtc_cmos rtc_cmos: Alarms can be up to one month in the future
<<===========================
changed the title [-][CML]rtc_cmos rtc_cmos: Alarms can be up to one month in the future on CML_RVP_SDW after waking from suspend[/-][+][CML][NOT ON SOF_DEV]rtc_cmos rtc_cmos: Alarms can be up to one month in the future on CML_RVP_SDW after waking from suspend[/+]on Jun 25, 2021
I searched the source code to understand the error message. It happens that an invalid value is passed to rtcwake. More specifically, Alarms can be up to one month in the future is supposed to be printed when the user tries to schedule an alarm more than one month ahead but the RTC clock does not support months. See the full code and commit message there:
Then I looked at the logs and the test did absolutely not try to schedule an alarm more than a month ahead. So I don't know what's going on.
2021-06-23 22:52:01 UTC [REMOTE_INFO] ===== Round(24/50) =====
2021-06-23 22:52:01 UTC [REMOTE_COMMAND] Run the command: rtcwake -m mem -s 5
rtcwake: assuming RTC uses UTC ...
rtcwake: wakeup from "mem" using /dev/rtc0 at Wed Jun 23 22:52:08 2021
2021-06-23 22:52:08 UTC [REMOTE_COMMAND] sleep for 5
2021-06-23 22:52:13 UTC [REMOTE_INFO] Check for the kernel log status
declare -- cmd="journalctl_cmd --since=@1624488716"
2021-06-23 22:52:13 UTC [REMOTE_INFO] Check for the wakeup_count
2021-06-23 22:52:13 UTC [REMOTE_INFO] ===== Round(25/50) =====
2021-06-23 22:52:13 UTC [REMOTE_COMMAND] Run the command: rtcwake -m mem -s 5
rtcwake: assuming RTC uses UTC ...
rtcwake: wakeup from "mem" using /dev/rtc0 at Wed Jun 23 22:52:20 2021
2021-06-23 22:52:20 UTC [REMOTE_COMMAND] sleep for 5
2021-06-23 22:52:25 UTC [REMOTE_INFO] Check for the kernel log status
declare -- cmd="journalctl_cmd --since=@1624488728"
2021-06-23 22:52:25 UTC [REMOTE_INFO] Check for the wakeup_count
2021-06-23 22:52:25 UTC [REMOTE_INFO] ===== Round(26/50) =====
2021-06-23 22:52:25 UTC [REMOTE_COMMAND] Run the command: rtcwake -m mem -s 5
rtcwake: assuming RTC uses UTC ...
rtcwake: wakeup from "mem" using /dev/rtc0 at Wed Jun 23 22:52:32 2021
2021-06-23 22:52:32 UTC [REMOTE_COMMAND] sleep for 5
2021-06-23 22:52:37 UTC [REMOTE_INFO] Check for the kernel log status
declare -- cmd="journalctl_cmd --since=@1624488740"
2021-06-23 22:52:37 UTC [REMOTE_INFO] Check for the wakeup_count
2021-06-23 22:52:37 UTC [REMOTE_INFO] ===== Round(27/50) =====
2021-06-23 22:52:37 UTC [REMOTE_COMMAND] Run the command: rtcwake -m mem -s 5
rtcwake: assuming RTC uses UTC ...
rtcwake: wakeup from "mem" using /dev/rtc0 at Wed Jun 23 22:52:44 2021
2021-06-23 22:52:44 UTC [REMOTE_COMMAND] sleep for 5
2021-06-23 22:52:49 UTC [REMOTE_INFO] Check for the kernel log status
declare -- cmd="journalctl_cmd --since=@1624488752"
2021-06-23 22:52:49 UTC [ERROR] Caught kernel log error
===========================>>
[ 4739.061314] kernel: rtc_cmos rtc_cmos: Alarms can be up to one month in the future
<<===========================
2021-06-23 22:52:49 UTC [REMOTE_ERROR] Caught error in kernel log
2021-06-23 22:52:49 UTC [REMOTE_ERROR] Starting func_exit_handler(), exit status=1, FUNCNAME stack:
2021-06-23 22:52:49 UTC [REMOTE_ERROR] die() @ /home/ubuntu/sof-test/test-case/../case-lib/lib.sh
2021-06-23 22:52:49 UTC [REMOTE_ERROR] main() @ /home/ubuntu/sof-test/test-case/check-suspend-resume.sh:91
2021-06-23 22:52:49 UTC [REMOTE_INFO] Test Result: FAIL!
I checked the logs and found something even more puzzling: this error message came at Jun 23 22:52:44, NOT at the time rtcwake was invoked but 5 seconds later when the system woke up!?
The message can only be printed by cmos_set_alarm(), @plbossart, others any idea what else could be trying to set RTC alarms?
I also compared the logs between successful rtcwake and the failing one and found no obvious difference.
Jun 23 22:52:44 jf-cml-rvp-sdw-3 kernel: smpboot: Booting Node 0 Processor 10 APIC 0x9
Jun 23 22:52:44 jf-cml-rvp-sdw-3 kernel: ACPI: \_SB_.PR10: Found 3 idle states
Jun 23 22:52:44 jf-cml-rvp-sdw-3 kernel: CPU10 is up
Jun 23 22:52:44 jf-cml-rvp-sdw-3 kernel: smpboot: Booting Node 0 Processor 11 APIC 0xb
Jun 23 22:52:44 jf-cml-rvp-sdw-3 kernel: ACPI: \_SB_.PR11: Found 3 idle states
Jun 23 22:52:44 jf-cml-rvp-sdw-3 kernel: CPU11 is up
Jun 23 22:52:44 jf-cml-rvp-sdw-3 kernel: ACPI: Waking up from system sleep state S3
Jun 23 22:52:44 jf-cml-rvp-sdw-3 kernel: ACPI: EC: interrupt unblocked
Jun 23 22:52:44 jf-cml-rvp-sdw-3 kernel: ACPI: EC: event unblocked
Jun 23 22:52:44 jf-cml-rvp-sdw-3 kernel: sd 2:0:0:0: [sda] Starting disk
Jun 23 22:52:44 jf-cml-rvp-sdw-3 kernel: i915 0000:00:02.0: [drm] [ENCODER:94:DDI A/PHY A] is disabled/in DSI mode with an ungated DDI clock, gate it
Jun 23 22:52:44 jf-cml-rvp-sdw-3 kernel: i915 0000:00:02.0: [drm] [ENCODER:102:DDI B/PHY B] is disabled/in DSI mode with an ungated DDI clock, gate it
Jun 23 22:52:44 jf-cml-rvp-sdw-3 kernel: i915 0000:00:02.0: [drm] [ENCODER:117:DDI C/PHY C] is disabled/in DSI mode with an ungated DDI clock, gate it
Jun 23 22:52:44 jf-cml-rvp-sdw-3 kernel: serial 00:06: activated
Jun 23 22:52:44 jf-cml-rvp-sdw-3 kernel: mei_me 0000:00:16.0: hbm: dma setup response: failure = 3 REJECTED
Jun 23 22:52:44 jf-cml-rvp-sdw-3 kernel: rtc_cmos rtc_cmos: Alarms can be up to one month in the future
Jun 23 22:52:44 jf-cml-rvp-sdw-3 kernel: sof-audio-pci-intel-cnl 0000:00:1f.3: Turning i915 HDAC power 1
Jun 23 22:52:44 jf-cml-rvp-sdw-3 kernel: sof-audio-pci-intel-cnl 0000:00:1f.3: Debug PCIR: 00000000 at 00000044
Jun 23 22:52:44 jf-cml-rvp-sdw-3 kernel: sof-audio-pci-intel-cnl 0000:00:1f.3: Debug PCIR: 00000040 at 00000048
Jun 23 22:52:44 jf-cml-rvp-sdw-3 kernel: sof-audio-pci-intel-cnl 0000:00:1f.3: Debug PCIW: 00000000 at 00000048
Jun 23 22:52:44 jf-cml-rvp-sdw-3 kernel: sof-audio-pci-intel-cnl 0000:00:1f.3: Debug PCIR: 00000000 at 00000048
Jun 23 22:52:44 jf-cml-rvp-sdw-3 kernel: sof-audio-pci-intel-cnl 0000:00:1f.3: Debug PCIW: 00000040 at 00000048
Jun 23 22:52:44 jf-cml-rvp-sdw-3 kernel: sof-audio-pci-intel-cnl 0000:00:1f.3: Turning i915 HDAC power 0
Jun 23 22:52:44 jf-cml-rvp-sdw-3 kernel: sof-audio-pci-intel-cnl 0000:00:1f.3: Current DSP power state: D0I0
While this one looks spurious I'm reluctant to ignore time-related error messages considering how many time synchronizations issues and misconfigurations we had in the past and we still experience various TIMEOUTs, see links above.
In fact is this message really "spurious"? Some rogue script invoking rtcwake could explain some TIMEOUTs.
changed the title [-][CML][NOT ON SOF_DEV]rtc_cmos rtc_cmos: Alarms can be up to one month in the future on CML_RVP_SDW after waking from suspend[/-][+][NOT ON SOF_DEV]rtc_cmos rtc_cmos: Alarms can be up to one month in the future on CML_RVP_SDW after waking from suspend[/+]on Jul 5, 2021
@marc-hb@XiaoyunWu6666 We seem to have moved to an issue that's no longer specific to CML_RVP_SDW, should we update title and tags for tracking purposes?
changed the title [-]rtc_cmos rtc_cmos: Alarms can be up to one month in the future on CML_RVP_SDW after waking from suspend[/-][+]rtc_cmos rtc_cmos: Alarms can be up to one month in the future after waking from suspend[/+]on Jan 24, 2022
I checked journalctl on that system and while there was no rtcwake error message there definitely was a hard lockup: absolutely nothing in the logs after the call to rtcwake
Interestingly, CI did NOT timed out and power-cycled the device because it immediately rebooted itself, it was up again less than 30 seconds later.
Activity
[-][CML]rtc_cmos rtc_cmos: Alarms can be up to one month in the future on CML_RVP_SDW after waking from suspend[/-][+][CML][NOT ON SOF_DEV]rtc_cmos rtc_cmos: Alarms can be up to one month in the future on CML_RVP_SDW after waking from suspend[/+]keqiaozhang commentedon Jun 28, 2021
@XiaoyunWu6666 ,please set the RTC time form system time.
XiaoyunWu6666 commentedon Jun 28, 2021
@keqiaozhang already ' sudo hwclock --systohc' on that DUT .
Will track whether it reproduced in CI later . If not ,will close this issue . thanks
marc-hb commentedon Jun 30, 2021
@plbossart can you confirm that we have CONFIG RTC_SYSTOHC enabled always? That makes hwclock unnecessary. It's ON on my system.
Would we have any script messing with /etc/adjtime? I hope not...
plbossart commentedon Jun 30, 2021
yes, it's included in the build
marc-hb commentedon Jun 30, 2021
I searched the source code to understand the error message. It happens that an invalid value is passed to
rtcwake. More specifically,Alarms can be up to one month in the futureis supposed to be printed when the user tries to schedule an alarm more than one month ahead but the RTC clock does not support months. See the full code and commit message there:https://lore.kernel.org/patchwork/patch/722795/
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6a6af3d04435
Then I looked at the logs and the test did absolutely not try to schedule an alarm more than a month ahead. So I don't know what's going on.
marc-hb commentedon Jun 30, 2021
I checked the logs and found something even more puzzling: this error message came at Jun 23 22:52:44, NOT at the time
rtcwakewas invoked but 5 seconds later when the system woke up!?The message can only be printed by
cmos_set_alarm(), @plbossart, others any idea what else could be trying to set RTC alarms?I also compared the logs between successful rtcwake and the failing one and found no obvious difference.
plbossart commentedon Jul 1, 2021
Interesting @marc-hb, could it be that something other that sof-test sets an alarm on resume?
Also wondering if the issue is this log only, what would happen if we ignore it?
marc-hb commentedon Jul 1, 2021
While this one looks spurious I'm reluctant to ignore time-related error messages considering how many time synchronizations issues and misconfigurations we had in the past and we still experience various TIMEOUTs, see links above.
In fact is this message really "spurious"? Some rogue script invoking rtcwake could explain some TIMEOUTs.
plbossart commentedon Jul 1, 2021
I don't disagree, but I don't see how to backtrace who requested the alarm. Could be literally any userspace script or application, no?
[-][CML][NOT ON SOF_DEV]rtc_cmos rtc_cmos: Alarms can be up to one month in the future on CML_RVP_SDW after waking from suspend[/-][+][NOT ON SOF_DEV]rtc_cmos rtc_cmos: Alarms can be up to one month in the future on CML_RVP_SDW after waking from suspend[/+]21 remaining items
plbossart commentedon Oct 13, 2021
@fredoh9 @XiaoyunWu6666 @marc-hb do we still see this issue? if not can we close?
marc-hb commentedon Oct 15, 2021
Just now after @fredoh9 extended the suspend-resume test from 1 cycle per device to 5 cycles per device.
https://sof-ci.01.org/sofpr/PR4866/build10718/devicetest/?model=APL_UP2_HDA&testcase=check-suspend-resume-with-playback-5
https://sof-ci.01.org/sofpr/PR4866/build10718/devicetest/?model=APL_UP2_HDA&testcase=check-suspend-resume-with-playback-5
plbossart commentedon Oct 15, 2021
also seen in https://sof-ci.01.org/sofpr/PR4868/build10727/devicetest/?model=APL_UP2_NOCODEC&testcase=check-suspend-resume-with-playback-5
marc-hb commentedon Jan 24, 2022
https://sof-ci.01.org/sofpr/PR5239/build11751/devicetest/?model=APL_UP2_HDA&testcase=check-suspend-resume-5
XiaoyunWu6666 commentedon Jan 24, 2022
this happened sh-apl-up2-hda-07
will check whether hw update can solve this or not after CNY :)
plbossart commentedon Jan 24, 2022
@marc-hb @XiaoyunWu6666 We seem to have moved to an issue that's no longer specific to CML_RVP_SDW, should we update title and tags for tracking purposes?
[-]rtc_cmos rtc_cmos: Alarms can be up to one month in the future on CML_RVP_SDW after waking from suspend[/-][+]rtc_cmos rtc_cmos: Alarms can be up to one month in the future after waking from suspend[/+]marc-hb commentedon May 7, 2022
Collecting more
/sysdata inPlease help review.
plbossart commentedon Jun 29, 2022
@marc-hb @XiaoyunWu6666 i can't recall if this problem still exists?
marc-hb commentedon Jun 29, 2022
They may not print this message but we still experience rtcwake freezes on a regular basis so I would prefer to keep this open
marc-hb commentedon Jun 30, 2022
Fresh from the oven: https://sof-ci.01.org/sofpr/PR5875/build778/devicetest/?model=WHL_UPEXT_HDA_ZEPHYR&testcase=check-suspend-resume-5
I checked
journalctlon that system and while there was no rtcwake error message there definitely was a hard lockup: absolutely nothing in the logs after the call tortcwakeInterestingly, CI did NOT timed out and power-cycled the device because it immediately rebooted itself, it was up again less than 30 seconds later.
plbossart commentedon Jul 20, 2022
That would need to be tracked as a separate bug. This issue was only related to the 'one month into the future'.