kernel NULL pointer dereference after monitor wake

Bug #1995150 reported by Justin Donnelly
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

I ran into a bug shortly after upgrading from 22.04 to 22.10. I have 2 monitors connected to a Radeon R9 FURY / NANO Series via DP cables. When returning to the PC after a screen lock (when both monitors had entered a power saving mode), the second monitor did not wake up. I see the following warning and `kernel NULL pointer dereference` in the systemd journal:

Oct 28 12:24:11 desktop kernel: ------------[ cut here ]------------
Oct 28 12:24:11 desktop kernel: WARNING: CPU: 12 PID: 91 at drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dce110/dce110_clk_mgr.c:140 dce110_fill_display_configs+0x83/0x2e0 [amdgpu]
Oct 28 12:24:11 desktop kernel: Modules linked in: xt_multiport tls nf_conntrack_netlink xfrm_user xfrm_algo xt_addrtype br_netfilter nvme_fabrics rfcomm snd_seq_dummy snd_hrtimer xt_CHECKSUM xt_MASQUERADE xt_conntrack ipt_REJECT nf_reject_ipv4 xt_tcpudp nft_compat nft_chain_nat n>
Oct 28 12:24:11 desktop kernel: gigabyte_wmi rapl drm_kms_helper fb_sys_fops snd_timer syscopyarea iwlwifi(O) ccp sysfillrect snd sysimgblt k10temp soundcore cfg80211(O) iwlwifi_compat(O) mac_hid msr parport_pc ppdev lp parport drm ramoops pstore_blk reed_solomon pstore_zone efi_>
Oct 28 12:24:11 desktop kernel: CPU: 12 PID: 91 Comm: kworker/12:0H Tainted: G O 5.19.0-23.24-justin-stock-generic #stock
Oct 28 12:24:11 desktop kernel: Hardware name: Gigabyte Technology Co., Ltd. X570 AORUS PRO WIFI/X570 AORUS PRO WIFI, BIOS F21 07/31/2020
Oct 28 12:24:11 desktop kernel: Workqueue: events_highpri dm_irq_work_func [amdgpu]
Oct 28 12:24:11 desktop kernel: RIP: 0010:dce110_fill_display_configs+0x83/0x2e0 [amdgpu]
Oct 28 12:24:11 desktop kernel: Code: 89 dd 31 db 4c 63 f3 49 83 fe 05 0f 87 80 01 00 00 4d 39 65 00 0f 84 29 01 00 00 83 c3 01 49 81 c5 10 08 00 00 83 fb 06 75 da <0f> 0b 31 db 45 0f b6 ac 24 c8 03 00 00 41 80 fd 01 0f 87 fd 55 19
Oct 28 12:24:11 desktop kernel: RSP: 0018:ffffb291404dfa90 EFLAGS: 00010246
Oct 28 12:24:11 desktop kernel: RAX: 0000000000000110 RBX: 0000000000000006 RCX: 0000000000000000
Oct 28 12:24:11 desktop kernel: RDX: 0000000000000000 RSI: ffff908acdcd2980 RDI: ffff908acdcc0000
Oct 28 12:24:11 desktop kernel: RBP: ffffb291404dfae0 R08: ffff908acdcc0000 R09: 0000000000000000
Oct 28 12:24:11 desktop kernel: R10: ffff908acdcd2980 R11: ffff908acdcc01f0 R12: ffff908aa3478000
Oct 28 12:24:11 desktop kernel: R13: ffff908acdcc3250 R14: 0000000000000005 R15: 0000000000000000
Oct 28 12:24:11 desktop kernel: FS: 0000000000000000(0000) GS:ffff90911ed00000(0000) knlGS:0000000000000000
Oct 28 12:24:11 desktop kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Oct 28 12:24:11 desktop kernel: CR2: 00007f36aced3098 CR3: 00000001a3e6c000 CR4: 0000000000350ee0
Oct 28 12:24:11 desktop kernel: Call Trace:
Oct 28 12:24:11 desktop kernel: <TASK>
Oct 28 12:24:11 desktop kernel: ? dce_get_required_clocks_state+0x25/0x140 [amdgpu]
Oct 28 12:24:11 desktop kernel: dce_update_clocks+0xdb/0x170 [amdgpu]
Oct 28 12:24:11 desktop kernel: dce100_prepare_bandwidth+0x3e/0x50 [amdgpu]
Oct 28 12:24:11 desktop kernel: commit_planes_for_stream+0xd54/0x1060 [amdgpu]
Oct 28 12:24:11 desktop kernel: ? dc_resource_state_copy_construct+0x167/0x2b0 [amdgpu]
Oct 28 12:24:11 desktop kernel: dc_commit_updates_for_stream+0x1e8/0x5b0 [amdgpu]
Oct 28 12:24:11 desktop kernel: set_all_streams_dpms_off_for_link+0x159/0x190 [amdgpu]
Oct 28 12:24:11 desktop kernel: ? detect_link_and_local_sink+0x5f2/0xc40 [amdgpu]
Oct 28 12:24:11 desktop kernel: verify_link_capability.isra.0+0x260/0x300 [amdgpu]
Oct 28 12:24:11 desktop kernel: dc_link_detect+0x35/0x1d0 [amdgpu]
Oct 28 12:24:11 desktop kernel: handle_hpd_irq_helper+0x106/0x1d0 [amdgpu]
Oct 28 12:24:11 desktop kernel: handle_hpd_irq+0xe/0x20 [amdgpu]
Oct 28 12:24:11 desktop kernel: dm_irq_work_func+0x19/0x30 [amdgpu]
Oct 28 12:24:11 desktop kernel: process_one_work+0x225/0x400
Oct 28 12:24:11 desktop kernel: worker_thread+0x50/0x3e0
Oct 28 12:24:11 desktop kernel: ? rescuer_thread+0x3c0/0x3c0
Oct 28 12:24:11 desktop kernel: kthread+0xe9/0x110
Oct 28 12:24:11 desktop kernel: ? kthread_complete_and_exit+0x20/0x20
Oct 28 12:24:11 desktop kernel: ret_from_fork+0x22/0x30
Oct 28 12:24:11 desktop kernel: </TASK>
Oct 28 12:24:11 desktop kernel: ---[ end trace 0000000000000000 ]---
Oct 28 12:24:11 desktop kernel: BUG: kernel NULL pointer dereference, address: 0000000000000008
Oct 28 12:24:11 desktop kernel: #PF: supervisor read access in kernel mode
Oct 28 12:24:11 desktop kernel: #PF: error_code(0x0000) - not-present page
Oct 28 12:24:11 desktop kernel: PGD 1a73f3067 P4D 1a73f3067 PUD 1a73f2067 PMD 0
Oct 28 12:24:11 desktop kernel: Oops: 0000 [#1] PREEMPT SMP NOPTI
Oct 28 12:24:11 desktop kernel: CPU: 12 PID: 91 Comm: kworker/12:0H Tainted: G W O 5.19.0-23.24-justin-stock-generic #stock
Oct 28 12:24:11 desktop kernel: Hardware name: Gigabyte Technology Co., Ltd. X570 AORUS PRO WIFI/X570 AORUS PRO WIFI, BIOS F21 07/31/2020
Oct 28 12:24:11 desktop kernel: Workqueue: events_highpri dm_irq_work_func [amdgpu]
Oct 28 12:24:11 desktop kernel: RIP: 0010:dce110_fill_display_configs+0xa4/0x2e0 [amdgpu]
Oct 28 12:24:11 desktop kernel: Code: 10 08 00 00 83 fb 06 75 da 0f 0b 31 db 45 0f b6 ac 24 c8 03 00 00 41 80 fd 01 0f 87 fd 55 19 00 41 83 e5 01 0f 85 b7 00 00 00 <48> 8b 43 08 48 8d 14 92 41 83 c1 01 49 8d 0c d2 31 d2 8b 80 c4 03
Oct 28 12:24:11 desktop kernel: RSP: 0018:ffffb291404dfa90 EFLAGS: 00010246
Oct 28 12:24:11 desktop kernel: RAX: 0000000000000110 RBX: 0000000000000000 RCX: 0000000000000000
Oct 28 12:24:11 desktop kernel: RDX: 0000000000000000 RSI: ffff908acdcd2980 RDI: ffff908acdcc0000
Oct 28 12:24:11 desktop kernel: RBP: ffffb291404dfae0 R08: ffff908acdcc0000 R09: 0000000000000000
Oct 28 12:24:11 desktop kernel: R10: ffff908acdcd2980 R11: ffff908acdcc01f0 R12: ffff908aa3478000
Oct 28 12:24:11 desktop kernel: R13: 0000000000000000 R14: 0000000000000005 R15: 0000000000000000
Oct 28 12:24:11 desktop kernel: FS: 0000000000000000(0000) GS:ffff90911ed00000(0000) knlGS:0000000000000000
Oct 28 12:24:11 desktop kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Oct 28 12:24:11 desktop kernel: CR2: 0000000000000008 CR3: 00000001a3e6c000 CR4: 0000000000350ee0
Oct 28 12:24:11 desktop kernel: Call Trace:
Oct 28 12:24:11 desktop kernel: <TASK>
Oct 28 12:24:11 desktop kernel: ? dce_get_required_clocks_state+0x25/0x140 [amdgpu]
Oct 28 12:24:11 desktop kernel: dce_update_clocks+0xdb/0x170 [amdgpu]
Oct 28 12:24:11 desktop kernel: dce100_prepare_bandwidth+0x3e/0x50 [amdgpu]
Oct 28 12:24:11 desktop kernel: commit_planes_for_stream+0xd54/0x1060 [amdgpu]
Oct 28 12:24:11 desktop kernel: ? dc_resource_state_copy_construct+0x167/0x2b0 [amdgpu]
Oct 28 12:24:11 desktop kernel: dc_commit_updates_for_stream+0x1e8/0x5b0 [amdgpu]
Oct 28 12:24:11 desktop kernel: set_all_streams_dpms_off_for_link+0x159/0x190 [amdgpu]
Oct 28 12:24:11 desktop kernel: ? detect_link_and_local_sink+0x5f2/0xc40 [amdgpu]
Oct 28 12:24:11 desktop kernel: verify_link_capability.isra.0+0x260/0x300 [amdgpu]
Oct 28 12:24:11 desktop kernel: dc_link_detect+0x35/0x1d0 [amdgpu]
Oct 28 12:24:11 desktop kernel: handle_hpd_irq_helper+0x106/0x1d0 [amdgpu]
Oct 28 12:24:11 desktop kernel: handle_hpd_irq+0xe/0x20 [amdgpu]
Oct 28 12:24:11 desktop kernel: dm_irq_work_func+0x19/0x30 [amdgpu]
Oct 28 12:24:11 desktop kernel: process_one_work+0x225/0x400
Oct 28 12:24:11 desktop kernel: worker_thread+0x50/0x3e0
Oct 28 12:24:11 desktop kernel: ? rescuer_thread+0x3c0/0x3c0
Oct 28 12:24:11 desktop kernel: kthread+0xe9/0x110
Oct 28 12:24:11 desktop kernel: ? kthread_complete_and_exit+0x20/0x20
Oct 28 12:24:11 desktop kernel: ret_from_fork+0x22/0x30
Oct 28 12:24:11 desktop kernel: </TASK>
Oct 28 12:24:11 desktop kernel: Modules linked in: xt_multiport tls nf_conntrack_netlink xfrm_user xfrm_algo xt_addrtype br_netfilter nvme_fabrics rfcomm snd_seq_dummy snd_hrtimer xt_CHECKSUM xt_MASQUERADE xt_conntrack ipt_REJECT nf_reject_ipv4 xt_tcpudp nft_compat nft_chain_nat n>
Oct 28 12:24:11 desktop kernel: gigabyte_wmi rapl drm_kms_helper fb_sys_fops snd_timer syscopyarea iwlwifi(O) ccp sysfillrect snd sysimgblt k10temp soundcore cfg80211(O) iwlwifi_compat(O) mac_hid msr parport_pc ppdev lp parport drm ramoops pstore_blk reed_solomon pstore_zone efi_>
Oct 28 12:24:11 desktop kernel: CR2: 0000000000000008
Oct 28 12:24:11 desktop kernel: ---[ end trace 0000000000000000 ]---
Oct 28 12:24:11 desktop kernel: RIP: 0010:dce110_fill_display_configs+0xa4/0x2e0 [amdgpu]
Oct 28 12:24:11 desktop kernel: Code: 10 08 00 00 83 fb 06 75 da 0f 0b 31 db 45 0f b6 ac 24 c8 03 00 00 41 80 fd 01 0f 87 fd 55 19 00 41 83 e5 01 0f 85 b7 00 00 00 <48> 8b 43 08 48 8d 14 92 41 83 c1 01 49 8d 0c d2 31 d2 8b 80 c4 03
Oct 28 12:24:11 desktop kernel: RSP: 0018:ffffb291404dfa90 EFLAGS: 00010246
Oct 28 12:24:11 desktop kernel: RAX: 0000000000000110 RBX: 0000000000000000 RCX: 0000000000000000
Oct 28 12:24:11 desktop kernel: RDX: 0000000000000000 RSI: ffff908acdcd2980 RDI: ffff908acdcc0000
Oct 28 12:24:11 desktop kernel: RBP: ffffb291404dfae0 R08: ffff908acdcc0000 R09: 0000000000000000
Oct 28 12:24:11 desktop kernel: R10: ffff908acdcd2980 R11: ffff908acdcc01f0 R12: ffff908aa3478000
Oct 28 12:24:11 desktop kernel: R13: 0000000000000000 R14: 0000000000000005 R15: 0000000000000000
Oct 28 12:24:11 desktop kernel: FS: 0000000000000000(0000) GS:ffff90911ed00000(0000) knlGS:0000000000000000
Oct 28 12:24:11 desktop kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Oct 28 12:24:11 desktop kernel: CR2: 0000000000000008 CR3: 00000001a3e6c000 CR4: 0000000000350ee0

The issue also exists in upstream kernels (https://github.com/torvalds/linux.git) 5.18 and 5.19, but is fixed in 6.0. I used `git bisect` to determine that the commit that causes me to experience the failure is c282d9512cdd (it's certainly possible that the bug already existed and this commit just exposed it). I also used `bisect` to determine that the issue is fixed in 15c735e7990f. I applied that patch to the latest Ubuntu kernel (I'm a little unsure on the process, but I cloned from https://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/kinetic and applied the patch on top of tag Ubuntu-5.19.0-23.24), and the problem is fixed. The patch didn't apply cleanly, but it's easy enough to manually patch the hunks necessary.

I was hoping the kernel team might backport the patch.

Thanks!

ProblemType: Bug
DistroRelease: Ubuntu 22.10
Package: linux-image-5.19.0-23-generic 5.19.0-23.24
ProcVersionSignature: Ubuntu 5.19.0-23.24-generic 5.19.7
Uname: Linux 5.19.0-23-generic x86_64
ApportVersion: 2.23.1-0ubuntu3
Architecture: amd64
CRDA: N/A
CasperMD5CheckResult: unknown
CurrentDesktop: GNOME
Date: Fri Oct 28 16:39:39 2022
InstallationDate: Installed on 2019-08-30 (1155 days ago)
InstallationMedia: Ubuntu 19.04 "Disco Dingo" - Release amd64 (20190416)
MachineType: Gigabyte Technology Co., Ltd. X570 AORUS PRO WIFI
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcFB: 0 amdgpudrmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-5.19.0-23-generic root=/dev/mapper/ubuntu--vg-root ro quiet splash vt.handoff=7
PulseList: Error: command ['pacmd', 'list'] failed with exit code 1: No PulseAudio daemon running, or not running as session daemon.
RelatedPackageVersions:
 linux-restricted-modules-5.19.0-23-generic N/A
 linux-backports-modules-5.19.0-23-generic N/A
 linux-firmware 20220923.gitf09bebf3-0ubuntu1
SourcePackage: linux
UpgradeStatus: Upgraded to kinetic on 2022-10-22 (6 days ago)
dmi.bios.date: 07/31/2020
dmi.bios.release: 5.17
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: F21
dmi.board.asset.tag: Default string
dmi.board.name: X570 AORUS PRO WIFI
dmi.board.vendor: Gigabyte Technology Co., Ltd.
dmi.board.version: x.x
dmi.chassis.asset.tag: Default string
dmi.chassis.type: 3
dmi.chassis.vendor: Default string
dmi.chassis.version: Default string
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvrF21:bd07/31/2020:br5.17:svnGigabyteTechnologyCo.,Ltd.:pnX570AORUSPROWIFI:pvr-CF:rvnGigabyteTechnologyCo.,Ltd.:rnX570AORUSPROWIFI:rvrx.x:cvnDefaultstring:ct3:cvrDefaultstring:skuDefaultstring:
dmi.product.family: X570 MB
dmi.product.name: X570 AORUS PRO WIFI
dmi.product.sku: Default string
dmi.product.version: -CF
dmi.sys.vendor: Gigabyte Technology Co., Ltd.

Revision history for this message
Justin Donnelly (justindonnelly) wrote :
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Status changed to Confirmed

This change was made by a bot.

Changed in linux (Ubuntu):
status: New → Confirmed
summary: - Crash after monitor wake
+ kernel NULL pointer dereference after monitor wake
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.