* Kernel 5.0.21rt16 hangs @ 2019-08-09 15:45 Yann COLLETTE 2019-08-14 14:42 ` Sebastian Andrzej Siewior 0 siblings, 1 reply; 3+ messages in thread From: Yann COLLETTE @ 2019-08-09 15:45 UTC (permalink / raw) To: linux-rt-users Hello, I am using kernel-rt 5.0.21rt16 on fedora 30. I use this kernel for audio. After a while, this kernel hangs. Here the related messge I found in /var/log/messages: Aug 9 17:16:35 localhost kernel: BUG: scheduling while atomic: Xorg/1087/0x00000003 Aug 9 17:16:35 localhost kernel: Modules linked in: snd_hrtimer snd_seq_midi snd_seq_midi_event snd_seq_dummy fuse xt_CHECKSUM ipt_MASQUERADE tun bridge stp llc ccm nf_conntrack_netbios_ns nf_conntrack_broadcast xt_CT ip6t_rpfilter ip6t_REJECT nf_reject_ipv6 ipt_REJECT nf_reject_ipv4 xt_conntrack ebtable_nat ip6table_nat nf_nat_ipv6 ip6table_mangle ip6table_raw ip6table_security iptable_nat nf_nat_ipv4 nf_nat iptable_mangle iptable_raw iptable_security nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 libcrc32c ip_set nfnetlink ebtable_filter ebtables ip6table_filter ip6_tables iptable_filter ip_tables sunrpc vfat fat uvcvideo videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 videobuf2_common snd_usb_audio videodev snd_usbmidi_lib joydev media snd_rawmidi snd_hda_codec_realtek snd_hda_codec_generic edac_mce_amd ledtrig_audio pktcdvd snd_hda_codec_hdmi kvm_amd arc4 kvm irqbypass rtl8188ee snd_hda_intel snd_hda_codec rtl_pci crct10dif_pclmul rtlwifi snd_hda_core crc32_pclmul snd_hwdep ghash_clmulni_intel mac80211 Aug 9 17:16:35 localhost kernel: snd_seq hp_wmi snd_seq_device sp5100_tco sparse_keymap cfg80211 snd_pcm rfkill snd_timer wmi_bmof i2c_piix4 snd pcc_cpufreq soundcore ccp k10temp fam15h_power acpi_cpufreq pcspkr amdgpu chash amd_iommu_v2 gpu_sched crc32c_intel radeon i2c_algo_bit drm_kms_helper ttm drm r8169 wmi uas usb_storage Aug 9 17:16:35 localhost kernel: Preemption disabled at: Aug 9 17:16:35 localhost kernel: [<ffffffff8c67239e>] reservation_object_add_shared_fence+0x3e/0x1b0 Aug 9 17:16:35 localhost kernel: CPU: 3 PID: 1087 Comm: Xorg Not tainted 5.0.21-rt16.fc30.x86_64 #1 Aug 9 17:16:35 localhost kernel: Hardware name: HP 450-a121nf/2B29, BIOS A0.11 01/15/2016 Aug 9 17:16:35 localhost kernel: Call Trace: Aug 9 17:16:35 localhost kernel: dump_stack+0x5c/0x80 Aug 9 17:16:35 localhost kernel: ? reservation_object_add_shared_fence+0x3e/0x1b0 Aug 9 17:16:35 localhost kernel: __schedule_bug.cold+0x44/0x51 Aug 9 17:16:35 localhost kernel: __schedule+0x5c6/0x6f0 Aug 9 17:16:35 localhost kernel: schedule+0x43/0xd0 Aug 9 17:16:35 localhost kernel: rt_spin_lock_slowlock_locked+0x114/0x2b0 Aug 9 17:16:35 localhost kernel: rt_spin_lock_slowlock+0x51/0x80 Aug 9 17:16:35 localhost kernel: __wake_up_common_lock+0x61/0xb0 Aug 9 17:16:35 localhost kernel: radeon_fence_is_signaled+0x74/0x90 [radeon] Aug 9 17:16:35 localhost kernel: reservation_object_add_shared_fence+0x97/0x1b0 Aug 9 17:16:35 localhost kernel: radeon_vm_bo_update+0x409/0x640 [radeon] Aug 9 17:16:35 localhost kernel: radeon_gem_va_ioctl+0x41c/0x500 [radeon] Aug 9 17:16:35 localhost kernel: ? radeon_gem_get_tiling_ioctl+0x120/0x120 [radeon] Aug 9 17:16:35 localhost kernel: drm_ioctl_kernel+0xa7/0xf0 [drm] Aug 9 17:16:35 localhost kernel: drm_ioctl+0x208/0x390 [drm] Aug 9 17:16:35 localhost kernel: ? radeon_gem_get_tiling_ioctl+0x120/0x120 [radeon] Aug 9 17:16:35 localhost kernel: ? unpin_current_cpu+0x3a/0x80 Aug 9 17:16:35 localhost kernel: ? migrate_enable+0x235/0x400 Aug 9 17:16:35 localhost kernel: ? _raw_spin_unlock_irqrestore+0x1f/0x60 Aug 9 17:16:35 localhost kernel: radeon_drm_ioctl+0x49/0x80 [radeon] Aug 9 17:16:35 localhost kernel: do_vfs_ioctl+0x40c/0x670 Aug 9 17:16:35 localhost kernel: ksys_ioctl+0x5e/0x90 Aug 9 17:16:35 localhost kernel: ? switch_fpu_return+0x2d/0x160 Aug 9 17:16:35 localhost kernel: __x64_sys_ioctl+0x16/0x20 Aug 9 17:16:35 localhost kernel: do_syscall_64+0x5b/0x180 Aug 9 17:16:35 localhost kernel: entry_SYSCALL_64_after_hwframe+0x44/0xa9 Aug 9 17:16:35 localhost kernel: RIP: 0033:0x7f987e69e1fb Aug 9 17:16:35 localhost kernel: Code: 0f 1e fa 48 8b 05 8d dc 0c 00 64 c7 00 26 00 00 00 48 c7 c0 ff ff ff ff c3 66 0f 1f 44 00 00 f3 0f 1e fa b8 10 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 5d dc 0c 00 f7 d8 64 89 01 48 Aug 9 17:16:35 localhost kernel: RSP: 002b:00007ffdef71c448 EFLAGS: 00003246 ORIG_RAX: 0000000000000010 Aug 9 17:16:35 localhost kernel: RAX: ffffffffffffffda RBX: 00007ffdef71c4a0 RCX: 00007f987e69e1fb Aug 9 17:16:35 localhost kernel: RDX: 00007ffdef71c4a0 RSI: 00000000c018646b RDI: 0000000000000012 Aug 9 17:16:35 localhost kernel: RBP: 00000000c018646b R08: 000055b81a8a09e0 R09: 0000000000000000 Aug 9 17:16:35 localhost kernel: R10: 000055b81b4e14a0 R11: 0000000000003246 R12: 0000000000004000 Aug 9 17:16:35 localhost kernel: R13: 0000000000000012 R14: 00000000000f0000 R15: 000055b81b93a4f0 Aug 9 17:16:35 localhost kernel: WARNING: CPU: 0 PID: 1087 at kernel/sched/core.c:7303 migrate_enable+0x2e7/0x400 Aug 9 17:16:35 localhost kernel: Modules linked in: snd_hrtimer snd_seq_midi snd_seq_midi_event snd_seq_dummy fuse xt_CHECKSUM ipt_MASQUERADE tun bridge stp llc ccm nf_conntrack_netbios_ns nf_conntrack_broadcast xt_CT ip6t_rpfilter ip6t_REJECT nf_reject_ipv6 ipt_REJECT nf_reject_ipv4 xt_conntrack ebtable_nat ip6table_nat nf_nat_ipv6 ip6table_mangle ip6table_raw ip6table_security iptable_nat nf_nat_ipv4 nf_nat iptable_mangle iptable_raw iptable_security nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 libcrc32c ip_set nfnetlink ebtable_filter ebtables ip6table_filter ip6_tables iptable_filter ip_tables sunrpc vfat fat uvcvideo videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 videobuf2_common snd_usb_audio videodev snd_usbmidi_lib joydev media snd_rawmidi snd_hda_codec_realtek snd_hda_codec_generic edac_mce_amd ledtrig_audio pktcdvd snd_hda_codec_hdmi kvm_amd arc4 kvm irqbypass rtl8188ee snd_hda_intel snd_hda_codec rtl_pci crct10dif_pclmul rtlwifi snd_hda_core crc32_pclmul snd_hwdep ghash_clmulni_intel mac80211 Aug 9 17:16:35 localhost kernel: snd_seq hp_wmi snd_seq_device sp5100_tco sparse_keymap cfg80211 snd_pcm rfkill snd_timer wmi_bmof i2c_piix4 snd pcc_cpufreq soundcore ccp k10temp fam15h_power acpi_cpufreq pcspkr amdgpu chash amd_iommu_v2 gpu_sched crc32c_intel radeon i2c_algo_bit drm_kms_helper ttm drm r8169 wmi uas usb_storage Aug 9 17:16:35 localhost kernel: CPU: 0 PID: 1087 Comm: Xorg Tainted: G W 5.0.21-rt16.fc30.x86_64 #1 Aug 9 17:16:35 localhost kernel: Hardware name: HP 450-a121nf/2B29, BIOS A0.11 01/15/2016 Aug 9 17:16:35 localhost kernel: RIP: 0010:migrate_enable+0x2e7/0x400 Aug 9 17:16:35 localhost kernel: Code: fe ff ff e8 df 16 ef ff e9 7b fe ff ff 48 8b 00 a9 00 00 04 00 0f 84 53 ff ff ff e8 c7 16 ef ff e9 49 ff ff ff e8 69 aa 0b 00 <0f> 0b e9 64 fd ff ff f6 43 2e 20 48 c7 c0 a8 fe 35 8d 4c 89 e2 bf Aug 9 17:16:35 localhost kernel: RSP: 0018:ffffb71f026bfa10 EFLAGS: 00010246 Aug 9 17:16:35 localhost kernel: RAX: 0000000000000000 RBX: ffff940011860000 RCX: ffff94003680ae08 Aug 9 17:16:35 localhost kernel: RDX: 0000000000000000 RSI: 0000000000100000 RDI: ffff94003680ae00 Aug 9 17:16:35 localhost kernel: RBP: 0000000000000003 R08: ffffffff8ce11380 R09: 0000000000000001 Aug 9 17:16:35 localhost kernel: R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000000000 Aug 9 17:16:35 localhost kernel: R13: 0000000000000000 R14: 0000000000000000 R15: ffff93ff054c8e40 Aug 9 17:16:35 localhost kernel: FS: 00007f987e233a80(0000) GS:ffff940036e00000(0000) knlGS:0000000000000000 Aug 9 17:16:35 localhost kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 Aug 9 17:16:35 localhost kernel: CR2: 00007f9d912c3578 CR3: 000000021e77a000 CR4: 00000000000406f0 Aug 9 17:16:35 localhost kernel: Call Trace: Aug 9 17:16:35 localhost kernel: ? rt_mutex_futex_unlock+0xa3/0xb0 Aug 9 17:16:35 localhost kernel: rt_spin_unlock+0x23/0x40 Aug 9 17:16:35 localhost kernel: __wake_up_common_lock+0x82/0xb0 Aug 9 17:16:35 localhost kernel: radeon_fence_is_signaled+0x74/0x90 [radeon] Aug 9 17:16:35 localhost kernel: reservation_object_add_shared_fence+0x97/0x1b0 Aug 9 17:16:35 localhost kernel: radeon_vm_bo_update+0x409/0x640 [radeon] Aug 9 17:16:35 localhost kernel: radeon_gem_va_ioctl+0x41c/0x500 [radeon] Aug 9 17:16:35 localhost kernel: ? radeon_gem_get_tiling_ioctl+0x120/0x120 [radeon] Aug 9 17:16:35 localhost kernel: drm_ioctl_kernel+0xa7/0xf0 [drm] Aug 9 17:16:35 localhost kernel: drm_ioctl+0x208/0x390 [drm] Aug 9 17:16:35 localhost kernel: ? radeon_gem_get_tiling_ioctl+0x120/0x120 [radeon] Aug 9 17:16:35 localhost kernel: ? unpin_current_cpu+0x3a/0x80 Aug 9 17:16:35 localhost kernel: ? migrate_enable+0x235/0x400 Aug 9 17:16:35 localhost kernel: ? _raw_spin_unlock_irqrestore+0x1f/0x60 Aug 9 17:16:35 localhost kernel: radeon_drm_ioctl+0x49/0x80 [radeon] Aug 9 17:16:35 localhost kernel: do_vfs_ioctl+0x40c/0x670 Aug 9 17:16:35 localhost kernel: ksys_ioctl+0x5e/0x90 Aug 9 17:16:35 localhost kernel: ? switch_fpu_return+0x2d/0x160 Aug 9 17:16:35 localhost kernel: __x64_sys_ioctl+0x16/0x20 Aug 9 17:16:35 localhost kernel: do_syscall_64+0x5b/0x180 Aug 9 17:16:35 localhost kernel: entry_SYSCALL_64_after_hwframe+0x44/0xa9 Aug 9 17:16:35 localhost kernel: RIP: 0033:0x7f987e69e1fb Aug 9 17:16:35 localhost kernel: Code: 0f 1e fa 48 8b 05 8d dc 0c 00 64 c7 00 26 00 00 00 48 c7 c0 ff ff ff ff c3 66 0f 1f 44 00 00 f3 0f 1e fa b8 10 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 5d dc 0c 00 f7 d8 64 89 01 48 Aug 9 17:16:35 localhost kernel: RSP: 002b:00007ffdef71c448 EFLAGS: 00003246 ORIG_RAX: 0000000000000010 Aug 9 17:16:35 localhost kernel: RAX: ffffffffffffffda RBX: 00007ffdef71c4a0 RCX: 00007f987e69e1fb Aug 9 17:16:35 localhost kernel: RDX: 00007ffdef71c4a0 RSI: 00000000c018646b RDI: 0000000000000012 Aug 9 17:16:35 localhost kernel: RBP: 00000000c018646b R08: 000055b81a8a09e0 R09: 0000000000000000 Aug 9 17:16:35 localhost kernel: R10: 000055b81b4e14a0 R11: 0000000000003246 R12: 0000000000004000 Aug 9 17:16:35 localhost kernel: R13: 0000000000000012 R14: 00000000000f0000 R15: 000055b81b93a4f0 Aug 9 17:16:35 localhost kernel: ---[ end trace 0000000000000002 ]--- Aug 9 17:16:35 localhost kernel: WARNING: CPU: 0 PID: 1087 at kernel/sched/core.c:7307 migrate_enable+0x92/0x400 Aug 9 17:16:35 localhost kernel: Modules linked in: snd_hrtimer snd_seq_midi snd_seq_midi_event snd_seq_dummy fuse xt_CHECKSUM ipt_MASQUERADE tun bridge stp llc ccm nf_conntrack_netbios_ns nf_conntrack_broadcast xt_CT ip6t_rpfilter ip6t_REJECT nf_reject_ipv6 ipt_REJECT nf_reject_ipv4 xt_conntrack ebtable_nat ip6table_nat nf_nat_ipv6 ip6table_mangle ip6table_raw ip6table_security iptable_nat nf_nat_ipv4 nf_nat iptable_mangle iptable_raw iptable_security nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 libcrc32c ip_set nfnetlink ebtable_filter ebtables ip6table_filter ip6_tables iptable_filter ip_tables sunrpc vfat fat uvcvideo videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 videobuf2_common snd_usb_audio videodev snd_usbmidi_lib joydev media snd_rawmidi snd_hda_codec_realtek snd_hda_codec_generic edac_mce_amd ledtrig_audio pktcdvd snd_hda_codec_hdmi kvm_amd arc4 kvm irqbypass rtl8188ee snd_hda_intel snd_hda_codec rtl_pci crct10dif_pclmul rtlwifi snd_hda_core crc32_pclmul snd_hwdep ghash_clmulni_intel mac80211 Aug 9 17:16:35 localhost kernel: snd_seq hp_wmi snd_seq_device sp5100_tco sparse_keymap cfg80211 snd_pcm rfkill snd_timer wmi_bmof i2c_piix4 snd pcc_cpufreq soundcore ccp k10temp fam15h_power acpi_cpufreq pcspkr amdgpu chash amd_iommu_v2 gpu_sched crc32c_intel radeon i2c_algo_bit drm_kms_helper ttm drm r8169 wmi uas usb_storage Aug 9 17:16:35 localhost kernel: CPU: 0 PID: 1087 Comm: Xorg Tainted: G W 5.0.21-rt16.fc30.x86_64 #1 Aug 9 17:16:35 localhost kernel: Hardware name: HP 450-a121nf/2B29, BIOS A0.11 01/15/2016 Aug 9 17:16:35 localhost kernel: RIP: 0010:migrate_enable+0x92/0x400 Aug 9 17:16:35 localhost kernel: Code: 00 00 eb 07 83 ab c4 03 00 00 01 48 8b 44 24 20 65 48 33 04 25 28 00 00 00 0f 85 72 03 00 00 48 83 c4 28 5b 5d 41 5c 41 5d c3 <0f> 0b bf 01 00 00 00 e8 02 d9 ff ff 4c 8d a3 b0 03 00 00 48 8d 74 Aug 9 17:16:35 localhost kernel: RSP: 0018:ffffb71f026bfa10 EFLAGS: 00010246 Aug 9 17:16:35 localhost kernel: RAX: 0000000000000000 RBX: ffff940011860000 RCX: ffff94003680ae08 Aug 9 17:16:35 localhost kernel: RDX: 0000000000000000 RSI: 0000000000100000 RDI: ffff94003680ae00 Aug 9 17:16:35 localhost kernel: RBP: 0000000000000003 R08: ffffffff8ce11380 R09: 0000000000000001 Aug 9 17:16:35 localhost kernel: R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000000000 Aug 9 17:16:35 localhost kernel: R13: 0000000000000000 R14: 0000000000000000 R15: ffff93ff054c8e40 Aug 9 17:16:35 localhost kernel: FS: 00007f987e233a80(0000) GS:ffff940036e00000(0000) knlGS:0000000000000000 Aug 9 17:16:35 localhost kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 Aug 9 17:16:35 localhost kernel: CR2: 00007f9d912c3578 CR3: 000000021e77a000 CR4: 00000000000406f0 Aug 9 17:16:35 localhost kernel: Call Trace: Aug 9 17:16:35 localhost kernel: ? rt_mutex_futex_unlock+0xa3/0xb0 Aug 9 17:16:35 localhost kernel: rt_spin_unlock+0x23/0x40 Aug 9 17:16:35 localhost kernel: __wake_up_common_lock+0x82/0xb0 Aug 9 17:16:35 localhost kernel: radeon_fence_is_signaled+0x74/0x90 [radeon] Aug 9 17:16:35 localhost kernel: reservation_object_add_shared_fence+0x97/0x1b0 Aug 9 17:16:35 localhost kernel: radeon_vm_bo_update+0x409/0x640 [radeon] Aug 9 17:16:35 localhost kernel: radeon_gem_va_ioctl+0x41c/0x500 [radeon] Aug 9 17:16:35 localhost kernel: ? radeon_gem_get_tiling_ioctl+0x120/0x120 [radeon] Aug 9 17:16:35 localhost kernel: drm_ioctl_kernel+0xa7/0xf0 [drm] Aug 9 17:16:35 localhost kernel: drm_ioctl+0x208/0x390 [drm] Aug 9 17:16:35 localhost kernel: ? radeon_gem_get_tiling_ioctl+0x120/0x120 [radeon] Aug 9 17:16:35 localhost kernel: ? unpin_current_cpu+0x3a/0x80 Aug 9 17:16:35 localhost kernel: ? migrate_enable+0x235/0x400 Aug 9 17:16:35 localhost kernel: ? _raw_spin_unlock_irqrestore+0x1f/0x60 Aug 9 17:16:35 localhost kernel: radeon_drm_ioctl+0x49/0x80 [radeon] Aug 9 17:16:35 localhost kernel: do_vfs_ioctl+0x40c/0x670 Aug 9 17:16:35 localhost kernel: ksys_ioctl+0x5e/0x90 Aug 9 17:16:35 localhost kernel: ? switch_fpu_return+0x2d/0x160 Aug 9 17:16:35 localhost kernel: __x64_sys_ioctl+0x16/0x20 Aug 9 17:16:35 localhost kernel: do_syscall_64+0x5b/0x180 Aug 9 17:16:35 localhost kernel: entry_SYSCALL_64_after_hwframe+0x44/0xa9 Aug 9 17:16:35 localhost kernel: RIP: 0033:0x7f987e69e1fb Aug 9 17:16:35 localhost kernel: Code: 0f 1e fa 48 8b 05 8d dc 0c 00 64 c7 00 26 00 00 00 48 c7 c0 ff ff ff ff c3 66 0f 1f 44 00 00 f3 0f 1e fa b8 10 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 5d dc 0c 00 f7 d8 64 89 01 48 Aug 9 17:16:35 localhost kernel: RSP: 002b:00007ffdef71c448 EFLAGS: 00003246 ORIG_RAX: 0000000000000010 Aug 9 17:16:35 localhost kernel: RAX: ffffffffffffffda RBX: 00007ffdef71c4a0 RCX: 00007f987e69e1fb Aug 9 17:16:35 localhost kernel: RDX: 00007ffdef71c4a0 RSI: 00000000c018646b RDI: 0000000000000012 Aug 9 17:16:35 localhost kernel: RBP: 00000000c018646b R08: 000055b81a8a09e0 R09: 0000000000000000 Aug 9 17:16:35 localhost kernel: R10: 000055b81b4e14a0 R11: 0000000000003246 R12: 0000000000004000 Aug 9 17:16:35 localhost kernel: R13: 0000000000000012 R14: 00000000000f0000 R15: 000055b81b93a4f0 Aug 9 17:16:35 localhost kernel: ---[ end trace 0000000000000003 ]--- Aug 9 17:16:35 localhost kernel: WARNING: CPU: 0 PID: 1087 at kernel/cpu.c:330 unpin_current_cpu+0x60/0x80 Aug 9 17:16:35 localhost kernel: Modules linked in: snd_hrtimer snd_seq_midi snd_seq_midi_event snd_seq_dummy fuse xt_CHECKSUM ipt_MASQUERADE tun bridge stp llc ccm nf_conntrack_netbios_ns nf_conntrack_broadcast xt_CT ip6t_rpfilter ip6t_REJECT nf_reject_ipv6 ipt_REJECT nf_reject_ipv4 xt_conntrack ebtable_nat ip6table_nat nf_nat_ipv6 ip6table_mangle ip6table_raw ip6table_security iptable_nat nf_nat_ipv4 nf_nat iptable_mangle iptable_raw iptable_security nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 libcrc32c ip_set nfnetlink ebtable_filter ebtables ip6table_filter ip6_tables iptable_filter ip_tables sunrpc vfat fat uvcvideo videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 videobuf2_common snd_usb_audio videodev snd_usbmidi_lib joydev media snd_rawmidi snd_hda_codec_realtek snd_hda_codec_generic edac_mce_amd ledtrig_audio pktcdvd snd_hda_codec_hdmi kvm_amd arc4 kvm irqbypass rtl8188ee snd_hda_intel snd_hda_codec rtl_pci crct10dif_pclmul rtlwifi snd_hda_core crc32_pclmul snd_hwdep ghash_clmulni_intel mac80211 Aug 9 17:16:35 localhost kernel: snd_seq hp_wmi snd_seq_device sp5100_tco sparse_keymap cfg80211 snd_pcm rfkill snd_timer wmi_bmof i2c_piix4 snd pcc_cpufreq soundcore ccp k10temp fam15h_power acpi_cpufreq pcspkr amdgpu chash amd_iommu_v2 gpu_sched crc32c_intel radeon i2c_algo_bit drm_kms_helper ttm drm r8169 wmi uas usb_storage Aug 9 17:16:35 localhost kernel: CPU: 0 PID: 1087 Comm: Xorg Tainted: G W 5.0.21-rt16.fc30.x86_64 #1 Aug 9 17:16:35 localhost kernel: Hardware name: HP 450-a121nf/2B29, BIOS A0.11 01/15/2016 Aug 9 17:16:35 localhost kernel: RIP: 0010:unpin_current_cpu+0x60/0x80 Aug 9 17:16:35 localhost kernel: Code: 56 c6 3e 00 41 39 c5 75 21 65 48 8b 04 25 c0 5c 01 00 c7 80 c0 03 00 00 ff ff ff ff 48 89 ef 5b 5d 41 5c 41 5d e9 50 9a 05 00 <0f> 0b 49 63 84 24 c0 03 00 00 48 03 1c c5 20 d8 17 8d 48 89 dd eb Aug 9 17:16:35 localhost kernel: RSP: 0018:ffffb71f026bf9e8 EFLAGS: 00010286 Aug 9 17:16:35 localhost kernel: RAX: 0000000000000000 RBX: 0000000000016720 RCX: 0000000000000000 Aug 9 17:16:35 localhost kernel: RDX: ffffffff8ce11380 RSI: ffffffff8d0ea19d RDI: ffffffff8d0c4c14 Aug 9 17:16:35 localhost kernel: RBP: ffff940036e16720 R08: ffffffff8ce11380 R09: 0000000000000000 Aug 9 17:16:35 localhost kernel: R10: 0000000000000000 R11: 0000000000000001 R12: ffff940011860000 Aug 9 17:16:35 localhost kernel: R13: 00000000ffffffff R14: 0000000000000000 R15: ffff93ff054c8e40 Aug 9 17:16:35 localhost kernel: FS: 00007f987e233a80(0000) GS:ffff940036e00000(0000) knlGS:0000000000000000 Aug 9 17:16:35 localhost kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 Aug 9 17:16:35 localhost kernel: CR2: 00007f9d912c3578 CR3: 000000021e77a000 CR4: 00000000000406f0 Aug 9 17:16:35 localhost kernel: Call Trace: Aug 9 17:16:35 localhost kernel: migrate_enable+0x1fc/0x400 Aug 9 17:16:35 localhost kernel: ? rt_mutex_futex_unlock+0xa3/0xb0 Aug 9 17:16:35 localhost kernel: rt_spin_unlock+0x23/0x40 Aug 9 17:16:35 localhost kernel: __wake_up_common_lock+0x82/0xb0 Aug 9 17:16:35 localhost kernel: radeon_fence_is_signaled+0x74/0x90 [radeon] Aug 9 17:16:35 localhost kernel: reservation_object_add_shared_fence+0x97/0x1b0 Aug 9 17:16:35 localhost kernel: radeon_vm_bo_update+0x409/0x640 [radeon] Aug 9 17:16:35 localhost kernel: radeon_gem_va_ioctl+0x41c/0x500 [radeon] Aug 9 17:16:35 localhost kernel: ? radeon_gem_get_tiling_ioctl+0x120/0x120 [radeon] Aug 9 17:16:35 localhost kernel: drm_ioctl_kernel+0xa7/0xf0 [drm] Aug 9 17:16:35 localhost kernel: drm_ioctl+0x208/0x390 [drm] Aug 9 17:16:35 localhost kernel: ? radeon_gem_get_tiling_ioctl+0x120/0x120 [radeon] Aug 9 17:16:35 localhost kernel: ? unpin_current_cpu+0x3a/0x80 Aug 9 17:16:35 localhost kernel: ? migrate_enable+0x235/0x400 Aug 9 17:16:35 localhost kernel: ? _raw_spin_unlock_irqrestore+0x1f/0x60 Aug 9 17:16:35 localhost kernel: radeon_drm_ioctl+0x49/0x80 [radeon] Aug 9 17:16:35 localhost kernel: do_vfs_ioctl+0x40c/0x670 Aug 9 17:16:35 localhost kernel: ksys_ioctl+0x5e/0x90 Aug 9 17:16:35 localhost kernel: ? switch_fpu_return+0x2d/0x160 Aug 9 17:16:35 localhost kernel: __x64_sys_ioctl+0x16/0x20 Aug 9 17:16:35 localhost kernel: do_syscall_64+0x5b/0x180 Aug 9 17:16:35 localhost kernel: entry_SYSCALL_64_after_hwframe+0x44/0xa9 Aug 9 17:16:35 localhost kernel: RIP: 0033:0x7f987e69e1fb Aug 9 17:16:35 localhost kernel: Code: 0f 1e fa 48 8b 05 8d dc 0c 00 64 c7 00 26 00 00 00 48 c7 c0 ff ff ff ff c3 66 0f 1f 44 00 00 f3 0f 1e fa b8 10 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 5d dc 0c 00 f7 d8 64 89 01 48 Aug 9 17:16:35 localhost kernel: RSP: 002b:00007ffdef71c448 EFLAGS: 00003246 ORIG_RAX: 0000000000000010 Aug 9 17:16:35 localhost kernel: RAX: ffffffffffffffda RBX: 00007ffdef71c4a0 RCX: 00007f987e69e1fb Aug 9 17:16:35 localhost kernel: RDX: 00007ffdef71c4a0 RSI: 00000000c018646b RDI: 0000000000000012 Aug 9 17:16:35 localhost kernel: RBP: 00000000c018646b R08: 000055b81a8a09e0 R09: 0000000000000000 Aug 9 17:16:35 localhost kernel: R10: 000055b81b4e14a0 R11: 0000000000003246 R12: 0000000000004000 Aug 9 17:16:35 localhost kernel: R13: 0000000000000012 R14: 00000000000f0000 R15: 000055b81b93a4f0 Aug 9 17:16:35 localhost kernel: ---[ end trace 0000000000000004 ]--- Aug 9 17:16:35 localhost kernel: BUG: unable to handle kernel paging request at 0000000000016748 Aug 9 17:16:35 localhost kernel: #PF error: [WRITE] Aug 9 17:16:35 localhost kernel: PGD 0 P4D 0 Aug 9 17:16:35 localhost kernel: Oops: 0002 [#1] PREEMPT SMP NOPTI Aug 9 17:16:35 localhost kernel: CPU: 0 PID: 1087 Comm: Xorg Tainted: G W 5.0.21-rt16.fc30.x86_64 #1 Aug 9 17:16:35 localhost kernel: Hardware name: HP 450-a121nf/2B29, BIOS A0.11 01/15/2016 Aug 9 17:16:35 localhost kernel: RIP: 0010:__read_rt_unlock+0x5/0x40 Aug 9 17:16:35 localhost kernel: Code: 18 8d 4a 01 89 d0 f0 0f b1 4f 28 39 c2 75 06 b8 01 00 00 00 c3 89 c2 eb e4 31 c0 c3 66 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 <f0> ff 4f 28 74 01 c3 55 48 89 fd e8 4b c5 86 00 48 8b 7d 18 48 83 Aug 9 17:16:35 localhost kernel: RSP: 0018:ffffb71f026bfa08 EFLAGS: 00010202 Aug 9 17:16:35 localhost kernel: RAX: ffff940011860000 RBX: ffff940011860000 RCX: 0000000000000000 Aug 9 17:16:35 localhost kernel: RDX: ffffffff8ce11380 RSI: ffffffff8d0ea19d RDI: 0000000000016720 Aug 9 17:16:35 localhost kernel: RBP: ffff940036e1fbc0 R08: ffffffff8ce11380 R09: 0000000000000000 Aug 9 17:16:35 localhost kernel: R10: 0000000000000000 R11: 0000000000000001 R12: ffff9400118603b0 Aug 9 17:16:35 localhost kernel: R13: ffff940011860850 R14: 0000000000000000 R15: ffff93ff054c8e40 Aug 9 17:16:35 localhost kernel: FS: 00007f987e233a80(0000) GS:ffff940036e00000(0000) knlGS:0000000000000000 Aug 9 17:16:35 localhost kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 Aug 9 17:16:35 localhost kernel: CR2: 0000000000016748 CR3: 000000021e77a000 CR4: 00000000000406f0 Aug 9 17:16:35 localhost kernel: Call Trace: Aug 9 17:16:35 localhost kernel: migrate_enable+0x1fc/0x400 Aug 9 17:16:35 localhost kernel: ? rt_mutex_futex_unlock+0xa3/0xb0 Aug 9 17:16:35 localhost kernel: rt_spin_unlock+0x23/0x40 Aug 9 17:16:35 localhost kernel: __wake_up_common_lock+0x82/0xb0 Aug 9 17:16:35 localhost kernel: radeon_fence_is_signaled+0x74/0x90 [radeon] Aug 9 17:16:35 localhost kernel: reservation_object_add_shared_fence+0x97/0x1b0 Aug 9 17:16:35 localhost kernel: radeon_vm_bo_update+0x409/0x640 [radeon] Aug 9 17:16:35 localhost kernel: radeon_gem_va_ioctl+0x41c/0x500 [radeon] Aug 9 17:16:35 localhost kernel: ? radeon_gem_get_tiling_ioctl+0x120/0x120 [radeon] Aug 9 17:16:35 localhost kernel: drm_ioctl_kernel+0xa7/0xf0 [drm] Aug 9 17:16:35 localhost kernel: drm_ioctl+0x208/0x390 [drm] Aug 9 17:16:35 localhost kernel: ? radeon_gem_get_tiling_ioctl+0x120/0x120 [radeon] Aug 9 17:16:35 localhost kernel: ? unpin_current_cpu+0x3a/0x80 Aug 9 17:16:35 localhost kernel: ? migrate_enable+0x235/0x400 Aug 9 17:16:35 localhost kernel: ? _raw_spin_unlock_irqrestore+0x1f/0x60 Aug 9 17:16:35 localhost kernel: radeon_drm_ioctl+0x49/0x80 [radeon] Aug 9 17:16:35 localhost kernel: do_vfs_ioctl+0x40c/0x670 Aug 9 17:16:35 localhost kernel: ksys_ioctl+0x5e/0x90 Aug 9 17:16:35 localhost kernel: ? switch_fpu_return+0x2d/0x160 Aug 9 17:16:35 localhost kernel: __x64_sys_ioctl+0x16/0x20 Aug 9 17:16:35 localhost kernel: do_syscall_64+0x5b/0x180 Aug 9 17:16:35 localhost kernel: entry_SYSCALL_64_after_hwframe+0x44/0xa9 Aug 9 17:16:35 localhost kernel: RIP: 0033:0x7f987e69e1fb Aug 9 17:16:35 localhost kernel: Code: 0f 1e fa 48 8b 05 8d dc 0c 00 64 c7 00 26 00 00 00 48 c7 c0 ff ff ff ff c3 66 0f 1f 44 00 00 f3 0f 1e fa b8 10 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 5d dc 0c 00 f7 d8 64 89 01 48 Aug 9 17:16:35 localhost kernel: RSP: 002b:00007ffdef71c448 EFLAGS: 00003246 ORIG_RAX: 0000000000000010 Aug 9 17:16:35 localhost kernel: RAX: ffffffffffffffda RBX: 00007ffdef71c4a0 RCX: 00007f987e69e1fb Aug 9 17:16:35 localhost kernel: RDX: 00007ffdef71c4a0 RSI: 00000000c018646b RDI: 0000000000000012 Aug 9 17:16:35 localhost kernel: RBP: 00000000c018646b R08: 000055b81a8a09e0 R09: 0000000000000000 Aug 9 17:16:35 localhost kernel: R10: 000055b81b4e14a0 R11: 0000000000003246 R12: 0000000000004000 Aug 9 17:16:35 localhost kernel: R13: 0000000000000012 R14: 00000000000f0000 R15: 000055b81b93a4f0 Aug 9 17:16:35 localhost kernel: Modules linked in: snd_hrtimer snd_seq_midi snd_seq_midi_event snd_seq_dummy fuse xt_CHECKSUM ipt_MASQUERADE tun bridge stp llc ccm nf_conntrack_netbios_ns nf_conntrack_broadcast xt_CT ip6t_rpfilter ip6t_REJECT nf_reject_ipv6 ipt_REJECT nf_reject_ipv4 xt_conntrack ebtable_nat ip6table_nat nf_nat_ipv6 ip6table_mangle ip6table_raw ip6table_security iptable_nat nf_nat_ipv4 nf_nat iptable_mangle iptable_raw iptable_security nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 libcrc32c ip_set nfnetlink ebtable_filter ebtables ip6table_filter ip6_tables iptable_filter ip_tables sunrpc vfat fat uvcvideo videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 videobuf2_common snd_usb_audio videodev snd_usbmidi_lib joydev media snd_rawmidi snd_hda_codec_realtek snd_hda_codec_generic edac_mce_amd ledtrig_audio pktcdvd snd_hda_codec_hdmi kvm_amd arc4 kvm irqbypass rtl8188ee snd_hda_intel snd_hda_codec rtl_pci crct10dif_pclmul rtlwifi snd_hda_core crc32_pclmul snd_hwdep ghash_clmulni_intel mac80211 Aug 9 17:16:35 localhost kernel: snd_seq hp_wmi snd_seq_device sp5100_tco sparse_keymap cfg80211 snd_pcm rfkill snd_timer wmi_bmof i2c_piix4 snd pcc_cpufreq soundcore ccp k10temp fam15h_power acpi_cpufreq pcspkr amdgpu chash amd_iommu_v2 gpu_sched crc32c_intel radeon i2c_algo_bit drm_kms_helper ttm drm r8169 wmi uas usb_storage Aug 9 17:16:35 localhost kernel: CR2: 0000000000016748 Aug 9 17:16:35 localhost kernel: ---[ end trace 0000000000000005 ]--- Aug 9 17:16:35 localhost kernel: RIP: 0010:__read_rt_unlock+0x5/0x40 Aug 9 17:16:35 localhost kernel: Code: 18 8d 4a 01 89 d0 f0 0f b1 4f 28 39 c2 75 06 b8 01 00 00 00 c3 89 c2 eb e4 31 c0 c3 66 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 <f0> ff 4f 28 74 01 c3 55 48 89 fd e8 4b c5 86 00 48 8b 7d 18 48 83 Aug 9 17:16:35 localhost kernel: RSP: 0018:ffffb71f026bfa08 EFLAGS: 00010202 Aug 9 17:16:35 localhost kernel: RAX: ffff940011860000 RBX: ffff940011860000 RCX: 0000000000000000 Aug 9 17:16:35 localhost kernel: RDX: ffffffff8ce11380 RSI: ffffffff8d0ea19d RDI: 0000000000016720 Aug 9 17:16:35 localhost kernel: RBP: ffff940036e1fbc0 R08: ffffffff8ce11380 R09: 0000000000000000 Aug 9 17:16:35 localhost kernel: R10: 0000000000000000 R11: 0000000000000001 R12: ffff9400118603b0 Aug 9 17:16:35 localhost kernel: R13: ffff940011860850 R14: 0000000000000000 R15: ffff93ff054c8e40 Aug 9 17:16:35 localhost kernel: FS: 00007f987e233a80(0000) GS:ffff940036e00000(0000) knlGS:0000000000000000 Aug 9 17:16:35 localhost kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 Aug 9 17:16:35 localhost kernel: CR2: 0000000000016748 CR3: 000000021e77a000 CR4: 00000000000406f0 Aug 9 17:16:35 localhost kernel: note: Xorg[1087] exited with preempt_count 1 Aug 9 17:16:35 localhost kernel: WARNING: CPU: 0 PID: 1087 at kernel/sched/core.c:7269 migrate_disable+0x1de/0x220 Aug 9 17:16:35 localhost kernel: Modules linked in: snd_hrtimer snd_seq_midi snd_seq_midi_event snd_seq_dummy fuse xt_CHECKSUM ipt_MASQUERADE tun bridge stp llc ccm nf_conntrack_netbios_ns nf_conntrack_broadcast xt_CT ip6t_rpfilter ip6t_REJECT nf_reject_ipv6 ipt_REJECT nf_reject_ipv4 xt_conntrack ebtable_nat ip6table_nat nf_nat_ipv6 ip6table_mangle ip6table_raw ip6table_security iptable_nat nf_nat_ipv4 nf_nat iptable_mangle iptable_raw iptable_security nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 libcrc32c ip_set nfnetlink ebtable_filter ebtables ip6table_filter ip6_tables iptable_filter ip_tables sunrpc vfat fat uvcvideo videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 videobuf2_common snd_usb_audio videodev snd_usbmidi_lib joydev media snd_rawmidi snd_hda_codec_realtek snd_hda_codec_generic edac_mce_amd ledtrig_audio pktcdvd snd_hda_codec_hdmi kvm_amd arc4 kvm irqbypass rtl8188ee snd_hda_intel snd_hda_codec rtl_pci crct10dif_pclmul rtlwifi snd_hda_core crc32_pclmul snd_hwdep ghash_clmulni_intel mac80211 Aug 9 17:16:35 localhost kernel: snd_seq hp_wmi snd_seq_device sp5100_tco sparse_keymap cfg80211 snd_pcm rfkill snd_timer wmi_bmof i2c_piix4 snd pcc_cpufreq soundcore ccp k10temp fam15h_power acpi_cpufreq pcspkr amdgpu chash amd_iommu_v2 gpu_sched crc32c_intel radeon i2c_algo_bit drm_kms_helper ttm drm r8169 wmi uas usb_storage Aug 9 17:16:35 localhost kernel: CPU: 0 PID: 1087 Comm: Xorg Tainted: G D W 5.0.21-rt16.fc30.x86_64 #1 Aug 9 17:16:35 localhost kernel: Hardware name: HP 450-a121nf/2B29, BIOS A0.11 01/15/2016 Aug 9 17:16:35 localhost kernel: RIP: 0010:migrate_disable+0x1de/0x220 Aug 9 17:16:35 localhost kernel: Code: 0f 8e 2e ff ff ff 8b 4b 44 48 c7 c2 c0 fb 01 00 48 03 14 cd 20 d8 17 8d 48 83 aa a0 08 00 00 01 e9 0f ff ff ff e8 62 b2 0b 00 <0f> 0b e9 66 fe ff ff 83 bb a0 03 00 00 01 0f 8e f6 fe ff ff 8b 4b Aug 9 17:16:35 localhost kernel: RSP: 0018:ffffb71f026bfe60 EFLAGS: 00010246 Aug 9 17:16:35 localhost kernel: RAX: 0000000000100000 RBX: ffff940011860000 RCX: ffff94003680ae08 Aug 9 17:16:35 localhost kernel: RDX: 0000000000100000 RSI: 0000000000100000 RDI: ffff94003680ae00 Aug 9 17:16:35 localhost kernel: RBP: ffff94001186a188 R08: ffff940012fbd0c0 R09: ffffffff8d25c140 Aug 9 17:16:35 localhost kernel: R10: ffffb71f026bfe28 R11: 0000000000000001 R12: 0000000000000009 Aug 9 17:16:35 localhost kernel: R13: ffff940011860000 R14: ffff940011860000 R15: 0000000000000046 Aug 9 17:16:35 localhost kernel: FS: 00007f987e233a80(0000) GS:ffff940036e00000(0000) knlGS:0000000000000000 Aug 9 17:16:35 localhost kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 Aug 9 17:16:35 localhost kernel: CR2: 0000000000016748 CR3: 000000021e77a000 CR4: 00000000000406f0 Aug 9 17:16:35 localhost kernel: Call Trace: Aug 9 17:16:35 localhost kernel: rt_spin_lock+0x1f/0x40 Aug 9 17:16:35 localhost kernel: acct_collect+0x1b3/0x1d0 Aug 9 17:16:35 localhost kernel: do_exit+0x126/0xc40 Aug 9 17:16:35 localhost kernel: ? ksys_ioctl+0x5e/0x90 Aug 9 17:16:35 localhost kernel: ? switch_fpu_return+0x2d/0x160 Aug 9 17:16:35 localhost kernel: rewind_stack_do_exit+0x17/0x20 Aug 9 17:16:35 localhost kernel: ---[ end trace 0000000000000006 ]--- I while ago, I sent a similar message. I don't know if this bug is related to the kernel of if this is a mesa problem. I've got a radeon graphic card. The reference of the graphic card from lspci: VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Mullins [Radeon R4/R5 Graphics] Best regards, YC ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Kernel 5.0.21rt16 hangs 2019-08-09 15:45 Kernel 5.0.21rt16 hangs Yann COLLETTE @ 2019-08-14 14:42 ` Sebastian Andrzej Siewior 2019-08-18 9:10 ` Yann COLLETTE 0 siblings, 1 reply; 3+ messages in thread From: Sebastian Andrzej Siewior @ 2019-08-14 14:42 UTC (permalink / raw) To: Yann COLLETTE; +Cc: linux-rt-users On 2019-08-09 17:45:13 [+0200], Yann COLLETTE wrote: > Hello, Hi, > I am using kernel-rt 5.0.21rt16 on fedora 30. … > Aug 9 17:16:35 localhost kernel: Preemption disabled at: > Aug 9 17:16:35 localhost kernel: [<ffffffff8c67239e>] > reservation_object_add_shared_fence+0x3e/0x1b0 > Aug 9 17:16:35 localhost kernel: CPU: 3 PID: 1087 Comm: Xorg Not tainted > 5.0.21-rt16.fc30.x86_64 #1 > Aug 9 17:16:35 localhost kernel: Hardware name: HP 450-a121nf/2B29, BIOS > A0.11 01/15/2016 > Aug 9 17:16:35 localhost kernel: Call Trace: > Aug 9 17:16:35 localhost kernel: dump_stack+0x5c/0x80 > Aug 9 17:16:35 localhost kernel: ? > reservation_object_add_shared_fence+0x3e/0x1b0 > Aug 9 17:16:35 localhost kernel: __schedule_bug.cold+0x44/0x51 > Aug 9 17:16:35 localhost kernel: __schedule+0x5c6/0x6f0 > Aug 9 17:16:35 localhost kernel: schedule+0x43/0xd0 > Aug 9 17:16:35 localhost kernel: rt_spin_lock_slowlock_locked+0x114/0x2b0 > Aug 9 17:16:35 localhost kernel: rt_spin_lock_slowlock+0x51/0x80 > Aug 9 17:16:35 localhost kernel: __wake_up_common_lock+0x61/0xb0 > Aug 9 17:16:35 localhost kernel: radeon_fence_is_signaled+0x74/0x90 > [radeon] > Aug 9 17:16:35 localhost kernel: > reservation_object_add_shared_fence+0x97/0x1b0 > Aug 9 17:16:35 localhost kernel: radeon_vm_bo_update+0x409/0x640 [radeon] > Aug 9 17:16:35 localhost kernel: radeon_gem_va_ioctl+0x41c/0x500 [radeon] … > I don't know if this bug is related to the kernel of if this is a mesa > problem. That backtrace is kernel related. I'm not sure if this is related to the hang up you observe. Could you please try the following patch: diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c index bf4d4c80fbc67..c6370dcdd77d2 100644 --- a/drivers/dma-buf/dma-buf.c +++ b/drivers/dma-buf/dma-buf.c @@ -168,7 +168,7 @@ static __poll_t dma_buf_poll(struct file *file, poll_table *poll) return 0; retry: - seq = read_seqcount_begin(&resv->seq); + seq = read_seqbegin(&resv->seq); rcu_read_lock(); fobj = rcu_dereference(resv->fence); @@ -177,7 +177,7 @@ static __poll_t dma_buf_poll(struct file *file, poll_table *poll) else shared_count = 0; fence_excl = rcu_dereference(resv->fence_excl); - if (read_seqcount_retry(&resv->seq, seq)) { + if (read_seqretry(&resv->seq, seq)) { rcu_read_unlock(); goto retry; } @@ -1034,12 +1034,12 @@ static int dma_buf_debug_show(struct seq_file *s, void *unused) robj = buf_obj->resv; while (true) { - seq = read_seqcount_begin(&robj->seq); + seq = read_seqbegin(&robj->seq); rcu_read_lock(); fobj = rcu_dereference(robj->fence); shared_count = fobj ? fobj->shared_count : 0; fence = rcu_dereference(robj->fence_excl); - if (!read_seqcount_retry(&robj->seq, seq)) + if (!read_seqretry(&robj->seq, seq)) break; rcu_read_unlock(); } diff --git a/drivers/dma-buf/reservation.c b/drivers/dma-buf/reservation.c index 4d32e2c678626..37d8f6b18ef90 100644 --- a/drivers/dma-buf/reservation.c +++ b/drivers/dma-buf/reservation.c @@ -110,15 +110,13 @@ int reservation_object_reserve_shared(struct reservation_object *obj, new->shared_count = j; new->shared_max = max; - preempt_disable(); - write_seqcount_begin(&obj->seq); + write_seqlock(&obj->seq); /* * RCU_INIT_POINTER can be used here, * seqcount provides the necessary barriers */ RCU_INIT_POINTER(obj->fence, new); - write_seqcount_end(&obj->seq); - preempt_enable(); + write_sequnlock(&obj->seq); if (!old) return 0; @@ -158,8 +156,7 @@ void reservation_object_add_shared_fence(struct reservation_object *obj, fobj = reservation_object_get_list(obj); count = fobj->shared_count; - preempt_disable(); - write_seqcount_begin(&obj->seq); + write_seqlock(&obj->seq); for (i = 0; i < count; ++i) { struct dma_fence *old_fence; @@ -181,8 +178,7 @@ void reservation_object_add_shared_fence(struct reservation_object *obj, /* pointer update must be visible before we extend the shared_count */ smp_store_mb(fobj->shared_count, count); - write_seqcount_end(&obj->seq); - preempt_enable(); + write_sequnlock(&obj->seq); } EXPORT_SYMBOL(reservation_object_add_shared_fence); @@ -209,14 +205,11 @@ void reservation_object_add_excl_fence(struct reservation_object *obj, if (fence) dma_fence_get(fence); - preempt_disable(); - write_seqcount_begin(&obj->seq); - /* write_seqcount_begin provides the necessary memory barrier */ + write_seqlock(&obj->seq); RCU_INIT_POINTER(obj->fence_excl, fence); if (old) old->shared_count = 0; - write_seqcount_end(&obj->seq); - preempt_enable(); + write_sequnlock(&obj->seq); /* inplace update, no shared fences */ while (i--) @@ -298,13 +291,10 @@ int reservation_object_copy_fences(struct reservation_object *dst, src_list = reservation_object_get_list(dst); old = reservation_object_get_excl(dst); - preempt_disable(); - write_seqcount_begin(&dst->seq); - /* write_seqcount_begin provides the necessary memory barrier */ + write_seqlock(&dst->seq); RCU_INIT_POINTER(dst->fence_excl, new); RCU_INIT_POINTER(dst->fence, dst_list); - write_seqcount_end(&dst->seq); - preempt_enable(); + write_sequnlock(&dst->seq); if (src_list) kfree_rcu(src_list, rcu); @@ -345,7 +335,7 @@ int reservation_object_get_fences_rcu(struct reservation_object *obj, shared_count = i = 0; rcu_read_lock(); - seq = read_seqcount_begin(&obj->seq); + seq = read_seqbegin(&obj->seq); fence_excl = rcu_dereference(obj->fence_excl); if (fence_excl && !dma_fence_get_rcu(fence_excl)) @@ -390,7 +380,7 @@ int reservation_object_get_fences_rcu(struct reservation_object *obj, } } - if (i != shared_count || read_seqcount_retry(&obj->seq, seq)) { + if (i != shared_count || read_seqretry(&obj->seq, seq)) { while (i--) dma_fence_put(shared[i]); dma_fence_put(fence_excl); @@ -439,7 +429,7 @@ long reservation_object_wait_timeout_rcu(struct reservation_object *obj, retry: shared_count = 0; - seq = read_seqcount_begin(&obj->seq); + seq = read_seqbegin(&obj->seq); rcu_read_lock(); i = -1; @@ -486,7 +476,7 @@ long reservation_object_wait_timeout_rcu(struct reservation_object *obj, rcu_read_unlock(); if (fence) { - if (read_seqcount_retry(&obj->seq, seq)) { + if (read_seqretry(&obj->seq, seq)) { dma_fence_put(fence); goto retry; } @@ -542,7 +532,7 @@ bool reservation_object_test_signaled_rcu(struct reservation_object *obj, retry: ret = true; shared_count = 0; - seq = read_seqcount_begin(&obj->seq); + seq = read_seqbegin(&obj->seq); if (test_all) { unsigned i; @@ -563,7 +553,7 @@ bool reservation_object_test_signaled_rcu(struct reservation_object *obj, break; } - if (read_seqcount_retry(&obj->seq, seq)) + if (read_seqretry(&obj->seq, seq)) goto retry; } @@ -576,7 +566,7 @@ bool reservation_object_test_signaled_rcu(struct reservation_object *obj, if (ret < 0) goto retry; - if (read_seqcount_retry(&obj->seq, seq)) + if (read_seqretry(&obj->seq, seq)) goto retry; } } diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c index a6e5184d436c9..b5fbd16034122 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c @@ -250,11 +250,9 @@ static int amdgpu_amdkfd_remove_eviction_fence(struct amdgpu_bo *bo, new->shared_count = k; /* Install the new fence list, seqcount provides the barriers */ - preempt_disable(); - write_seqcount_begin(&resv->seq); + write_seqlock(&resv->seq); RCU_INIT_POINTER(resv->fence, new); - write_seqcount_end(&resv->seq); - preempt_enable(); + write_sequnlock(&resv->seq); /* Drop the references to the removed fences or move them to ef_list */ for (i = j, k = 0; i < old->shared_count; ++i) { diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index ad01c92aaf748..2910a133077a3 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -449,7 +449,7 @@ i915_gem_object_wait_reservation(struct reservation_object *resv, unsigned int flags, long timeout) { - unsigned int seq = __read_seqcount_begin(&resv->seq); + unsigned int seq = read_seqbegin(&resv->seq); struct dma_fence *excl; bool prune_fences = false; @@ -500,9 +500,9 @@ i915_gem_object_wait_reservation(struct reservation_object *resv, * signaled and that the reservation object has not been changed (i.e. * no new fences have been added). */ - if (prune_fences && !__read_seqcount_retry(&resv->seq, seq)) { + if (prune_fences && !read_seqretry(&resv->seq, seq)) { if (reservation_object_trylock(resv)) { - if (!__read_seqcount_retry(&resv->seq, seq)) + if (!read_seqretry(&resv->seq, seq)) reservation_object_add_excl_fence(resv, NULL); reservation_object_unlock(resv); } @@ -3943,7 +3943,7 @@ i915_gem_busy_ioctl(struct drm_device *dev, void *data, * */ retry: - seq = raw_read_seqcount(&obj->resv->seq); + seq = read_seqbegin(&obj->resv->seq); /* Translate the exclusive fence to the READ *and* WRITE engine */ args->busy = busy_check_writer(rcu_dereference(obj->resv->fence_excl)); @@ -3961,7 +3961,7 @@ i915_gem_busy_ioctl(struct drm_device *dev, void *data, } } - if (args->busy && read_seqcount_retry(&obj->resv->seq, seq)) + if (args->busy && read_seqretry(&obj->resv->seq, seq)) goto retry; err = 0; diff --git a/include/linux/reservation.h b/include/linux/reservation.h index ee750765cc941..11cc05f489365 100644 --- a/include/linux/reservation.h +++ b/include/linux/reservation.h @@ -71,7 +71,7 @@ struct reservation_object_list { */ struct reservation_object { struct ww_mutex lock; - seqcount_t seq; + seqlock_t seq; struct dma_fence __rcu *fence_excl; struct reservation_object_list __rcu *fence; @@ -90,7 +90,7 @@ reservation_object_init(struct reservation_object *obj) { ww_mutex_init(&obj->lock, &reservation_ww_class); - __seqcount_init(&obj->seq, reservation_seqcount_string, &reservation_seqcount_class); + seqlock_init(&obj->seq); RCU_INIT_POINTER(obj->fence, NULL); RCU_INIT_POINTER(obj->fence_excl, NULL); } -- 2.23.0.rc1 > Best regards, > > > YC Sebastian ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: Kernel 5.0.21rt16 hangs 2019-08-14 14:42 ` Sebastian Andrzej Siewior @ 2019-08-18 9:10 ` Yann COLLETTE 0 siblings, 0 replies; 3+ messages in thread From: Yann COLLETTE @ 2019-08-18 9:10 UTC (permalink / raw) To: Sebastian Andrzej Siewior; +Cc: linux-rt-users Hello, Thanks a lot. I tested this patch on kernelt-5.0.21-rt16 and it fixed my problem. No more freeze. Best regards, YC Le 14/08/2019 à 16:42, Sebastian Andrzej Siewior a écrit : > On 2019-08-09 17:45:13 [+0200], Yann COLLETTE wrote: >> Hello, > Hi, > >> I am using kernel-rt 5.0.21rt16 on fedora 30. > … >> Aug 9 17:16:35 localhost kernel: Preemption disabled at: >> Aug 9 17:16:35 localhost kernel: [<ffffffff8c67239e>] >> reservation_object_add_shared_fence+0x3e/0x1b0 >> Aug 9 17:16:35 localhost kernel: CPU: 3 PID: 1087 Comm: Xorg Not tainted >> 5.0.21-rt16.fc30.x86_64 #1 >> Aug 9 17:16:35 localhost kernel: Hardware name: HP 450-a121nf/2B29, BIOS >> A0.11 01/15/2016 >> Aug 9 17:16:35 localhost kernel: Call Trace: >> Aug 9 17:16:35 localhost kernel: dump_stack+0x5c/0x80 >> Aug 9 17:16:35 localhost kernel: ? >> reservation_object_add_shared_fence+0x3e/0x1b0 >> Aug 9 17:16:35 localhost kernel: __schedule_bug.cold+0x44/0x51 >> Aug 9 17:16:35 localhost kernel: __schedule+0x5c6/0x6f0 >> Aug 9 17:16:35 localhost kernel: schedule+0x43/0xd0 >> Aug 9 17:16:35 localhost kernel: rt_spin_lock_slowlock_locked+0x114/0x2b0 >> Aug 9 17:16:35 localhost kernel: rt_spin_lock_slowlock+0x51/0x80 >> Aug 9 17:16:35 localhost kernel: __wake_up_common_lock+0x61/0xb0 >> Aug 9 17:16:35 localhost kernel: radeon_fence_is_signaled+0x74/0x90 >> [radeon] >> Aug 9 17:16:35 localhost kernel: >> reservation_object_add_shared_fence+0x97/0x1b0 >> Aug 9 17:16:35 localhost kernel: radeon_vm_bo_update+0x409/0x640 [radeon] >> Aug 9 17:16:35 localhost kernel: radeon_gem_va_ioctl+0x41c/0x500 [radeon] > … >> I don't know if this bug is related to the kernel of if this is a mesa >> problem. > That backtrace is kernel related. I'm not sure if this is related to the > hang up you observe. > Could you please try the following patch: > > > diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c > index bf4d4c80fbc67..c6370dcdd77d2 100644 > --- a/drivers/dma-buf/dma-buf.c > +++ b/drivers/dma-buf/dma-buf.c > @@ -168,7 +168,7 @@ static __poll_t dma_buf_poll(struct file *file, poll_table *poll) > return 0; > > retry: > - seq = read_seqcount_begin(&resv->seq); > + seq = read_seqbegin(&resv->seq); > rcu_read_lock(); > > fobj = rcu_dereference(resv->fence); > @@ -177,7 +177,7 @@ static __poll_t dma_buf_poll(struct file *file, poll_table *poll) > else > shared_count = 0; > fence_excl = rcu_dereference(resv->fence_excl); > - if (read_seqcount_retry(&resv->seq, seq)) { > + if (read_seqretry(&resv->seq, seq)) { > rcu_read_unlock(); > goto retry; > } > @@ -1034,12 +1034,12 @@ static int dma_buf_debug_show(struct seq_file *s, void *unused) > > robj = buf_obj->resv; > while (true) { > - seq = read_seqcount_begin(&robj->seq); > + seq = read_seqbegin(&robj->seq); > rcu_read_lock(); > fobj = rcu_dereference(robj->fence); > shared_count = fobj ? fobj->shared_count : 0; > fence = rcu_dereference(robj->fence_excl); > - if (!read_seqcount_retry(&robj->seq, seq)) > + if (!read_seqretry(&robj->seq, seq)) > break; > rcu_read_unlock(); > } > diff --git a/drivers/dma-buf/reservation.c b/drivers/dma-buf/reservation.c > index 4d32e2c678626..37d8f6b18ef90 100644 > --- a/drivers/dma-buf/reservation.c > +++ b/drivers/dma-buf/reservation.c > @@ -110,15 +110,13 @@ int reservation_object_reserve_shared(struct reservation_object *obj, > new->shared_count = j; > new->shared_max = max; > > - preempt_disable(); > - write_seqcount_begin(&obj->seq); > + write_seqlock(&obj->seq); > /* > * RCU_INIT_POINTER can be used here, > * seqcount provides the necessary barriers > */ > RCU_INIT_POINTER(obj->fence, new); > - write_seqcount_end(&obj->seq); > - preempt_enable(); > + write_sequnlock(&obj->seq); > > if (!old) > return 0; > @@ -158,8 +156,7 @@ void reservation_object_add_shared_fence(struct reservation_object *obj, > fobj = reservation_object_get_list(obj); > count = fobj->shared_count; > > - preempt_disable(); > - write_seqcount_begin(&obj->seq); > + write_seqlock(&obj->seq); > > for (i = 0; i < count; ++i) { > struct dma_fence *old_fence; > @@ -181,8 +178,7 @@ void reservation_object_add_shared_fence(struct reservation_object *obj, > /* pointer update must be visible before we extend the shared_count */ > smp_store_mb(fobj->shared_count, count); > > - write_seqcount_end(&obj->seq); > - preempt_enable(); > + write_sequnlock(&obj->seq); > } > EXPORT_SYMBOL(reservation_object_add_shared_fence); > > @@ -209,14 +205,11 @@ void reservation_object_add_excl_fence(struct reservation_object *obj, > if (fence) > dma_fence_get(fence); > > - preempt_disable(); > - write_seqcount_begin(&obj->seq); > - /* write_seqcount_begin provides the necessary memory barrier */ > + write_seqlock(&obj->seq); > RCU_INIT_POINTER(obj->fence_excl, fence); > if (old) > old->shared_count = 0; > - write_seqcount_end(&obj->seq); > - preempt_enable(); > + write_sequnlock(&obj->seq); > > /* inplace update, no shared fences */ > while (i--) > @@ -298,13 +291,10 @@ int reservation_object_copy_fences(struct reservation_object *dst, > src_list = reservation_object_get_list(dst); > old = reservation_object_get_excl(dst); > > - preempt_disable(); > - write_seqcount_begin(&dst->seq); > - /* write_seqcount_begin provides the necessary memory barrier */ > + write_seqlock(&dst->seq); > RCU_INIT_POINTER(dst->fence_excl, new); > RCU_INIT_POINTER(dst->fence, dst_list); > - write_seqcount_end(&dst->seq); > - preempt_enable(); > + write_sequnlock(&dst->seq); > > if (src_list) > kfree_rcu(src_list, rcu); > @@ -345,7 +335,7 @@ int reservation_object_get_fences_rcu(struct reservation_object *obj, > shared_count = i = 0; > > rcu_read_lock(); > - seq = read_seqcount_begin(&obj->seq); > + seq = read_seqbegin(&obj->seq); > > fence_excl = rcu_dereference(obj->fence_excl); > if (fence_excl && !dma_fence_get_rcu(fence_excl)) > @@ -390,7 +380,7 @@ int reservation_object_get_fences_rcu(struct reservation_object *obj, > } > } > > - if (i != shared_count || read_seqcount_retry(&obj->seq, seq)) { > + if (i != shared_count || read_seqretry(&obj->seq, seq)) { > while (i--) > dma_fence_put(shared[i]); > dma_fence_put(fence_excl); > @@ -439,7 +429,7 @@ long reservation_object_wait_timeout_rcu(struct reservation_object *obj, > > retry: > shared_count = 0; > - seq = read_seqcount_begin(&obj->seq); > + seq = read_seqbegin(&obj->seq); > rcu_read_lock(); > i = -1; > > @@ -486,7 +476,7 @@ long reservation_object_wait_timeout_rcu(struct reservation_object *obj, > > rcu_read_unlock(); > if (fence) { > - if (read_seqcount_retry(&obj->seq, seq)) { > + if (read_seqretry(&obj->seq, seq)) { > dma_fence_put(fence); > goto retry; > } > @@ -542,7 +532,7 @@ bool reservation_object_test_signaled_rcu(struct reservation_object *obj, > retry: > ret = true; > shared_count = 0; > - seq = read_seqcount_begin(&obj->seq); > + seq = read_seqbegin(&obj->seq); > > if (test_all) { > unsigned i; > @@ -563,7 +553,7 @@ bool reservation_object_test_signaled_rcu(struct reservation_object *obj, > break; > } > > - if (read_seqcount_retry(&obj->seq, seq)) > + if (read_seqretry(&obj->seq, seq)) > goto retry; > } > > @@ -576,7 +566,7 @@ bool reservation_object_test_signaled_rcu(struct reservation_object *obj, > if (ret < 0) > goto retry; > > - if (read_seqcount_retry(&obj->seq, seq)) > + if (read_seqretry(&obj->seq, seq)) > goto retry; > } > } > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c > index a6e5184d436c9..b5fbd16034122 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c > @@ -250,11 +250,9 @@ static int amdgpu_amdkfd_remove_eviction_fence(struct amdgpu_bo *bo, > new->shared_count = k; > > /* Install the new fence list, seqcount provides the barriers */ > - preempt_disable(); > - write_seqcount_begin(&resv->seq); > + write_seqlock(&resv->seq); > RCU_INIT_POINTER(resv->fence, new); > - write_seqcount_end(&resv->seq); > - preempt_enable(); > + write_sequnlock(&resv->seq); > > /* Drop the references to the removed fences or move them to ef_list */ > for (i = j, k = 0; i < old->shared_count; ++i) { > diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c > index ad01c92aaf748..2910a133077a3 100644 > --- a/drivers/gpu/drm/i915/i915_gem.c > +++ b/drivers/gpu/drm/i915/i915_gem.c > @@ -449,7 +449,7 @@ i915_gem_object_wait_reservation(struct reservation_object *resv, > unsigned int flags, > long timeout) > { > - unsigned int seq = __read_seqcount_begin(&resv->seq); > + unsigned int seq = read_seqbegin(&resv->seq); > struct dma_fence *excl; > bool prune_fences = false; > > @@ -500,9 +500,9 @@ i915_gem_object_wait_reservation(struct reservation_object *resv, > * signaled and that the reservation object has not been changed (i.e. > * no new fences have been added). > */ > - if (prune_fences && !__read_seqcount_retry(&resv->seq, seq)) { > + if (prune_fences && !read_seqretry(&resv->seq, seq)) { > if (reservation_object_trylock(resv)) { > - if (!__read_seqcount_retry(&resv->seq, seq)) > + if (!read_seqretry(&resv->seq, seq)) > reservation_object_add_excl_fence(resv, NULL); > reservation_object_unlock(resv); > } > @@ -3943,7 +3943,7 @@ i915_gem_busy_ioctl(struct drm_device *dev, void *data, > * > */ > retry: > - seq = raw_read_seqcount(&obj->resv->seq); > + seq = read_seqbegin(&obj->resv->seq); > > /* Translate the exclusive fence to the READ *and* WRITE engine */ > args->busy = busy_check_writer(rcu_dereference(obj->resv->fence_excl)); > @@ -3961,7 +3961,7 @@ i915_gem_busy_ioctl(struct drm_device *dev, void *data, > } > } > > - if (args->busy && read_seqcount_retry(&obj->resv->seq, seq)) > + if (args->busy && read_seqretry(&obj->resv->seq, seq)) > goto retry; > > err = 0; > diff --git a/include/linux/reservation.h b/include/linux/reservation.h > index ee750765cc941..11cc05f489365 100644 > --- a/include/linux/reservation.h > +++ b/include/linux/reservation.h > @@ -71,7 +71,7 @@ struct reservation_object_list { > */ > struct reservation_object { > struct ww_mutex lock; > - seqcount_t seq; > + seqlock_t seq; > > struct dma_fence __rcu *fence_excl; > struct reservation_object_list __rcu *fence; > @@ -90,7 +90,7 @@ reservation_object_init(struct reservation_object *obj) > { > ww_mutex_init(&obj->lock, &reservation_ww_class); > > - __seqcount_init(&obj->seq, reservation_seqcount_string, &reservation_seqcount_class); > + seqlock_init(&obj->seq); > RCU_INIT_POINTER(obj->fence, NULL); > RCU_INIT_POINTER(obj->fence_excl, NULL); > } ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-08-18 9:10 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2019-08-09 15:45 Kernel 5.0.21rt16 hangs Yann COLLETTE 2019-08-14 14:42 ` Sebastian Andrzej Siewior 2019-08-18 9:10 ` Yann COLLETTE
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.