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
[BUG] [CML] [APL] using smp_processor_id() in preemptible (suspend/resume failure with 5.16-rc kernel) #3283
using .... in preemptible is not the first error. It's only the first error found by the test code. I'm not sure it's relevant. Here's a more complete trace from https://sof-ci.01.org/linuxpr/PR3282/build6722/devicetest/ that includes the first warning in drivers/base/syscore.c:96 syscore_resume
Nov 18 14:06:23 up2-nocodec kernel: ACPI: PM: Low-level resume complete
Nov 18 14:06:23 up2-nocodec kernel: ACPI: PM: Restoring platform NVS memory
Nov 18 14:06:23 up2-nocodec kernel: ------------[ cut here ]------------
Nov 18 14:06:23 up2-nocodec kernel: Interrupts enabled before system core resume.
Nov 18 14:06:23 up2-nocodec kernel: WARNING: CPU: 0 PID: 28872 at drivers/base/syscore.c:96 syscore_resume+0x1b3/0x1d0
Nov 18 14:06:23 up2-nocodec kernel: Modules linked in: snd_usb_audio snd_hwdep snd_sof_pci_intel_tgl snd_sof_pci_intel_icl snd_sof_pci_intel_cnl snd_sof_nocod>
Nov 18 14:06:23 up2-nocodec kernel: CPU: 0 PID: 28872 Comm: rtcwake Not tainted 5.16.0-rc1-pr3282-6722-nocodec #12d19efd
Nov 18 14:06:23 up2-nocodec kernel: Hardware name: AAEON UP-APL01/UP-APL01, BIOS UPA1AM36 04/10/2018
Nov 18 14:06:23 up2-nocodec kernel: RIP: 0010:syscore_resume+0x1b3/0x1d0
Nov 18 14:06:23 up2-nocodec kernel: Code: 42 50 00 0f 0b e9 d0 fe ff ff 80 3d cd 93 32 01 00 0f 85 88 fe ff ff 48 c7 c7 a0 8d 62 bd c6 05 b9 93 32 01 01 e8 da>
Nov 18 14:06:23 up2-nocodec kernel: RSP: 0018:ffffb02e40bf7d58 EFLAGS: 00010282
Nov 18 14:06:23 up2-nocodec kernel: RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
Nov 18 14:06:23 up2-nocodec kernel: RDX: 0000000000000001 RSI: ffffffffbd5b3e89 RDI: 00000000ffffffff
Nov 18 14:06:23 up2-nocodec kernel: RBP: 0000000000000003 R08: 00000177acf52545 R09: 0000000000000000
Nov 18 14:06:23 up2-nocodec kernel: R10: 0000000000000001 R11: 0000000000000001 R12: 0000000000000000
Nov 18 14:06:23 up2-nocodec kernel: R13: ffffb02e40bf7d70 R14: 0000000000000000 R15: 0000000000000003
Nov 18 14:06:23 up2-nocodec kernel: FS: 00007f6b4843c580(0000) GS:ffffa1e67b600000(0000) knlGS:0000000000000000
Nov 18 14:06:23 up2-nocodec kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Nov 18 14:06:23 up2-nocodec kernel: CR2: 00007f2b49ed1b08 CR3: 00000001353de000 CR4: 00000000003506f0
Nov 18 14:06:23 up2-nocodec kernel: Call Trace:
Nov 18 14:06:23 up2-nocodec kernel: <TASK>
Nov 18 14:06:23 up2-nocodec kernel: suspend_devices_and_enter+0x749/0x8f0
Nov 18 14:06:23 up2-nocodec kernel: pm_suspend.cold+0x2b1/0x2fc
Nov 18 14:06:23 up2-nocodec kernel: state_store+0x6c/0xd0
Nov 18 14:06:23 up2-nocodec kernel: kernfs_fop_write_iter+0x124/0x1c0
Nov 18 14:06:23 up2-nocodec kernel: new_sync_write+0x120/0x1b0
Nov 18 14:06:23 up2-nocodec kernel: vfs_write+0x239/0x310
Nov 18 14:06:23 up2-nocodec kernel: ksys_write+0x63/0xe0
Nov 18 14:06:23 up2-nocodec kernel: do_syscall_64+0x3b/0x90
Nov 18 14:06:23 up2-nocodec kernel: entry_SYSCALL_64_after_hwframe+0x44/0xae
Nov 18 14:06:23 up2-nocodec kernel: RIP: 0033:0x7f6b4835a057
Nov 18 14:06:23 up2-nocodec kernel: Code: 64 89 02 48 c7 c0 ff ff ff ff eb bb 0f 1f 80 00 00 00 00 f3 0f 1e fa 64 8b 04 25 18 00 00 00 85 c0 75 10 b8 01 00 00>
Nov 18 14:06:23 up2-nocodec kernel: RSP: 002b:00007ffe0abe5dd8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
Nov 18 14:06:23 up2-nocodec kernel: RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 00007f6b4835a057
Nov 18 14:06:23 up2-nocodec kernel: RDX: 0000000000000004 RSI: 00005600c2c99640 RDI: 0000000000000004
Nov 18 14:06:23 up2-nocodec kernel: RBP: 00005600c2c99640 R08: 0000000000000000 R09: 0000000000000004
Nov 18 14:06:23 up2-nocodec kernel: R10: 00005600c279a2a6 R11: 0000000000000246 R12: 0000000000000004
Nov 18 14:06:23 up2-nocodec kernel: R13: 00005600c2c965e0 R14: 00007f6b484364a0 R15: 00007f6b484358a0
Nov 18 14:06:23 up2-nocodec kernel: </TASK>
Nov 18 14:06:23 up2-nocodec kernel: ---[ end trace 88a06c414b3cf79c ]---
Nov 18 14:06:23 up2-nocodec kernel: ------------[ cut here ]------------
Nov 18 14:06:23 up2-nocodec kernel: Interrupts enabled after init_counter_refs+0x0/0x60
Nov 18 14:06:23 up2-nocodec kernel: WARNING: CPU: 0 PID: 28872 at drivers/base/syscore.c:103 syscore_resume+0x18c/0x1d0
Nov 18 14:06:23 up2-nocodec kernel: Modules linked in: snd_usb_audio snd_hwdep snd_sof_pci_intel_tgl snd_sof_pci_intel_icl snd_sof_pci_intel_cnl snd_sof_nocod>
Nov 18 14:06:23 up2-nocodec kernel: CPU: 0 PID: 28872 Comm: rtcwake Tainted: G W 5.16.0-rc1-pr3282-6722-nocodec #12d19efd
Nov 18 14:06:23 up2-nocodec kernel: Hardware name: AAEON UP-APL01/UP-APL01, BIOS UPA1AM36 04/10/2018
Nov 18 14:06:23 up2-nocodec kernel: RIP: 0010:syscore_resume+0x18c/0x1d0
Nov 18 14:06:23 up2-nocodec kernel: Code: 00 e9 b5 fe ff ff 80 3d f7 93 32 01 00 0f 85 ee fe ff ff 48 8b 73 18 48 c7 c7 47 8e 62 bd c6 05 df 93 32 01 01 e8 01>
Nov 18 14:06:23 up2-nocodec kernel: RSP: 0018:ffffb02e40bf7d58 EFLAGS: 00010282
Nov 18 14:06:23 up2-nocodec kernel: RAX: 0000000000000000 RBX: ffffffffbd855fc0 RCX: 0000000000000000
Nov 18 14:06:23 up2-nocodec kernel: RDX: 0000000000000001 RSI: ffffffffbd5b3e89 RDI: 00000000ffffffff
Nov 18 14:06:23 up2-nocodec kernel: RBP: 0000000000000003 R08: 00000177acfee096 R09: 0000000000000000
Nov 18 14:06:23 up2-nocodec kernel: R10: 0000000000000001 R11: 0000000000000001 R12: 0000000000000000
Nov 18 14:06:23 up2-nocodec kernel: R13: ffffb02e40bf7d70 R14: 0000000000000000 R15: 0000000000000003
Nov 18 14:06:23 up2-nocodec kernel: FS: 00007f6b4843c580(0000) GS:ffffa1e67b600000(0000) knlGS:0000000000000000
Nov 18 14:06:23 up2-nocodec kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Nov 18 14:06:23 up2-nocodec kernel: CR2: 00007f2b49ed1b08 CR3: 00000001353de000 CR4: 00000000003506f0
Nov 18 14:06:23 up2-nocodec kernel: Call Trace:
Nov 18 14:06:23 up2-nocodec kernel: <TASK>
Nov 18 14:06:23 up2-nocodec kernel: suspend_devices_and_enter+0x749/0x8f0
Nov 18 14:06:23 up2-nocodec kernel: pm_suspend.cold+0x2b1/0x2fc
Nov 18 14:06:23 up2-nocodec kernel: state_store+0x6c/0xd0
Nov 18 14:06:23 up2-nocodec kernel: kernfs_fop_write_iter+0x124/0x1c0
Nov 18 14:06:23 up2-nocodec kernel: new_sync_write+0x120/0x1b0
Nov 18 14:06:23 up2-nocodec kernel: vfs_write+0x239/0x310
Nov 18 14:06:23 up2-nocodec kernel: ksys_write+0x63/0xe0
Nov 18 14:06:23 up2-nocodec kernel: do_syscall_64+0x3b/0x90
Nov 18 14:06:23 up2-nocodec kernel: entry_SYSCALL_64_after_hwframe+0x44/0xae
Nov 18 14:06:23 up2-nocodec kernel: RIP: 0033:0x7f6b4835a057
Nov 18 14:06:23 up2-nocodec kernel: Code: 64 89 02 48 c7 c0 ff ff ff ff eb bb 0f 1f 80 00 00 00 00 f3 0f 1e fa 64 8b 04 25 18 00 00 00 85 c0 75 10 b8 01 00 00>
Nov 18 14:06:23 up2-nocodec kernel: RSP: 002b:00007ffe0abe5dd8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
Nov 18 14:06:23 up2-nocodec kernel: RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 00007f6b4835a057
Nov 18 14:06:23 up2-nocodec kernel: RDX: 0000000000000004 RSI: 00005600c2c99640 RDI: 0000000000000004
Nov 18 14:06:23 up2-nocodec kernel: RBP: 00005600c2c99640 R08: 0000000000000000 R09: 0000000000000004
Nov 18 14:06:23 up2-nocodec kernel: R10: 00005600c279a2a6 R11: 0000000000000246 R12: 0000000000000004
Nov 18 14:06:23 up2-nocodec kernel: R13: 00005600c2c965e0 R14: 00007f6b484364a0 R15: 00007f6b484358a0
Nov 18 14:06:23 up2-nocodec kernel: </TASK>
Nov 18 14:06:23 up2-nocodec kernel: ---[ end trace 88a06c414b3cf79d ]---
Nov 18 14:06:23 up2-nocodec kernel: BUG: using smp_processor_id() in preemptible [00000000] code: rtcwake/28872
Nov 18 14:06:23 up2-nocodec kernel: caller is tsc_verify_tsc_adjust+0x14/0xe0
Nov 18 14:06:23 up2-nocodec kernel: CPU: 0 PID: 28872 Comm: rtcwake Tainted: G W 5.16.0-rc1-pr3282-6722-nocodec #12d19efd
Nov 18 14:06:23 up2-nocodec kernel: Hardware name: AAEON UP-APL01/UP-APL01, BIOS UPA1AM36 04/10/2018
Nov 18 14:06:23 up2-nocodec kernel: Call Trace:
Nov 18 14:06:23 up2-nocodec kernel: <TASK>
Nov 18 14:06:23 up2-nocodec kernel: dump_stack_lvl+0x34/0x44
Nov 18 14:06:23 up2-nocodec kernel: check_preemption_disabled+0xd9/0xe0
Nov 18 14:06:23 up2-nocodec kernel: tsc_verify_tsc_adjust+0x14/0xe0
Nov 18 14:06:23 up2-nocodec kernel: clocksource_resume+0x25/0x40
Nov 18 14:06:23 up2-nocodec kernel: timekeeping_resume+0x38/0x270
Nov 18 14:06:23 up2-nocodec kernel: syscore_resume+0x58/0x1d0
Nov 18 14:06:23 up2-nocodec kernel: suspend_devices_and_enter+0x749/0x8f0
Nov 18 14:06:23 up2-nocodec kernel: pm_suspend.cold+0x2b1/0x2fc
Nov 18 14:06:23 up2-nocodec kernel: state_store+0x6c/0xd0
Nov 18 14:06:23 up2-nocodec kernel: kernfs_fop_write_iter+0x124/0x1c0
Nov 18 14:06:23 up2-nocodec kernel: new_sync_write+0x120/0x1b0
Nov 18 14:06:23 up2-nocodec kernel: vfs_write+0x239/0x310
Nov 18 14:06:23 up2-nocodec kernel: ksys_write+0x63/0xe0
Nov 18 14:06:23 up2-nocodec kernel: do_syscall_64+0x3b/0x90
Nov 18 14:06:23 up2-nocodec kernel: entry_SYSCALL_64_after_hwframe+0x44/0xae
Nov 18 14:06:23 up2-nocodec kernel: RIP: 0033:0x7f6b4835a057
Nov 18 14:06:23 up2-nocodec kernel: Code: 64 89 02 48 c7 c0 ff ff ff ff eb bb 0f 1f 80 00 00 00 00 f3 0f 1e fa 64 8b 04 25 18 00 00 00 85 c0 75 10 b8 01 00 00>
Nov 18 14:06:23 up2-nocodec kernel: RSP: 002b:00007ffe0abe5dd8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
Nov 18 14:06:23 up2-nocodec kernel: RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 00007f6b4835a057
Nov 18 14:06:23 up2-nocodec kernel: RDX: 0000000000000004 RSI: 00005600c2c99640 RDI: 0000000000000004
Nov 18 14:06:23 up2-nocodec kernel: RBP: 00005600c2c99640 R08: 0000000000000000 R09: 0000000000000004
Nov 18 14:06:23 up2-nocodec kernel: R10: 00005600c279a2a6 R11: 0000000000000246 R12: 0000000000000004
Nov 18 14:06:23 up2-nocodec kernel: R13: 00005600c2c965e0 R14: 00007f6b484364a0 R15: 00007f6b484358a0
Nov 18 14:06:23 up2-nocodec kernel: </TASK>
Nov 18 14:06:23 up2-nocodec kernel: BUG: using smp_processor_id() in preemptible [00000000] code: rtcwake/28872
Nov 18 14:06:23 up2-nocodec kernel: caller is tick_resume_local+0xe/0x50
Nov 18 14:06:23 up2-nocodec kernel: CPU: 0 PID: 28872 Comm: rtcwake Tainted: G W 5.16.0-rc1-pr3282-6722-nocodec #12d19efd
Nov 18 14:06:23 up2-nocodec kernel: Hardware name: AAEON UP-APL01/UP-APL01, BIOS UPA1AM36 04/10/2018
Nov 18 14:06:23 up2-nocodec kernel: Call Trace:
Nov 18 14:06:23 up2-nocodec kernel: <TASK>
Nov 18 14:06:23 up2-nocodec kernel: dump_stack_lvl+0x34/0x44
Nov 18 14:06:23 up2-nocodec kernel: check_preemption_disabled+0xd9/0xe0
Nov 18 14:06:23 up2-nocodec kernel: tick_resume_local+0xe/0x50
Nov 18 14:06:23 up2-nocodec kernel: timekeeping_resume+0x1f7/0x270
Nov 18 14:06:23 up2-nocodec kernel: syscore_resume+0x58/0x1d0
Nov 18 14:06:23 up2-nocodec kernel: suspend_devices_and_enter+0x749/0x8f0
Nov 18 14:06:23 up2-nocodec kernel: pm_suspend.cold+0x2b1/0x2fc
Nov 18 14:06:23 up2-nocodec kernel: state_store+0x6c/0xd0
Nov 18 14:06:23 up2-nocodec kernel: kernfs_fop_write_iter+0x124/0x1c0
Nov 18 14:06:23 up2-nocodec kernel: new_sync_write+0x120/0x1b0
Nov 18 14:06:23 up2-nocodec kernel: vfs_write+0x239/0x310
Nov 18 14:06:23 up2-nocodec kernel: ksys_write+0x63/0xe0
Nov 18 14:06:23 up2-nocodec kernel: do_syscall_64+0x3b/0x90
Nov 18 14:06:23 up2-nocodec kernel: entry_SYSCALL_64_after_hwframe+0x44/0xae
Nov 18 14:06:23 up2-nocodec kernel: RIP: 0033:0x7f6b4835a057
Nov 18 14:06:23 up2-nocodec kernel: Code: 64 89 02 48 c7 c0 ff ff ff ff eb bb 0f 1f 80 00 00 00 00 f3 0f 1e fa 64 8b 04 25 18 00 00 00 85 c0 75 10 b8 01 00 00>
Nov 18 14:06:23 up2-nocodec kernel: RSP: 002b:00007ffe0abe5dd8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
Nov 18 14:06:23 up2-nocodec kernel: RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 00007f6b4835a057
Nov 18 14:06:23 up2-nocodec kernel: RDX: 0000000000000004 RSI: 00005600c2c99640 RDI: 0000000000000004
Nov 18 14:06:23 up2-nocodec kernel: RBP: 00005600c2c99640 R08: 0000000000000000 R09: 0000000000000004
Nov 18 14:06:23 up2-nocodec kernel: R10: 00005600c279a2a6 R11: 0000000000000246 R12: 0000000000000004
Nov 18 14:06:23 up2-nocodec kernel: R13: 00005600c2c965e0 R14: 00007f6b484364a0 R15: 00007f6b484358a0
Nov 18 14:06:23 up2-nocodec kernel: </TASK>
Nov 18 14:06:23 up2-nocodec kernel: BUG: using __this_cpu_read() in preemptible [00000000] code: rtcwake/28872
Nov 18 14:06:23 up2-nocodec kernel: caller is tick_resume_oneshot+0xd/0x40
Nov 18 14:06:23 up2-nocodec kernel: CPU: 0 PID: 28872 Comm: rtcwake Tainted: G W 5.16.0-rc1-pr3282-6722-nocodec #12d19efd
Nov 18 14:06:23 up2-nocodec kernel: Hardware name: AAEON UP-APL01/UP-APL01, BIOS UPA1AM36 04/10/2018
changed the title [-][BUG] check-suspend-resume-with-playback-5 fail on APL2 with 5.16-rc kernel[/-][+][BUG] Interrupts enabled before system core resume (check-suspend-resume-with-playback-5 fail on APL2 with 5.16-rc kernel)[/+]on Nov 19, 2021
@marc-hb I thought you told earlier week that this kind of non-audio kernel stuff should/could be filed here for tracking. But ack, let's file elsewhere. Retest on plain 5.16-rc1 is needed to file to kernel bugzilla.
I thought you told earlier week that this kind of non-audio kernel stuff should/could be filed here for tracking....
... yes but not as a bug but as a task to ignore it and only if we intend on ignoring it because we looked at it carefully and we know for sure it can be safely ignored because it will not affect audio test results in any way. Unfortunately, suspend/resume bugs are often difficult to ignore in suspend/resume tests - even when they're not audio-related.
I ran journalctl -g 'Linux version|Interrupts enabled |BUG.*preempt' over the few days of logs we have on this system. Unlike the BUG: preemptible, the two Interrupts enabled warnings are NOT new to 5.16! Also, the BUG: preemptible is not happening every time with 5.16, in fact it happened only once (together with the warnings, see above)
changed the title [-][BUG] Interrupts enabled before system core resume (check-suspend-resume-with-playback-5 fail on APL2 with 5.16-rc kernel)[/-][+][BUG] [CML] [APL] using smp_processor_id() in preemptible (suspend/resume failure with 5.16-rc kernel)[/+]on Nov 20, 2021
What this commit a8b7691 seems to do is change the configs
diff good.config bad.config
116,119c116,119< CONFIG_PREEMPT_NONE_BEHAVIOUR=y< # CONFIG_PREEMPT_VOLUNTARY_BEHAVIOUR is not set< # CONFIG_PREEMPT_BEHAVIOUR is not set< CONFIG_PREEMPT=y---> CONFIG_PREEMPT_BUILD=y> # CONFIG_PREEMPT_NONE is not set> CONFIG_PREEMPT_VOLUNTARY=y> # CONFIG_PREEMPT is not set
CONFIG_PREEMPT is not set in the 'bad' case, that's probably not so good.
Another possibility is that this Kconfig change exposes issues where hidden before. We do see a warning
[1320.674726] kernel: Interrupts enabled before system core resume.
in all the test results, so it could very well be that the preemption errors are just a side effect of the initial error with interrupts enabled too early.
The interrupt problem is indeed very likely, without reverting anything but using the following diff in .config, the error does not seem to happen
diff .config bad.config 118,119c118,119< # CONFIG_PREEMPT_VOLUNTARY is not set< CONFIG_PREEMPT=y---> CONFIG_PREEMPT_VOLUNTARY=y> # CONFIG_PREEMPT is not set
Conclusion for the day: it seems that the commit a8b7691 did change the scheduling defaults. Before CONFIG_PREEMPT was selected by default, and the change is to move to CONFIG_PREEMPT_VOLUNTARY
We can fix this in the Kconfig options by explicitly selecting CONFIG_PREEMPT. That would give us the SAME results are before.
And as a background task we'll have to figure out what happens when CONFIG_PREEMPT_VOLUNTARY is selected.
[EDIT: this report is incomplete because I scanned only the dmesg.txt files but other test runs have only the converted dmesg.html]
I ran a huge scan in all the kernel logs of all suspend resume test runs we still have on file. The "Interrupts enabled" warning is not old, I found it for the very first time on October 31st (daily run 7830) Sept 14 when looking at dmesg.html files too, see next comment.
Bar one PR exception, all occurrences I found were in daily test results.
Using playback or capture does not seem to make it more likely.
This was on Sep. 14th, testing #3153Merge/sound upstream 20210914 v5.15-rc1 - probably not a coincidence!
Stay tuned for more stats.
EDIT: the list of platforms for the 636 dmesg.html files with the warning is basically the same: APL far more frequent than anything else, then CML, then ADLS and finally WHL and TGL. Roughly the same proportions as above.
I'm not sure there is correlation between the WARNINGs and the test failing, at least no obvious one. Are these warnings really related to the preemptible BUG? Track in a different github issue? One appeared with 5.15, the other with 5.16
The Interrupts enabled... warnings always go in pairs (never reproduced more than once each in a single run) except on TGLx_RVP (and only on TGLx RVP) where there is rarely a 3rd, iommu_suspend warning before the usual two. See for example internal weekly test plan 8513?model=TGLU_RVP_HDA&testcase=check-suspend-resume-100
Activity
kv2019i commentedon Nov 18, 2021
Also with CML:
https://sof-ci.01.org/linuxpr/PR3282/build6722/devicetest/?model=CML_RVP_SDW&testcase=check-suspend-resume-with-playback-5
marc-hb commentedon Nov 18, 2021
Interesting, could this help explain why we had so many timeouts with rtcwake thesofproject/sof-test#650 ?
marc-hb commentedon Nov 19, 2021
@kv2019i why is this filed in sof-test? This is a
kernel: BUG:that is very clearly triggered by new kernel code.EDIT: now transferred to linux.
marc-hb commentedon Nov 19, 2021
After a little bit of Googling, "preemptible" implies "migratable" - to a different CPU. This is why calling per-CPU functions is bad.
marc-hb commentedon Nov 19, 2021
using .... in preemptibleis not the first error. It's only the first error found by the test code. I'm not sure it's relevant. Here's a more complete trace from https://sof-ci.01.org/linuxpr/PR3282/build6722/devicetest/ that includes the first warning indrivers/base/syscore.c:96 syscore_resume[-][BUG] check-suspend-resume-with-playback-5 fail on APL2 with 5.16-rc kernel[/-][+][BUG] Interrupts enabled before system core resume (check-suspend-resume-with-playback-5 fail on APL2 with 5.16-rc kernel)[/+]kv2019i commentedon Nov 19, 2021
@marc-hb I thought you told earlier week that this kind of non-audio kernel stuff should/could be filed here for tracking. But ack, let's file elsewhere. Retest on plain 5.16-rc1 is needed to file to kernel bugzilla.
marc-hb commentedon Nov 19, 2021
... yes but not as a bug but as a task to ignore it and only if we intend on ignoring it because we looked at it carefully and we know for sure it can be safely ignored because it will not affect audio test results in any way. Unfortunately, suspend/resume bugs are often difficult to ignore in suspend/resume tests - even when they're not audio-related.
marc-hb commentedon Nov 19, 2021
I ran
journalctl -g 'Linux version|Interrupts enabled |BUG.*preempt'over the few days of logs we have on this system. Unlike theBUG: preemptible, the twoInterrupts enabledwarnings are NOT new to 5.16! Also, theBUG: preemptibleis not happening every time with 5.16, in fact it happened only once (together with the warnings, see above)EDIT: one more: https://sof-ci.01.org/sofpr/PR5016/build11211/devicetest/
[-][BUG] Interrupts enabled before system core resume (check-suspend-resume-with-playback-5 fail on APL2 with 5.16-rc kernel)[/-][+][BUG] [CML] [APL] using smp_processor_id() in preemptible (suspend/resume failure with 5.16-rc kernel)[/+]12 remaining items
plbossart commentedon Dec 1, 2021
What this commit a8b7691 seems to do is change the configs
CONFIG_PREEMPT is not set in the 'bad' case, that's probably not so good.
[HACK] drivers/base: report error on interrupts enabled before resume
plbossart commentedon Dec 1, 2021
Another possibility is that this Kconfig change exposes issues where hidden before. We do see a warning
in all the test results, so it could very well be that the preemption errors are just a side effect of the initial error with interrupts enabled too early.
plbossart commentedon Dec 1, 2021
The interrupt problem is indeed very likely, without reverting anything but using the following diff in .config, the error does not seem to happen
plbossart commentedon Dec 1, 2021
Conclusion for the day: it seems that the commit a8b7691 did change the scheduling defaults. Before CONFIG_PREEMPT was selected by default, and the change is to move to CONFIG_PREEMPT_VOLUNTARY
We can fix this in the Kconfig options by explicitly selecting CONFIG_PREEMPT. That would give us the SAME results are before.
And as a background task we'll have to figure out what happens when CONFIG_PREEMPT_VOLUNTARY is selected.
base-defconfig: select PREEMPT as work-around for 5.16-rc1 changes
base-defconfig: select PREEMPT as work-around for 5.16-rc1 changes
marc-hb commentedon Dec 2, 2021
[EDIT: this report is incomplete because I scanned only the
dmesg.txtfiles but other test runs have only the converteddmesg.html]I ran a huge scan in all the kernel logs of all suspend resume test runs we still have on file. The "Interrupts enabled" warning is not old, I found it for the very first time on
October 31st (daily run 7830)Sept 14 when looking atdmesg.htmlfiles too, see next comment.Bar one PR exception, all occurrences I found were in daily test results.Using playback or capture does not seem to make it more likely.
Reproduction rate is highly platform-dependent:
marc-hb commentedon Dec 2, 2021
After looking at
dmesg.htmlfiles too I think I found the very very firstInterrupts enabled...warning:https://sof-ci.01.org/linuxpr/PR3153/build6340/devicetest/?model=APL_UP2_NOCODEC&testcase=check-suspend-resume-with-playback
This was on Sep. 14th, testing #3153
Merge/sound upstream 20210914v5.15-rc1 - probably not a coincidence!Stay tuned for more stats.
EDIT: the list of platforms for the 636
dmesg.htmlfiles with the warning is basically the same: APL far more frequent than anything else, then CML, then ADLS and finally WHL and TGL. Roughly the same proportions as above.I'm not sure there is correlation between the WARNINGs and the test failing, at least no obvious one. Are these warnings really related to the preemptible BUG? Track in a different github issue? One appeared with 5.15, the other with 5.16
The
Interrupts enabled...warnings always go in pairs (never reproduced more than once each in a single run) except on TGLx_RVP (and only on TGLx RVP) where there is rarely a 3rd,iommu_suspendwarning before the usual two. See for example internal weekly test plan 8513?model=TGLU_RVP_HDA&testcase=check-suspend-resume-100plbossart commentedon Dec 2, 2021
Forking the discussion on the interrupt warning to #3307
base-defconfig: select PREEMPT as work-around for 5.16-rc1 changes
marc-hb commentedon Dec 10, 2021
Stochastic bisection in Git https://lwn.net/Articles/877964/
plbossart commentedon Jul 20, 2022
we haven't seen this issue in 6+ months, closing