Bug 297250 - graphics/drm-66-kmod (amdgpu): panic: Assertion td->td_lkpi_task == NULL
Summary: graphics/drm-66-kmod (amdgpu): panic: Assertion td->td_lkpi_task == NULL
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 16.0-CURRENT
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-x11 (Nobody)
URL:
Keywords: crash
Depends on:
Blocks:
 
Reported: 2026-08-03 18:04 UTC by Klaus Küchemann
Modified: 2026-08-06 22:08 UTC (History)
2 users (show)

See Also:
linimon: maintainer-feedback? (x11)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Klaus Küchemann 2026-08-03 18:04:00 UTC
Dump header from device: /dev/nda0p3
 Architecture: amd64
 Architecture Version: 2
 Dump Length: 798560256
 Blocksize: 512
 Compression: none
 Dumptime: 2026-08-02 20:07:23 +0200
 Hostname:
 Magic: FreeBSD Kernel Dump
 Version String: FreeBSD 16.0-CURRENT #0 main-n287888-f68d7bfc1479: Sun Aug  2 19:04:22 CEST 2026
   root@fbsd5pro:/usr/obj/usr/src/amd64.amd64/sys/GENERIC
 Panic String: Assertion td->td_lkpi_task == NULL failed at /usr/src/sys/compat/linuxkpi/common/src/linux_current.c:85
 Dump Parity: 1121206867
 Bounds: 4
 Dump Status: good
—
<118>Loading kernel modules:
drmn0: <drmn> on vgapci0
vgapci0: child drmn0 requested pci_enable_io
vgapci0: child drmn0 requested pci_enable_io
<6>[drm] initializing kernel modesetting (RENOIR 0x1002:0x1636 0x1002:0x1636 0xD9).
<6>[drm] register mmio base: 0xFCA00000
<6>[drm] register mmio size: 524288
<6>[drm] add ip block number 0 <soc15_common>
<6>[drm] add ip block number 1 <gmc_v9_0>
<6>[drm] add ip block number 2 <vega10_ih>
<6>[drm] add ip block number 3 <psp>
<6>[drm] add ip block number 4 <smu>
<6>[drm] add ip block number 5 <dm>
<6>[drm] add ip block number 6 <gfx_v9_0>
<6>[drm] add ip block number 7 <sdma_v4_0>
<6>[drm] add ip block number 8 <vcn_v2_0>
<6>[drm] add ip block number 9 <jpeg_v2_0>
<6>[drm] BIOS signature incorrect 0 0
drmn0: Fetched VBIOS from ROM BAR
<6>amdgpu: ATOM BIOS: 113-RENOIR-026
drmn0: successfully loaded firmware image 'amdgpu/renoir_asd.bin'
drmn0: successfully loaded firmware image 'amdgpu/renoir_ta.bin'
drmn0: successfully loaded firmware image 'amdgpu/renoir_dmcub.bin'
drmn0: successfully loaded firmware image 'amdgpu/renoir_pfp.bin'
drmn0: successfully loaded firmware image 'amdgpu/renoir_me.bin'
drmn0: successfully loaded firmware image 'amdgpu/renoir_ce.bin'
drmn0: successfully loaded firmware image 'amdgpu/renoir_rlc.bin'
drmn0: successfully loaded firmware image 'amdgpu/renoir_mec.bin'
drmn0: successfully loaded firmware image 'amdgpu/renoir_sdma.bin'
drmn0: successfully loaded firmware image 'amdgpu/renoir_vcn.bin'
drmn0: Trusted Memory Zone (TMZ) feature enabled
drmn0: PCIE atomic ops is not supported
drmn0: MODE2 reset
<6>[drm] vm size is 262144 GB, 4 levels, block size is 9-bit, fragment size is 9-bit
drmn0: VRAM: 512M 0x000000F400000000 - 0x000000F41FFFFFFF (512M used)
drmn0: GART: 1024M 0x0000000000000000 - 0x000000003FFFFFFF
<6>[drm] Detected VRAM RAM=512M, BAR=512M
<6>[drm] RAM width 128bits DDR4
<6>[drm] amdgpu: 512M of VRAM memory ready
<6>[drm] amdgpu: 7867M of GTT memory ready.
<6>[drm] GART: num cpu pages 262144, num gpu pages 262144
<6>[drm] PCIE GART of 1024M enabled.
<6>[drm] PTB located at 0x000000F41FC00000
<6>[drm] Loading DMUB firmware via PSP: version=0x0101002B
<6>[drm] Found VCN firmware Version ENC: 1.24 DEC: 8 VEP: 0 Revision: 9
drmn0: reserve 0x400000 from 0xf41f800000 for PSP TMR
drmn0: RAS: optional ras ta ucode is not available
drmn0: RAP: optional rap ta ucode is not available
drmn0: psp gfx command LOAD_TA(0x1) failed and response status is (0x7)
drmn0: SMU is initialized successfully!
panic: Assertion td->td_lkpi_task == NULL failed at /usr/src/sys/compat/linuxkpi/common/src/linux_current.c:85
cpuid = 8
time = 1785694043
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x36/frame 0xfffffe01392cc238
vpanic() at vpanic+0x149/frame 0xfffffe01392cc368
panic() at panic+0x43/frame 0xfffffe01392cc3c8
linux_alloc_current() at linux_alloc_current+0x2e3/frame 0xfffffe01392cc418
dc_assert_fp_enabled() at dc_assert_fp_enabled+0x77/frame 0xfffffe01392cc438
dcn21_update_bw_bounding_box() at dcn21_update_bw_bounding_box+0x26/frame 0xfffffe01392cc470
dc_create() at dc_create+0x3c4/frame 0xfffffe01392cc4b0
dm_hw_init() at dm_hw_init+0x45e/frame 0xfffffe01392cc6d0
amdgpu_device_ip_hw_init_phase2() at amdgpu_device_ip_hw_init_phase2+0x5a/frame 0xfffffe01392cc700
amdgpu_device_ip_init() at amdgpu_device_ip_init+0x3e0/frame 0xfffffe01392cc770
amdgpu_device_init() at amdgpu_device_init+0x1efc/frame 0xfffffe01392cc820
amdgpu_driver_load_kms() at amdgpu_driver_load_kms+0x16/frame 0xfffffe01392cc850
amdgpu_pci_probe() at amdgpu_pci_probe+0x299/frame 0xfffffe01392cc8a0
linux_pci_attach_device() at linux_pci_attach_device+0x55b/frame 0xfffffe01392cc900
device_attach() at device_attach+0x466/frame 0xfffffe01392cc950
bus_generic_driver_added() at bus_generic_driver_added+0x90/frame 0xfffffe01392cc970
devclass_driver_added() at devclass_driver_added+0x29/frame 0xfffffe01392cc9a0
devclass_add_driver() at devclass_add_driver+0x138/frame 0xfffffe01392cc9e0
_linux_pci_register_driver() at _linux_pci_register_driver+0xc1/frame 0xfffffe01392cca10
amdgpu_evh() at amdgpu_evh+0x65/frame 0xfffffe01392cca20
module_register_init() at module_register_init+0xb0/frame 0xfffffe01392cca50
linker_load_module() at linker_load_module+0xcf7/frame 0xfffffe01392ccd60
kern_kldload() at kern_kldload+0x172/frame 0xfffffe01392ccdb0
sys_kldload() at sys_kldload+0x67/frame 0xfffffe01392ccdf0
amd64_syscall() at amd64_syscall+0x17c/frame 0xfffffe01392ccf30
fast_syscall_common() at fast_syscall_common+0xf8/frame 0xfffffe01392ccf30
--- syscall (304, FreeBSD ELF64, kldload), rip = 0x3f3d8048636a, rsp = 0x3f3d7da75358, rbp = 0x3f3d7da758d0 ---
KDB: enter: panic
Uptime: 7s
Dumping 761 out of 15734 MB:..3%..11%..22%..32%..43%..51%..61%..72%..82%..91%
——-
most recent head
main-n287888-f68d7bfc1479: Sun Aug  2 19:04:22 CEST 2026
--
root@fbsd5pro:~ # pkg -v
2.8.1
--
root@fbsd5pro:~ # make -C /usr/ports/graphics/drm-66-kmod -V PKGVERSION
6.6.25.1600019_10
--
AMD Ryzen 5 Pro
clean rebuilt of drm-66-kmod from port`s source, as suggested in mailing list , didn`t help, 
also tested D58593 as suggested in ml didn`t .

Regards
K.
Comment 1 Klaus Küchemann 2026-08-03 22:31:00 UTC
well, in the end I could workaround this bug  by trial&error in the following sequence :
1. — solution (important to install BOTH drm&firmware via ports)—
pkg delete [everything drm-kmod & gpu-firmware-kmod]
pkg autoremove
cd /usr/ports/graphics/drm-kmod
make install
cd /usr/ports/graphics/gpu-firmware-kmod
make install

Maybe the above is a known sequence for some people who hit this issue but why not fix this bug

2.—while worked around it  for now  I think I’ll leave this bugzilla open since the following related is for sure a kernel bug  :

This should be the (existing)correct way to prevent kernel crash/attack: 
root@fbsd5pro:~ # kldunload  amdgpu_renoir_asd_bin.ko
kldunload: can't unload file: Device busy
…with the addition of console-message :
kldunload: attempt to unload file that was loaded by the kernel

But :
 try to:
 kldunload amdgpu,
 ouch, massive crash(system tries to goto init1 and even fails that attempt & freezes)

3.—
Also I would suggest to „ forbid“ to install drm-kmod & gpu-firmware-kmod via pkg 
since version incompatibilities or whatever crap will massively pollute the system and will crash X11 or kernel panic  .
Instead an attempt of using pkg should ONLY spit out a warning message AND instructions to do it correctly via ports.
I know there is a message AFTER(why not before?) installation like :
If not good for your OS- version then rebuild ( w/o details howto remove the crap and rebuild)
of course: fix instead of warn is even better :-)


O.K., above only as a conceptual approach , for me it’s fixed thanks to some hints from the mailing list, thx :-)
.. if someone wants to close this report, O.K. for me

Thx @Mark Linimon for redirecting this to X11@ , Regards
Comment 2 Klaus Küchemann 2026-08-03 22:57:04 UTC
(In reply to Klaus Küchemann from comment #1)
last but no least quoting myself :
<<2.—while worked around it  for now  I think I’ll leave this bugzilla open since the following related is for sure a kernel bug >>

of course I know it isn`t a kernel bug but an X11-bug or similar...
but maybe the kernel should protect itself by rejecting especially attacks like kldunload amdgpu..
o.k., it`s loaded by rc.conf and I am always root ..
if the unload is protected by root(su)-only forget it :-)
Comment 3 rkoberman 2026-08-03 23:47:42 UTC
I have hit the same issue on "CPU: 12th Gen Intel(R) Core(TM) i5-1235U (2496.00-MHz K8-class CPU)"

The old version is:
 main-n287169-6d9bc46cd7fc: Wed Jul  1 16:51:31 PDT 2026     root@ptavv:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64
A significant difference is that I was running 612, not 66. I was surprised that the new source drm-66-kmod file built with the new kernel sources works fine with the month-old kernel. I had not touched world when booting the old kernel. It booted normally, though with several ugly looking errors which I do not believe were related, but tied to starting IPv6 and Bluetooth. I'm guessing BZ has updated things in this area.

Just now I rebuilt drm-612-kmod reinstalled it and rebooted. I It booted normally, though with several ugly looking errors which I do not believe were related, but tied to starting IPv6 and Bluetooth. I'm guessing BZ has updated things in this area.t booted fine and Mate came up fine. (IPv6 also is working.)

Here is the crash:
drmn0: successfully loaded firmware image 'i915/adlp_dmc.bin'
drmn0: [drm] Finished loading DMC firmware i915/adlp_dmc.bin (v2.20)
drmn0: [drm] [ENCODER:244:DDI B/PHY B] unusable PPS, disabling eDP
panic: Assertion td->td_lkpi_task == NULL failed at /usr/src/sys/compat/linuxkpi/common/src/linux_current.c:85
cpuid = 9
time = 1785681088
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x36/frame 0xfffffe00eb603480
vpanic() at vpanic+0x149/frame 0xfffffe00eb6035b0
panic() at panic+0x43/frame 0xfffffe00eb603610
linux_alloc_current() at linux_alloc_current+0x2e3/frame 0xfffffe00eb603660
drm_framebuffer_init() at drm_framebuffer_init+0x199/frame 0xfffffe00eb603690
intel_framebuffer_init() at intel_framebuffer_init+0x792/frame 0xfffffe00eb6036e0
intel_crtc_initial_plane_config() at intel_crtc_initial_plane_config+0x7d5/frame 0xfffffe00eb603810
intel_display_driver_probe_nogem() at intel_display_driver_probe_nogem+0x2ae/frame 0xfffffe00eb603850
i915_driver_probe() at i915_driver_probe+0x634/frame 0xfffffe00eb603890
linux_pci_attach_device() at linux_pci_attach_device+0x55b/frame 0xfffffe00eb6038f0
device_attach() at device_attach+0x466/frame 0xfffffe00eb603940
bus_generic_driver_added() at bus_generic_driver_added+0x90/frame 0xfffffe00eb603960
devclass_driver_added() at devclass_driver_added+0x29/frame 0xfffffe00eb603990
devclass_add_driver() at devclass_add_driver+0x138/frame 0xfffffe00eb6039d0
_linux_pci_register_driver() at _linux_pci_register_driver+0xc1/frame 0xfffffe00eb603a00
i915kms_evh() at i915kms_evh+0x272/frame 0xfffffe00eb603a20
module_register_init() at module_register_init+0xb0/frame 0xfffffe00eb603a50
linker_load_module() at linker_load_module+0xcf7/frame 0xfffffe00eb603d60
kern_kldload() at kern_kldload+0x172/frame 0xfffffe00eb603db0
sys_kldload() at sys_kldload+0x67/frame 0xfffffe00eb603df0
amd64_syscall() at amd64_syscall+0x17c/frame 0xfffffe00eb603f30
fast_syscall_common() at fast_syscall_common+0xf8/frame 0xfffffe00eb603f30
--- syscall (304, FreeBSD ELF64, kldload), rip = 0x1861805f36a, rsp = 0x1861598e3f8, rbp = 0x1861598e970$
KDB: enter: panic
Comment 4 Klaus Küchemann 2026-08-04 00:57:28 UTC
(In reply to rkoberman from comment #3)
<<A significant difference is that I was running 612, not 66>>

Yes, /usr/ports/graphics/drm-kmod last but not least also chooses 
612 for my system and is running fine now. No clue how 66 came to the system in the past.. that`s why I think(or guess) that: 
—
pkg delete [everything drm-kmod & gpu-firmware-kmod]
pkg autoremove
cd /usr/ports/graphics/drm-kmod
make install
cd /usr/ports/graphics/gpu-firmware-kmod
make install
—
 is hopefully a safe workaround for now for everyone,

regardless the current head version(which here was 1600019 ).
Also the mentioned  mismatch warning (graphics/drm-66-kmod/files/pkg-message.in )
said(or maybe lied:-) that my OS-version is O.K.
I`m not aware of the code-related details of the real root cause of this bug 
And a PR on phab or git for correction of pkg-message.in would also not prevent anybody from running into this trap because that message comes too late(after polluting the system) (and is even wrong). 

Regards
Comment 5 rkoberman 2026-08-06 22:08:34 UTC
My battle continues with no improvement.
I have deleted all drm-kmod and gpu-firmware-* software, done pkg autoremove and reinstalled drm-612-kmod and gpu-firmware-intel-kmod. Nothing improved. With drm-612-kmod, attempting to run mpv resulted in a GPU lockup as soon as the video tried to start playing. No other messages were displayed or logged.

Repeated except install drm-66-kmod. Again no change from that kmod in the past. Difference from 612 ias that the GPU does not lock up. Instead I get three of the error:
[vo/gpu-next/libplacebo] Masking `storable` from wrapped texture because the corresponding format 'bgra8' does not support PL_FMT_CAP_STORABLE
followed by a long stream of
[vo/gpu-next/libplacebo] vkQueueSubmit2: VK_ERROR_UNKNOWN (../src/vulkan/command.c:533)

I should note that, until the recent update of mesa, MPV simply reported that vulkan was not functional and played the video, probably using vaapi. 

I think the problem stems from mesa being fixed but drm-kmd (either 66 or 612 being broken, but in different ways.

Another thing that locks up 615 is virtualbox. If I start or save a VM, part way through the operation, the GPU locks up. If a switch to another workspace, it does not happen. It either starts or saves normally.

System is 12th Gen Intel(R) Core(TM) i5-1235U (2496.00-MHz K8-class CPU)
GPU is Intel:
vgapci0@pci0:0:2:0:     class=0x030000 rev=0x0c hdr=0x00 vendor=0x8086 device=0$
    vendor     = 'Intel Corporation'
    device     = 'Alder Lake-UP3 GT2 [Iris Xe Graphics]'

I have multiple tools written to use mpv capability not available elsewhere and I have been unable to figure a way to write it for vlc as it lacks the capability to use a UNIX pipe to talk to it while still having keyboard access.