BUG: kernel NULL pointer dereference in AMD driver
Kernel BUG appears in every dmesg output during startup.
PC freezes after using X, the sooner the heavier the load. I can freeze the PC by starting a web browser or running a phoronix benchmark. During the freeze I can often see what reminds a corrupted video memory on the display - uniform colored, somtimes blinking artifacts. I can safely reboot using SysRq so it's not completely unresponsive, only to the mouse input it seems. Relation between this kernel log and freeze is hypothetical and not proven. I also captured the following output shortly before crash (see last comment in bug #1965 (closed))
I'm experiencing this bug since 5.19.0-rc1 in every rc release so far - including the freeze. All 5.18.x versions run fine long-term (currently in use as a backup).
OS: Gentoo Base System release 2.8 x86_64 Host: MS-7B93 1.0 Kernel: 5.19.0-rc5-llvm Resolution: 3840x2160 (1x DP connected panel) DE: GNOME 42.3.1 WM: Mutter CPU: AMD Ryzen 7 3800X (16) @ 3.900GHz GPU: AMD ATI Radeon RX 5600 OEM/5600 XT / 5700/5700 XT Memory: 6971MiB / 64244MiB
lspci VGA: 2f:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 10 [Radeon RX 5600 OEM/5600 XT / 5700/5700 XT] [1002:731f] (rev ca)
uname -a: Linux gentoo 5.19.0-rc5-tkg-llvm #1 (closed) TKG SMP PREEMPT Sun Jul 3 14:29:45 CEST 2022 x86_64 AMD Ryzen 7 3800X 8-Core Processor AuthenticAMD GNU/Linux
Custom kernel build, .config on request.
dmesg output shortly after start.
Jul 06 11:55:01 gentoo kernel: BUG: kernel NULL pointer dereference, address: 0000000000000008
Jul 06 11:55:01 gentoo kernel: #PF: supervisor read access in kernel mode
Jul 06 11:55:01 gentoo kernel: #PF: error_code(0x0000) - not-present page
Jul 06 11:55:01 gentoo kernel: PGD 0 P4D 0
Jul 06 11:55:01 gentoo kernel: Oops: 0000 [#1] PREEMPT SMP NOPTI
Jul 06 11:55:01 gentoo kernel: CPU: 6 PID: 135 Comm: kworker/6:1 Tainted: G W 5.19.0-rc5-tkg-tt-llvm #1
Jul 06 11:55:01 gentoo kernel: Hardware name: Micro-Star International Co., Ltd. MS-7B93/MPG X570 GAMING PRO CARBON WIFI (MS-7B93), BIOS 1.G0 05/27/2022
Jul 06 11:55:01 gentoo kernel: Workqueue: events delayed_fput
Jul 06 11:55:01 gentoo kernel: RIP: 0010:dma_resv_add_fence+0x3b/0x1e0
Jul 06 11:55:01 gentoo kernel: Code: 49 89 f4 49 89 fe 48 85 f6 74 1f b8 01 00 00 00 f0 41 0f c1 44 24 38 85 c0 0f 84 14 01 00 00 8d 48 01 09 c1 0f 88 39 01 00 00 <49> 8b 44 24 08 48 c7 c1 f0 51 3e 82 48 39 c8 0f 84 ed 00 00 00 48
Jul 06 11:55:01 gentoo kernel: RSP: 0018:ffff888104dafc38 EFLAGS: 00010246
Jul 06 11:55:01 gentoo kernel: RAX: 0000000000000000 RBX: ffff88811ac850f8 RCX: 0000000000000000
Jul 06 11:55:01 gentoo kernel: RDX: 0000000000000001 RSI: 0000000000000000 RDI: ffff8881688c0158
Jul 06 11:55:01 gentoo kernel: RBP: ffff88811ac85918 R08: 0000000080200013 R09: 0000000080200012
Jul 06 11:55:01 gentoo kernel: R10: ffffea0004e7cdc0 R11: 0000000000000000 R12: 0000000000000000
Jul 06 11:55:01 gentoo kernel: R13: ffff8881688c0000 R14: ffff8881688c0158 R15: 0000000000000001
Jul 06 11:55:01 gentoo kernel: FS: 0000000000000000(0000) GS:ffff888feed80000(0000) knlGS:0000000000000000
Jul 06 11:55:01 gentoo kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Jul 06 11:55:01 gentoo kernel: CR2: 0000000000000008 CR3: 000000000500a000 CR4: 0000000000350ee0
Jul 06 11:55:01 gentoo kernel: Call Trace:
Jul 06 11:55:01 gentoo kernel: <TASK>
Jul 06 11:55:01 gentoo kernel: amdgpu_amdkfd_gpuvm_destroy_cb+0x8b/0x200 [amdgpu]
Jul 06 11:55:01 gentoo kernel: amdgpu_vm_fini+0x2d/0x740 [amdgpu]
Jul 06 11:55:01 gentoo kernel: ? idr_get_next+0x83/0x130
Jul 06 11:55:01 gentoo kernel: amdgpu_driver_postclose_kms+0x29d/0x440 [amdgpu]
Jul 06 11:55:01 gentoo kernel: drm_file_free+0x1f6/0x2a0
Jul 06 11:55:01 gentoo kernel: drm_release+0xf9/0x200
Jul 06 11:55:01 gentoo kernel: __fput+0xde/0x2f0
Jul 06 11:55:01 gentoo kernel: delayed_fput+0x28/0x40
Jul 06 11:55:01 gentoo kernel: process_one_work+0x1d9/0x300
Jul 06 11:55:01 gentoo kernel: worker_thread+0x33d/0x6f0
Jul 06 11:55:01 gentoo kernel: kthread+0x1f8/0x240
Jul 06 11:55:01 gentoo kernel: ? rcu_free_pool+0x30/0x30
Jul 06 11:55:01 gentoo kernel: ? kthreadd+0x2f0/0x2f0
Jul 06 11:55:01 gentoo kernel: ret_from_fork+0x1f/0x30
Jul 06 11:55:01 gentoo kernel: </TASK>
Jul 06 11:55:01 gentoo kernel: Modules linked in: snd_seq_dummy snd_seq mousedev hid_jabra joydev vfat fat amdgpu iommu_v2 drm_buddy drm_display_helper edac_mce_amd gpu_sched drm_ttm_helper edac_core ttm drm_kms_helper sysimgblt snd_hda_codec_generic syscopyarea kvm_amd sysfillrect ccp fb_sys_fops rng_core backlight snd_hda_intel igb cfbimgblt snd_intel_dspcfg cfbcopyarea dca snd_hda_codec cfbfillrect snd_usb_audio kvm fb snd_hda_core snd_usbmidi_lib snd_hwdep irqbypass snd_rawmidi snd_seq_device font rapl snd_pcm fbdev btusb i2c_piix4 btrtl snd_timer wmi_bmof btmtk k10temp btbcm btintel snd bluetooth soundcore button rfkill mc acpi_cpufreq usbhid squashfs loop sch_fq_codel fuse configfs crct10dif_pclmul crc32_pclmul crc32c_intel ghash_clmulni_intel aesni_intel nvme xhci_pci xhci_pci_renesas nvme_core winesync nct6775 hwmon_vid wmi nct6775_core hwmon ipv6
Jul 06 11:55:01 gentoo kernel: CR2: 0000000000000008
Jul 06 11:55:01 gentoo kernel: ---[ end trace 0000000000000000 ]---
Jul 06 11:55:01 gentoo kernel: RIP: 0010:dma_resv_add_fence+0x3b/0x1e0
Jul 06 11:55:01 gentoo kernel: Code: 49 89 f4 49 89 fe 48 85 f6 74 1f b8 01 00 00 00 f0 41 0f c1 44 24 38 85 c0 0f 84 14 01 00 00 8d 48 01 09 c1 0f 88 39 01 00 00 <49> 8b 44 24 08 48 c7 c1 f0 51 3e 82 48 39 c8 0f 84 ed 00 00 00 48
Jul 06 11:55:01 gentoo kernel: RSP: 0018:ffff888104dafc38 EFLAGS: 00010246
Jul 06 11:55:01 gentoo kernel: RAX: 0000000000000000 RBX: ffff88811ac850f8 RCX: 0000000000000000
Jul 06 11:55:01 gentoo kernel: RDX: 0000000000000001 RSI: 0000000000000000 RDI: ffff8881688c0158
Jul 06 11:55:01 gentoo kernel: RBP: ffff88811ac85918 R08: 0000000080200013 R09: 0000000080200012
Jul 06 11:55:01 gentoo kernel: R10: ffffea0004e7cdc0 R11: 0000000000000000 R12: 0000000000000000
Jul 06 11:55:01 gentoo kernel: R13: ffff8881688c0000 R14: ffff8881688c0158 R15: 0000000000000001
Jul 06 11:55:01 gentoo kernel: FS: 0000000000000000(0000) GS:ffff888feed80000(0000) knlGS:0000000000000000
Jul 06 11:55:01 gentoo kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Jul 06 11:55:01 gentoo kernel: CR2: 0000000000000008 CR3: 000000000500a000 CR4: 0000000000350ee0