Since linux-next-20231115 my linux system (debian sid on msi alpha 15 laptop) suffers from random deadlocks which can occur after 30 - 180min of usage. These deadlocks can be actively provoked by creating high system load (usually by compiling a kernel with make -j NRCPUS) and the opening instances of libreoffice --writer until the system GUI locks (the mouse cursor can still be moved but the screen is frozen). In this state ssh'ing into the machine is still possible and at least sometimes log messages about hung tasks appear in /var/log/kern.log. More info can be found here: https://gitlab.freedesktop.org/drm/amd/-/issues/2994 Using the method described to trigger the bug I bisected the problem in the linux-next and drm-misc trees to give commit f3123c2590005 as the problem. As this simple patch fixes the problem diff --git a/drivers/gpu/drm/scheduler/sched_main.c b/drivers/gpu/drm/scheduler/sched_main.c index 044a8c4875ba..25b97db1b623 100644 --- a/drivers/gpu/drm/scheduler/sched_main.c +++ b/drivers/gpu/drm/scheduler/sched_main.c @@ -1029,9 +1029,8 @@ EXPORT_SYMBOL(drm_sched_job_cleanup); void drm_sched_wakeup(struct drm_gpu_scheduler *sched, struct drm_sched_entity *entity) { - if (drm_sched_entity_is_ready(entity)) - if (drm_sched_can_queue(sched, entity)) - drm_sched_run_job_queue(sched); + if (drm_sched_can_queue(sched, entity)) + drm_sched_run_job_queue(sched); } /** there might be in the entity->dependency branch of drm_sched_entity_is_ready (some kind of circular dependencies ...). Bert Karwatzki