[Bug 257707] panic: malloc: called with spinlock or critical section held when loading amdgpu

From: <bugzilla-noreply_at_freebsd.org>
Date: Mon, 09 Aug 2021 12:01:44 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=257707

            Bug ID: 257707
           Summary: panic: malloc: called with spinlock or critical
                    section held when loading amdgpu
           Product: Base System
           Version: Unspecified
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: nc@FreeBSD.org
 Attachment #227044 text/plain
         mime type:

Created attachment 227044
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=227044&action=edit
Stack trace

On an AMD Ryzen 4700U-based HP Envy x360, when I load amdgpu, I get an `panic:
malloc: called with spinlock or critical section held` kernel panic.

This happens on 5.5 from Ports and 5.6-wip from GitHub. drm-kmod 5.4 doesn't
support the iGPU.

Backtrace:

Unread portion of the kernel message buffer:
taskqueue_drain with the following non-sleepable locks held:
exclusive sleep mutex vtdev (vtdev) r = 0 (0xffffffff81aea0a8) locked @
/usr/src/sys/dev/vt/vt_core.c:3012
stack backtrace:
#0 0xffffffff80c902e1 at witnespanic: malloc: called with spinlock or critical
section held
cpuid = 6
time = 1628439111
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe00c1ff4470
vpanic() at vpanic+0x187/frame 0xfffffe00c1ff44d0
panic() at panic+0x43/frame 0xfffffe00c1ff4530
malloc_dbg() at malloc_dbg+0xe2/frame 0xfffffe00c1ff4550
malloc() at malloc+0x30/frame 0xfffffe00c1ff45a0
dcn21_validate_bandwidth() at dcn21_validate_bandwidth+0x7e/frame
0xfffffe00c1ff4630
dc_validate_global_state() at dc_validate_global_state+0x2cc/frame
0xfffffe00c1ff4690
amdgpu_dm_atomic_check() at amdgpu_dm_atomic_check+0xee1/frame
0xfffffe00c1ff4940
drm_atomic_check_only() at drm_atomic_check_only+0x424/frame 0xfffffe00c1ff49c0
drm_atomic_commit() at drm_atomic_commit+0x13/frame 0xfffffe00c1ff49e0
drm_client_modeset_commit_atomic() at
drm_client_modeset_commit_atomic+0x148/frame 0xfffffe00c1ff4a50
drm_client_modeset_commit_force() at drm_client_modeset_commit_force+0x66/frame
0xfffffe00c1ff4a90
drm_fb_helper_restore_fbdev_mode_unlocked() at
drm_fb_helper_restore_fbdev_mode_unlocked+0x7a/frame 0xfffffe00c1ff4ac0
taskqueue_run_locked() at taskqueue_run_locked+0xaa/frame 0xfffffe00c1ff4b40
taskqueue_thread_loop() at taskqueue_thread_loop+0xc2/frame 0xfffffe00c1ff4b70
fork_exit() at fork_exit+0x80/frame 0xfffffe00c1ff4bb0
fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe00c1ff4bb0

Log is attached.

-- 
You are receiving this mail because:
You are the assignee for the bug.