Bug 217928 - BUG: scheduling while atomic: gnome-shell/3581/0x00000000
Summary: BUG: scheduling while atomic: gnome-shell/3581/0x00000000
Status: RESOLVED CODE_FIX
Alias: None
Product: Alternate Trees
Classification: Unclassified
Component: rt (show other bugs)
Hardware: All Linux
: P3 normal
Assignee: Sebastian A. Siewior
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-09-20 06:37 UTC by sander44
Modified: 2023-09-23 10:35 UTC (History)
1 user (show)

See Also:
Kernel Version: 6.5.3-rt6
Subsystem:
Regression: No
Bisected commit-id:


Attachments
dmesg (113.50 KB, text/plain)
2023-09-20 06:39 UTC, sander44
Details
amd gpu patch series (4.55 KB, application/x-xz)
2023-09-21 14:21 UTC, Sebastian A. Siewior
Details

Description sander44 2023-09-20 06:37:25 UTC
Hi Kernel Team,

I noticed this after suspend to ram. 6.5.3-rt6

Output:
...

[ 5260.791971] BUG: scheduling while atomic: gnome-shell/3581/0x00000002
[ 5260.791978] Modules linked in: snd_usb_audio(E) snd_usbmidi_lib(E) snd_ump(E) snd_rawmidi(E) ccm(E) rfcomm(E) snd_seq_dummy(E) snd_hrtimer(E) cmac(E) algif_hash(E) algif_skcipher(E) af_alg(E) nf_conntrack_netbios_ns(E) nf_conntrack_broadcast(E) nft_fib_inet(E) nft_fib_ipv4(E) nft_fib_ipv6(E) nft_fib(E) nft_reject_inet(E) nf_reject_ipv4(E) nf_reject_ipv6(E) nft_reject(E) nft_ct(E) nft_chain_nat(E) nf_nat(E) nf_conntrack(E) nf_defrag_ipv6(E) nf_defrag_ipv4(E) ip_set(E) nf_tables(E) qrtr(E) nfnetlink(E) bnep(E) snd_sof_amd_rembrandt(E) mt7921e(E) snd_sof_amd_renoir(E) binfmt_misc(E) snd_sof_amd_acp(E) mt7921_common(E) snd_sof_pci(E) snd_sof_xtensa_dsp(E) snd_sof(E) mt76_connac_lib(E) mt76(E) nls_iso8859_1(E) snd_sof_utils(E) mac80211(E) snd_hda_codec_realtek(E) snd_soc_core(E) btusb(E) snd_hda_codec_generic(E) btrtl(E) btbcm(E) snd_hda_codec_hdmi(E) intel_rapl_msr(E) btintel(E) intel_rapl_common(E) snd_compress(E) btmtk(E) ac97_bus(E) snd_hda_intel(E) edac_mce_amd(E) snd_pcm_dmaengine(E) snd_intel_dspcfg(E)
[ 5260.792038]  snd_intel_sdw_acpi(E) kvm_amd(E) bluetooth(E) snd_pci_ps(E) snd_hda_codec(E) snd_rpl_pci_acp6x(E) snd_acp_pci(E) snd_hda_core(E) snd_pci_acp6x(E) snd_hwdep(E) snd_seq(E) kvm(E) ecdh_generic(E) ecc(E) snd_seq_device(E) cfg80211(E) snd_pcm(E) asus_nb_wmi(E) irqbypass(E) snd_pci_acp5x(E) snd_rn_pci_acp3x(E) snd_acp_config(E) rapl(E) wmi_bmof(E) snd_soc_acpi(E) snd_timer(E) pcspkr(E) input_leds(E) snd_pci_acp3x(E) snd(E) i2c_piix4(E) k10temp(E) soundcore(E) libarc4(E) asus_wireless(E) joydev(E) amd_pmc(E) mac_hid(E) sch_fq_codel(E) efi_pstore(E) zram(E) dmi_sysfs(E) amdgpu(E) hid_asus(E) asus_wmi(E) ledtrig_audio(E) sparse_keymap(E) platform_profile(E) usbkbd(E) usbhid(E) i2c_algo_bit(E) drm_ttm_helper(E) ttm(E) drm_suballoc_helper(E) amdxcp(E) iommu_v2(E) drm_buddy(E) gpu_sched(E) drm_display_helper(E) drm_kms_helper(E) hid_multitouch(E) nvme(E) hid_generic(E) drm(E) crct10dif_pclmul(E) crc32_pclmul(E) polyval_clmulni(E) polyval_generic(E) ghash_clmulni_intel(E) nvme_core(E) i2c_hid_acpi(E) sha512_ssse3(E)
[ 5260.792094]  ccp(E) aesni_intel(E) i2c_hid(E) ucsi_acpi(E) crypto_simd(E) typec_ucsi(E) cryptd(E) xhci_pci(E) nvme_common(E) video(E) xhci_pci_renesas(E) typec(E) sp5100_tco(E) hid(E) wmi(E) btrfs(E) blake2b_generic(E) libcrc32c(E) xor(E) raid6_pq(E) ip6_tables(E) ip_tables(E) x_tables(E) msr(E) autofs4(E)
[ 5260.792116] CPU: 4 PID: 3581 Comm: gnome-shell Tainted: G            E      6.5.3-sunlight1-rt6-realtime #1
[ 5260.792119] Hardware name: ASUSTeK COMPUTER INC. ROG Zephyrus G14 GA401QM_GA401QM/GA401QM, BIOS GA401QM.412 08/30/2022
[ 5260.792120] Call Trace:
[ 5260.792122]  <TASK>
[ 5260.792126]  dump_stack_lvl+0x48/0x70
[ 5260.792132]  dump_stack+0x10/0x20
[ 5260.792134]  __schedule_bug+0x6a/0xb0
[ 5260.792138]  __schedule+0x1692/0x1e90
[ 5260.792144]  schedule_rtlock+0x1f/0x40
[ 5260.792146]  rtlock_slowlock_locked+0x44e/0x10e0
[ 5260.792153]  rt_spin_lock+0x53/0x80
[ 5260.792156]  get_page_from_freelist+0x1315/0x2f80
[ 5260.792167]  ? srso_alias_return_thunk+0x5/0x7f
[ 5260.792171]  __alloc_pages+0xf0/0x220
[ 5260.792176]  alloc_pages+0x9e/0x310
[ 5260.792179]  ? srso_alias_return_thunk+0x5/0x7f
[ 5260.792182]  allocate_slab+0x4a1/0x680
[ 5260.792187]  ___slab_alloc+0x4c7/0xa80
[ 5260.792190]  ? dcn21_validate_bandwidth_fp+0xa0/0x1070 [amdgpu]
[ 5260.792718]  __kmem_cache_alloc_node+0xec/0x240
[ 5260.792726]  ? dcn21_validate_bandwidth_fp+0xa0/0x1070 [amdgpu]
[ 5260.793233]  ? dcn21_validate_bandwidth_fp+0xa0/0x1070 [amdgpu]
[ 5260.793569]  __kmalloc+0xa9/0x270
[ 5260.793574]  ? srso_alias_return_thunk+0x5/0x7f
[ 5260.793578]  dcn21_validate_bandwidth_fp+0xa0/0x1070 [amdgpu]
[ 5260.793830]  ? srso_alias_return_thunk+0x5/0x7f
[ 5260.793832]  ? resource_build_scaling_params+0x9ac/0xfd0 [amdgpu]
[ 5260.794117]  ? srso_alias_return_thunk+0x5/0x7f
[ 5260.794121]  ? save_fpregs_to_fpstate+0x3f/0xb0
[ 5260.794130]  dcn21_validate_bandwidth+0x35/0x60 [amdgpu]
[ 5260.794430]  ? dcn21_validate_bandwidth+0x35/0x60 [amdgpu]
[ 5260.794710]  dc_validate_global_state+0x3d0/0x640 [amdgpu]
[ 5260.794937]  amdgpu_dm_atomic_check+0x1292/0x16b0 [amdgpu]
[ 5260.795169]  ? dm_drm_plane_duplicate_state+0x2e/0x80 [amdgpu]
[ 5260.795383]  drm_atomic_check_only+0x664/0xb10 [drm]
[ 5260.795410]  drm_atomic_nonblocking_commit+0x18/0x70 [drm]
[ 5260.795429]  drm_atomic_helper_page_flip+0x108/0x170 [drm_kms_helper]
[ 5260.795444]  drm_mode_page_flip_ioctl+0x605/0x670 [drm]
[ 5260.795471]  ? __pfx_drm_mode_page_flip_ioctl+0x10/0x10 [drm]
[ 5260.795492]  drm_ioctl_kernel+0xdd/0x190 [drm]
[ 5260.795519]  drm_ioctl+0x2d4/0x550 [drm]
[ 5260.795541]  ? __pfx_drm_mode_page_flip_ioctl+0x10/0x10 [drm]
[ 5260.795565]  amdgpu_drm_ioctl+0x4e/0x90 [amdgpu]
[ 5260.795725]  __x64_sys_ioctl+0xa3/0xf0
[ 5260.795729]  do_syscall_64+0x5c/0x90
[ 5260.795732]  ? syscall_exit_to_user_mode+0x2b/0x50
[ 5260.795735]  ? srso_alias_return_thunk+0x5/0x7f
[ 5260.795737]  ? do_syscall_64+0x68/0x90
[ 5260.795739]  ? syscall_exit_to_user_mode+0x2b/0x50
[ 5260.795740]  ? srso_alias_return_thunk+0x5/0x7f
[ 5260.795742]  ? do_syscall_64+0x68/0x90
[ 5260.795743]  ? irqentry_exit_to_user_mode+0x19/0x30
[ 5260.795745]  ? srso_alias_return_thunk+0x5/0x7f
[ 5260.795746]  ? irqentry_exit+0x77/0x90
[ 5260.795748]  ? srso_alias_return_thunk+0x5/0x7f
[ 5260.795749]  ? sysvec_apic_timer_interrupt+0x4b/0xd0
[ 5260.795751]  entry_SYSCALL_64_after_hwframe+0x6e/0xd8
[ 5260.795754] RIP: 0033:0x7f9d3a8d0e5d
[ 5260.795757] Code: 04 25 28 00 00 00 48 89 45 c8 31 c0 48 8d 45 10 c7 45 b0 10 00 00 00 48 89 45 b8 48 8d 45 d0 48 89 45 c0 b8 10 00 00 00 0f 05 <89> c2 3d 00 f0 ff ff 77 1a 48 8b 45 c8 64 48 2b 04 25 28 00 00 00
[ 5260.795758] RSP: 002b:00007fff107f5580 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
[ 5260.795761] RAX: ffffffffffffffda RBX: 000000000000000b RCX: 00007f9d3a8d0e5d
[ 5260.795762] RDX: 00007fff107f5610 RSI: 00000000c01864b0 RDI: 000000000000000b
[ 5260.795763] RBP: 00007fff107f55d0 R08: 0000556f0a044260 R09: 0000000000000060
[ 5260.795764] R10: 0000556f09eba9e0 R11: 0000000000000246 R12: 00007fff107f5610
[ 5260.795765] R13: 00000000c01864b0 R14: 000000000000000b R15: 0000556f031be6c0
[ 5260.795769]  </TASK>
[ 5260.796319] BUG: scheduling while atomic: gnome-shell/3581/0x00000000
[ 5260.796322] Modules linked in: snd_usb_audio(E) snd_usbmidi_lib(E) snd_ump(E) snd_rawmidi(E) ccm(E) rfcomm(E) snd_seq_dummy(E) snd_hrtimer(E) cmac(E) algif_hash(E) algif_skcipher(E) af_alg(E) nf_conntrack_netbios_ns(E) nf_conntrack_broadcast(E) nft_fib_inet(E) nft_fib_ipv4(E) nft_fib_ipv6(E) nft_fib(E) nft_reject_inet(E) nf_reject_ipv4(E) nf_reject_ipv6(E) nft_reject(E) nft_ct(E) nft_chain_nat(E) nf_nat(E) nf_conntrack(E) nf_defrag_ipv6(E) nf_defrag_ipv4(E) ip_set(E) nf_tables(E) qrtr(E) nfnetlink(E) bnep(E) snd_sof_amd_rembrandt(E) mt7921e(E) snd_sof_amd_renoir(E) binfmt_misc(E) snd_sof_amd_acp(E) mt7921_common(E) snd_sof_pci(E) snd_sof_xtensa_dsp(E) snd_sof(E) mt76_connac_lib(E) mt76(E) nls_iso8859_1(E) snd_sof_utils(E) mac80211(E) snd_hda_codec_realtek(E) snd_soc_core(E) btusb(E) snd_hda_codec_generic(E) btrtl(E) btbcm(E) snd_hda_codec_hdmi(E) intel_rapl_msr(E) btintel(E) intel_rapl_common(E) snd_compress(E) btmtk(E) ac97_bus(E) snd_hda_intel(E) edac_mce_amd(E) snd_pcm_dmaengine(E) snd_intel_dspcfg(E)
[ 5260.796385]  snd_intel_sdw_acpi(E) kvm_amd(E) bluetooth(E) snd_pci_ps(E) snd_hda_codec(E) snd_rpl_pci_acp6x(E) snd_acp_pci(E) snd_hda_core(E) snd_pci_acp6x(E) snd_hwdep(E) snd_seq(E) kvm(E) ecdh_generic(E) ecc(E) snd_seq_device(E) cfg80211(E) snd_pcm(E) asus_nb_wmi(E) irqbypass(E) snd_pci_acp5x(E) snd_rn_pci_acp3x(E) snd_acp_config(E) rapl(E) wmi_bmof(E) snd_soc_acpi(E) snd_timer(E) pcspkr(E) input_leds(E) snd_pci_acp3x(E) snd(E) i2c_piix4(E) k10temp(E) soundcore(E) libarc4(E) asus_wireless(E) joydev(E) amd_pmc(E) mac_hid(E) sch_fq_codel(E) efi_pstore(E) zram(E) dmi_sysfs(E) amdgpu(E) hid_asus(E) asus_wmi(E) ledtrig_audio(E) sparse_keymap(E) platform_profile(E) usbkbd(E) usbhid(E) i2c_algo_bit(E) drm_ttm_helper(E) ttm(E) drm_suballoc_helper(E) amdxcp(E) iommu_v2(E) drm_buddy(E) gpu_sched(E) drm_display_helper(E) drm_kms_helper(E) hid_multitouch(E) nvme(E) hid_generic(E) drm(E) crct10dif_pclmul(E) crc32_pclmul(E) polyval_clmulni(E) polyval_generic(E) ghash_clmulni_intel(E) nvme_core(E) i2c_hid_acpi(E) sha512_ssse3(E)
[ 5260.796453]  ccp(E) aesni_intel(E) i2c_hid(E) ucsi_acpi(E) crypto_simd(E) typec_ucsi(E) cryptd(E) xhci_pci(E) nvme_common(E) video(E) xhci_pci_renesas(E) typec(E) sp5100_tco(E) hid(E) wmi(E) btrfs(E) blake2b_generic(E) libcrc32c(E) xor(E) raid6_pq(E) ip6_tables(E) ip_tables(E) x_tables(E) msr(E) autofs4(E)
[ 5260.796478] CPU: 4 PID: 3581 Comm: gnome-shell Tainted: G        W   E      6.5.3-sunlight1-rt6-realtime #1
[ 5260.796482] Hardware name: ASUSTeK COMPUTER INC. ROG Zephyrus G14 GA401QM_GA401QM/GA401QM, BIOS GA401QM.412 08/30/2022
[ 5260.796484] Call Trace:
[ 5260.796487]  <TASK>
[ 5260.796490]  dump_stack_lvl+0x48/0x70
[ 5260.796500]  dump_stack+0x10/0x20
[ 5260.796502]  __schedule_bug+0x6a/0xb0
[ 5260.796507]  __schedule+0x1692/0x1e90
[ 5260.796512]  ? srso_alias_return_thunk+0x5/0x7f
[ 5260.796517]  ? __alloc_pages+0x117/0x220
[ 5260.796525]  ? srso_alias_return_thunk+0x5/0x7f
[ 5260.796527]  ? timerqueue_add+0xa6/0xd0
[ 5260.796530]  ? srso_alias_return_thunk+0x5/0x7f
[ 5260.796532]  ? enqueue_hrtimer+0x46/0xe0
[ 5260.796538]  ? srso_alias_return_thunk+0x5/0x7f
[ 5260.796540]  ? hrtimer_start_range_ns+0x167/0x5c0
[ 5260.796543]  schedule+0x33/0x100
[ 5260.796546]  schedule_hrtimeout_range+0x10c/0x230
[ 5260.796549]  ? __pfx_hrtimer_wakeup+0x10/0x10
[ 5260.796552]  do_sys_poll+0x52d/0x680
[ 5260.796562]  ? __pfx_pollwake+0x10/0x10
[ 5260.796568]  ? __pfx_pollwake+0x10/0x10
[ 5260.796572]  ? __pfx_pollwake+0x10/0x10
[ 5260.796575]  ? __pfx_pollwake+0x10/0x10
[ 5260.796578]  ? __pfx_pollwake+0x10/0x10
[ 5260.796581]  ? __pfx_pollwake+0x10/0x10
[ 5260.796584]  ? __pfx_pollwake+0x10/0x10
[ 5260.796587]  ? __pfx_pollwake+0x10/0x10
[ 5260.796590]  ? __pfx_pollwake+0x10/0x10
[ 5260.796593]  ? srso_alias_return_thunk+0x5/0x7f
[ 5260.796596]  __x64_sys_poll+0xd6/0x190
[ 5260.796599]  do_syscall_64+0x5c/0x90
[ 5260.796604]  ? srso_alias_return_thunk+0x5/0x7f
[ 5260.796606]  ? exit_to_user_mode_prepare+0x49/0x220
[ 5260.796612]  ? srso_alias_return_thunk+0x5/0x7f
[ 5260.796614]  ? syscall_exit_to_user_mode+0x2b/0x50
[ 5260.796618]  ? srso_alias_return_thunk+0x5/0x7f
[ 5260.796620]  ? do_syscall_64+0x68/0x90
[ 5260.796622]  ? do_syscall_64+0x68/0x90
[ 5260.796624]  ? srso_alias_return_thunk+0x5/0x7f
[ 5260.796626]  ? do_syscall_64+0x68/0x90
[ 5260.796627]  ? irqentry_exit_to_user_mode+0x19/0x30
[ 5260.796630]  ? srso_alias_return_thunk+0x5/0x7f
[ 5260.796632]  ? irqentry_exit+0x77/0x90
[ 5260.796634]  ? srso_alias_return_thunk+0x5/0x7f
[ 5260.796636]  ? sysvec_apic_timer_interrupt+0x4b/0xd0
[ 5260.796639]  entry_SYSCALL_64_after_hwframe+0x6e/0xd8
[ 5260.796645] RIP: 0033:0x7f9d3a8cf2dd
[ 5260.796648] Code: e5 48 83 ec 20 89 55 ec 48 89 75 f0 48 89 7d f8 e8 58 37 f8 ff 8b 55 ec 48 8b 75 f0 41 89 c0 48 8b 7d f8 b8 07 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 2b 44 89 c7 89 45 f8 e8 b0 37 f8 ff 8b 45 f8
[ 5260.796650] RSP: 002b:00007fff107f5e50 EFLAGS: 00000293 ORIG_RAX: 0000000000000007
[ 5260.796653] RAX: ffffffffffffffda RBX: 0000556f02f19920 RCX: 00007f9d3a8cf2dd
[ 5260.796655] RDX: 000000000000001d RSI: 0000000000000012 RDI: 0000556f04cf8960
[ 5260.796656] RBP: 00007fff107f5e70 R08: 0000000000000000 R09: 0000556f04cf8960
[ 5260.796658] R10: 0000000000000000 R11: 0000000000000293 R12: 0000556f04cf8960
[ 5260.796660] R13: 00007f9d3afb50be R14: 0000000000000012 R15: 000000000000001d
[ 5260.796665]  </TASK>
Comment 1 sander44 2023-09-20 06:39:26 UTC
Created attachment 305129 [details]
dmesg
Comment 2 Sebastian A. Siewior 2023-09-21 14:21:20 UTC
Created attachment 305134 [details]
amd gpu patch series

Can you test the attached patches?
Comment 3 sander44 2023-09-22 05:27:37 UTC
Hi Sebastian,

I will try to check them today.
Comment 4 sander44 2023-09-22 06:46:54 UTC
I tested it and it is good. Everything now works correctly.

The amdgpu video driver is no longer under stress on suspend to ram. Thank you very much for your help.

Do you think we will have them upstream in 6.6?
Comment 5 Sebastian A. Siewior 2023-09-22 07:54:38 UTC
I posted them at
  https://lore.kernel.org/r/20230921141516.520471-1-bigeasy@linutronix.de

lets see. I will integrate them in the next v6.6-RT release.
Comment 6 sander44 2023-09-23 10:35:31 UTC
Thanks for the help. The patches are working fine now on my laptop.

Note You need to log in before you can comment on or make changes to this bug.