Bug 257707 - panic: malloc: called with spinlock or critical section held when loading amdgpu
Summary: panic: malloc: called with spinlock or critical section held when loading amdgpu
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: Unspecified
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords: crash
Depends on:
Blocks:
 
Reported: 2021-08-09 12:01 UTC by Neel Chauhan
Modified: 2022-10-12 00:49 UTC (History)
1 user (show)

See Also:


Attachments
Stack trace (114.10 KB, text/plain)
2021-08-09 12:01 UTC, Neel Chauhan
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Neel Chauhan freebsd_committer freebsd_triage 2021-08-09 12:01:44 UTC
Created attachment 227044 [details]
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.