620.70.06: NULL deref in ConnectorImpl::ensureMstNodesPoweredUp (via ConnectorImpl2x::notifyAttachBegin) on first modeset after s2idle resume — kwin_wayland killed, black screen
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 42/100
- Tipo de issue
- Bug
- Clareza
- Razoavelmente clara
- Status de atividade
- Ativa
- Stack de tecnologia
- c
- Domínio
- operating-systems
Direção de pesquisa
Start by reading src/common/displayport group and device lifetime code, then trace ConnectorImpl::ensureMstNodesPoweredUp and ConnectorImpl2x::notifyAttachBegin against the reported call stack. The report describes a possible stale DeviceImpl after s2idle resume, but does not identify a specific source file or reproducing test. Done means resolving the device lifetime failure and preventing the first modeset after resume from dereferencing a null vtable.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
NVIDIA Driver Version
620.70.06 (open kernel modules)
Operating System and Version
Arch Linux (CachyOS kernel)
Kernel Release
7.3.4-1-cachyos
Hardware
- GPU: GeForce RTX 5060 Ti (GB206, 10de:2d04), VBIOS 98.06.4E.40.38
- iGPU also present: AMD Renoir (amdgpu); display connected only to the NVIDIA card
- Board: B450M (BIOS 5.17, 12/13/2024)
- Display: LG UltraGear over DisplayPort, single monitor, direct connection (no hub/dock/MST)
Software
- KDE Plasma 6.8.3, kwin_wayland 6.8.3 (Wayland session)
nvidia_drm.modeset=1,nvidia_drm.fbdev=1- nvidia-suspend/resume/hibernate systemd services: disabled
PreserveVideoMemoryAllocations: 2,DynamicPowerManagement: 3
Describe the bug
The system suspended (s2idle) after an idle period. On wake, the kernel resumed normally (disks, network and audio came back), but ~2 seconds after PM: suspend exit, the first atomic commit from kwin_wayland oopsed inside nvidia_modeset. kwin_wayland was killed with IRQs disabled, the display stayed black, and only a hard reset got the machine back. The rest of the system stayed alive; it kept logging network traffic for several minutes.
Earlier in the same boot (about 3 h before the suspend), this warning appeared once:
WARNING: nvidia-drm/nvidia-drm-crtc.h:371 at __nv_drm_handle_flip_event (nv_flip == NULL).
Analysis
The faulting instruction is at ensureMstNodesPoweredUp+0x53:
48 8b 03 mov rax, [rbx] ; rbx = Device* from target->enumDevices()
48 8b 40 18 mov rax, [rax+0x18] ; <-- faults: vtable pointer is NULL (CR2 = 0x18)
48 3d ... cmp rax, <fn> ; devirtualization check for dev->isVideoSink()
So the Device* returned by target->enumDevices() points to an object whose vtable pointer is 0. That looks like a stale or freed DeviceImpl still linked in the Group after resume. The monitor was probably re-detected or removed during resume while the group membership wasn't updated. The connector-state guard at the top of the function (connectorActive / isDiscoveryDetectComplete) did not catch it.
Note that notifyAttachBegin iterates the same list right after ensureMstNodesPoweredUp() returns. So adding a linkUseMultistream() guard (this is an SST link) would only move the crash, not fix the lifetime problem.
I checked the 620.73.04 tag: ensureMstNodesPoweredUp and the group/device lifetime code in src/common/displayport are unchanged, so this is likely still present. This may be related to #1454 (NULL deref on modeset after DP re-plug).
To Reproduce
- Wayland session (KWin) on RTX 50-series, single DP monitor.
- Let the system auto-suspend (s2idle) for ~1 h.
- Wake it. The crash happens on the first modeset after resume.
This has happened once so far, so it is not reliably reproducible.
Kernel log (oops)
PM: suspend exit
BUG: kernel NULL pointer dereference, address: 0000000000000018
#PF: supervisor read access in kernel mode
#PF: error_code(0x0000) - not-present page
Oops: Oops: 0000 [#1] SMP NOPTI
CPU: 2 UID: 1000 PID: 906 Comm: kwin_wayland Tainted: G W O 7.3.4-1-cachyos #1 PREEMPT(full)
RIP: 0010:_ZN11DisplayPort13ConnectorImpl23ensureMstNodesPoweredUpEPNS_5GroupE.part.0+0x53/0x2e0 [nvidia_modeset]
Code: ... 48 89 c3 0f 1f 00 48 8b 03 <48> 8b 40 18 48 3d d0 61 b6 c1 0f 85 1d 02 00 00 ...
RAX: 0000000000000000 RBX: ffff8b6b211fc008
Call Trace:
_ZN11DisplayPort15ConnectorImpl2x17notifyAttachBeginEPNS_5GroupERKNS_15DpModesetParamsE+0x263/0xe00 [nvidia_modeset]
_ZN11DisplayPort13ConnectorImpl12dpPreModesetERKNS_18DpPreModesetParamsE+0x87/0x150 [nvidia_modeset]
nvDPPreSetMode+0x144/0x250 [nvidia_modeset]
KickoffModesetUpdateState+0xe8/0x220 [nvidia_modeset]
nvSetDispModeEvo+0x3e98/0x4c00 [nvidia_modeset]
nvKmsIoctl+0xdc/0x1b0 [nvidia_modeset]
nvkms_ioctl_from_kapi_try_pmlock+0x4b/0x80 [nvidia_modeset]
ApplyModeSetConfig+0xd98/0xfb0 [nvidia_modeset]
nv_drm_atomic_commit+0x584/0xab0 [nvidia_drm]
drm_atomic_commit+0xc3/0xf0
drm_mode_atomic_ioctl.cold+0x348/0x5d8
drm_ioctl+0x305/0x4d0
do_syscall_64+0x8f/0x380
entry_SYSCALL_64_after_hwframe+0x76/0x7e
note: kwin_wayland[906] exited with irqs disabled
Bug Incidence
Once
nvidia-bug-report.log.gz
(to attach: generated after the next occurrence)
- Linguagem predominante
- C
- Estrelas
- 17.7k
- Forks
- 2k
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Sem modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de NVIDIA/open-gpu-kernel-modules
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
NVIDIA/open-gpu-kernel-modules#1635 ·
Mantenedores costumam responder em até 1 dia
-
nvidia-drm: NULL dereference in nv_drm_create_sync_file() when sync_file_create() fails (kernel oops when fs.file-max is exhausted)Talvez livre de novo Um pull request para esta issue foi fechado sem ser mesclado. Abertabug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
NVIDIA/open-gpu-kernel-modules#1601 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
NVIDIA/open-gpu-kernel-modules#1479 · 2 comentários ·
Mantenedores costumam responder em até 1 dia
-
PlatformRequestHandler: missing !bInit guard on bSystemParamLimitUpdate causes NV_ERR_INVALID_DATA at bootTalvez já em andamento @SammyTourani assumiu há 69 dias. Aberta
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 88/100
NVIDIA/open-gpu-kernel-modules#1360 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
NVIDIA/open-gpu-kernel-modules#1343 · 3 comentários ·
Mantenedores costumam responder em até 1 dia
Todas as issues de NVIDIA/open-gpu-kernel-modules
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
Mantenedores costumam responder em até 2 dias
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 85/100
Mantenedores costumam responder em até 1 dia
-
iOS: the "Edit controls" button never hides, even with a controller connected, and covers the gameAbertagame: 010065A014024000 ios
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
seedds/nxnative#3714 · 1 comentário ·
Mantenedores costumam responder em até 2 dias
-
HTTP/3
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
Mantenedores costumam responder em até 1 dia