NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/59629: amdgpu(4): accelerated code may free Xorg, killing it causes crash



The following reply was made to PR kern/59629; it has been noted by GNATS.

From: Andrius V <vezhlys%gmail.com@localhost>
To: NetBSD GNATS <gnats-bugs%netbsd.org@localhost>
Cc: 
Subject: Re: kern/59629: amdgpu(4): accelerated code may free Xorg, killing it
 causes crash
Date: Wed, 18 Mar 2026 12:35:19 +0200

 On Wed, Sep 3, 2025 at 1:32=E2=80=AFAM Andrius V <vezhlys%gmail.com@localhost> wrote:
 >
 > Left a typo in the subject: s/may free Xorg/may freeze Xorg/.
 >
 > On Wed, Sep 3, 2025 at 1:20=E2=80=AFAM <vezhlys%gmail.com@localhost> wrote:
 > >
 > > >Number:         59629
 > > >Category:       kern
 > > >Synopsis:       amdgpu(4): accelerated code may freeze Xorg, killing i=
 t causes crash
 > > >Confidential:   no
 > > >Severity:       serious
 > > >Priority:       medium
 > > >Responsible:    kern-bug-people
 > > >State:          open
 > > >Class:          sw-bug
 > > >Submitter-Id:   net
 > > >Arrival-Date:   Tue Sep 02 22:20:00 +0000 2025
 > > >Originator:     Andrius V
 > > >Release:        NetBSD 11.0_BETA
 > > >Organization:
 > > >Environment:
 > > NetBSD agraphic-pc 11.0_BETA NetBSD 11.0_BETA (GENERIC) #0: Mon Sep  1 =
 00:18:27 EEST 2025  andriusv@agraphic-pc:/home/andriusv/workspace/obj/sys/a=
 rch/amd64/compile/GENERIC amd64
 > > >Description:
 > > I have two amdgpu(4) "capable" graphics cards: RX460 and RX5700XT. I wa=
 s mainly using the latter with the NetBSD 10/10.1, since it worked relative=
 ly well. However, Xorg was reporting that 2D/3D acceleration was disabled n=
 o matter if I would enable in configuration or not.
 > >
 > > With upgrade to NetBSD 11 Beta, Xorg started to report that 2D/3D accel=
 eration is enabled (once configured). Unfortunately, as soon as accelerated=
  code is being executed (glxgears, firefox with hardware acceleration, scum=
 mvm, supertuxkart, etc), it causes Xorg to freeze and it flashes once with =
 most of the screen turning into artifacts.
 > >
 > > RX460 has this problem in a lesser extent, but still more often than no=
 t it would cause screen to turn into artifacts (stripes all over the screen=
 , with sometimes mouse movement still visible, but nothing can be done, sin=
 ce all screen is just in "colorful stripes").
 > >
 > > If accelerated code works sometimes, it does seem to work pretty well (=
 e.g. glxgears shows very high FPS, scummVM games using opengl acceleration =
 work smoothly, etc). Small artifacts still may appear over the place (black=
  rectangles, broken text in browser), but typically doesn't hinder the usag=
 e that much.
 > >
 > > Once the freeze happens, the system itself doesn't crash. But I can't s=
 witched to terminal using Alt+F<1-4> buttons. I can connect to the system u=
 sing ssh.
 > >
 > > In addition to all the problems, the mouse movement became very sluggis=
 h by default on amdgpu(4) (with the other problems described in kern/59628,=
  but need to verify if it is amdgpu only).
 > >
 > > Attempt to kill X session typically ends up in crash:
 > >
 > > [   114.187571] {drm:netbsd:amdgpu_cs_ioctl+0xe1f} *ERROR* Failed to in=
 itialize parser -87!
 > > [   114.407569] {drm:netbsd:amdgpu_cs_ioctl+0xe1f} *ERROR* Failed to in=
 itialize parser -87!
 > > [   115.167564] {drm:netbsd:amdgpu_cs_ioctl+0xe1f} *ERROR* Failed to in=
 itialize parser -87!
 > > [   115.197563] {drm:netbsd:amdgpu_cs_ioctl+0xe1f} *ERROR* Failed to in=
 itialize parser -87!
 > > [   115.927558] {drm:netbsd:amdgpu_cs_ioctl+0xe1f} *ERROR* Failed to in=
 itialize parser -87!
 > > [   116.207556] {drm:netbsd:amdgpu_cs_ioctl+0xe1f} *ERROR* Failed to in=
 itialize parser -87!
 > > [   116.687553] {drm:netbsd:amdgpu_cs_ioctl+0xe1f} *ERROR* Failed to in=
 itialize parser -87!
 > > [   117.217549] {drm:netbsd:amdgpu_cs_ioctl+0xe1f} *ERROR* Failed to in=
 itialize parser -87!
 > > [   117.447547] {drm:netbsd:amdgpu_cs_ioctl+0xe1f} *ERROR* Failed to in=
 itialize parser -87!
 > > [   118.207541] {drm:netbsd:amdgpu_cs_ioctl+0xe1f} *ERROR* Failed to in=
 itialize parser -87!
 > > [   118.227541] {drm:netbsd:amdgpu_cs_ioctl+0xe1f} *ERROR* Failed to in=
 itialize parser -87!
 > > [   118.937536] {drm:netbsd:amdgpu_job_timedout+0xaa} *ERROR* ring gfx =
 timeout, signaled seq=3D3316, emitted seq=3D3316
 > > [   118.937536] {drm:netbsd:amdgpu_job_timedout+0xc7} *ERROR* Process i=
 nformation: process firefox pid 1866 thread firefox:cs0 pid 2805
 > > [   118.937536] amdgpu0: GPU reset begin!
 > > [   118.967536] {drm:netbsd:amdgpu_cs_ioctl+0xe1f} *ERROR* Failed to in=
 itialize parser -87!
 > > [   119.217534] amdgpu0: GPU BACO reset
 > > [   119.237534] {drm:netbsd:amdgpu_cs_ioctl+0xe1f} *ERROR* Failed to in=
 itialize parser -87!
 > > [   119.577531] warning: [drm] schedsdma0 is not ready, skipping
 > > [   119.577531] warning: [drm] schedsdma1 is not ready, skipping
 > > [   119.577531] amdgpu0: autoconfiguration error: error: failed to clea=
 r page tables on GEM object close (-2)
 > > [   119.577531] uvm_fault(0xffff81fd82aa4c80, 0x0, 1) -> e
 > > [   119.577531] fatal page fault in supervisor mode
 > > [   119.577531] trap type 6 code 0 rip 0xffffffff809bc396 cs 0x8 rflags=
  0x10296 cr2 0x8 ilevel 0 rsp 0xffff88926e222800
 > > [   119.577531] curlwp 0xffff81fd90aa5000 pid 2464.2518 lowest kstack 0=
 xffff88926e21e2c0
 > > [   119.577531] panic: trap
 > > [   119.577531] cpu2: Begin traceback...
 > > [   119.577531] vpanic() at netbsd:vpanic+0x171
 > > [   119.577531] panic() at netbsd:panic+0x3c
 > > [   119.577531] trap() at netbsd:trap+0xb43
 > > [   119.577531] --- trap (number 6) ---
 > > [   119.577531] amdgpu_vm_sdma_commit() at netbsd:amdgpu_vm_sdma_commit=
 +0x3c
 > > [   119.577531] amdgpu_vm_bo_update_mapping() at netbsd:amdgpu_vm_bo_up=
 date_mapping+0x6ce
 > > [   119.577531] amdgpu_vm_clear_freed() at netbsd:amdgpu_vm_clear_freed=
 +0xe9
 > > [   119.577531] {drm:netbsd:amdgpu_cs_ioctl+0xe1f} *ERROR* Failed to in=
 itialize parser -87!
 > > [   119.577531] amdgpu_gem_object_close() at netbsd:amdgpu_gem_object_c=
 lose+0x161
 > > [   119.577531] drm_gem_object_release_handle() at netbsd:drm_gem_objec=
 t_release_handle+0x37
 > > [   119.577531] linux_idr_for_each() at netbsd:linux_idr_for_each+0x52
 > > [   119.577531] drm_gem_release() at netbsd:drm_gem_release+0x20
 > > [   119.577531] drm_file_free() at netbsd:drm_file_free+0x2b5
 > > [   119.587532] drm_close() at netbsd:drm_close+0x5a
 > > [   119.587532] closef() at netbsd:closef+0x9a
 > > [   119.587532] fd_free() at netbsd:fd_free+0xfa
 > > [   119.587532] exit1() at netbsd:exit1+0x119
 > > [   119.587532] sigexit() at netbsd:sigexit+0x1c2
 > > [   119.587532] postsig() at netbsd:postsig+0x35e
 > > [   119.587532] lwp_userret() at netbsd:lwp_userret+0x198
 > > [   119.587532] mi_userret() at ffffffff805b9b8e
 > > [   119.587532] syscall() at netbsd:syscall+0xdc
 > > [   119.587532] --- syscall (number 4) ---
 > > [   119.587532] netbsd:syscall+0xdc:
 > > [   119.587532] cpu2: End traceback...
 > >
 > >
 > > >How-To-Repeat:
 > > Start xorg with glamor and DRI "3" accelaration on amdgpu(4) card (see =
 in Xorg.0.log that acceleration is enabled).
 > > Start hardware accelerated application (firefox, glxgears, scummvm).
 > > Observe freeze/artifacts.
 > > Try to kill Xorg (over ssh) or restart system - observe crash (typicall=
 y).
 > > >Fix:
 > >
 
 Sluggish mouse issue mentioned in the initial bug report is not
 related to the amdgpu or gpu acceleration issues. It was caused by the
 gamepad attached to the system and likely wsmux/wsmouse related.
 
 Regards,
 Andrius V
 



Home | Main Index | Thread Index | Old Index