Skip to content

Kernel Deadlock in bpf_local_storage_map_free / srcu_barrier while running scx_beerland #3660

Description

@hxehex

Environment

  • OS: CachyOS
  • Kernel Version: 7.0.11-1-cachyos
  • Active Scheduler: sched_ext (scx_beerland_1.1.1)
  • Desktop Environment: Wayland (Sway)

Description

My entire graphical environment (Sway) and inputs (mouse/keyboard) froze completely. Interestingly, network and audio streams (such as Discord voice chat) continued to run on background interrupts, but user-space was completely unresponsive and systemd-journald was unable to write any new entries (journalctl --user -b -e returned empty).

I was able to SSH into the machine and captured a severe kernel hang involving a blocked kworker in state D (uninterruptible sleep). The worker appears to be deadlocked in the eBPF local storage map cleanup path, waiting on srcu_barrier / wait_for_completion under the scx_beerland scheduler.

Captured Kernel Log (dmesg)

[Fri Jun 19 20:14:07 2026] INFO: task kworker/u32:9:271965 blocked for more than 1228 seconds.
[Fri Jun 19 20:14:07 2026]       Tainted: G S         O        7.0.11-1-cachyos #1
[Fri Jun 19 20:14:07 2026] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[Fri Jun 19 20:14:07 2026] task:kworker/u32:9   state:D stack:0     pid:271965 tgid:271965 ppid:2      task_flags:0x4208060 flags:0x00080000
[Fri Jun 19 20:14:07 2026] Workqueue: events_unbound bpf_map_free_deferred
[Fri Jun 19 20:14:07 2026] Sched_ext: beerland_1.1.1_x86_64_unknown_linux_gnu (enabled+all), task: runnable_at=-1320449ms
[Fri Jun 19 20:14:07 2026] Call Trace:
[Fri Jun 19 20:14:07 2026]  <TASK>
[Fri Jun 19 20:14:07 2026]  __schedule+0x72b/0x2100
[Fri Jun 19 20:14:07 2026]  ? wq_worker_running+0xe/0x20
[Fri Jun 19 20:14:07 2026]  ? schedule_timeout+0x33/0x120
[Fri Jun 19 20:14:07 2026]  schedule+0x55/0x180
[Fri Jun 19 20:14:07 2026]  schedule_timeout+0x33/0x120
[Fri Jun 19 20:14:07 2026]  ? synchronize_rcu_normal+0xc4/0x180
[Fri Jun 19 20:14:07 2026]  wait_for_completion+0xbf/0x110
[Fri Jun 19 20:14:07 2026]  srcu_barrier+0x1d2/0x2e0
[Fri Jun 19 20:14:07 2026]  bpf_local_storage_map_free+0xa9/0xd0
[Fri Jun 19 20:14:07 2026]  bpf_map_free+0x84/0x110
[Fri Jun 19 20:14:07 2026]  process_scheduled_works+0x241/0x610
[Fri Jun 19 20:14:07 2026]  worker_thread+0x196/0x3c0
[Fri Jun 19 20:14:07 2026]  ? __pfx_worker_thread+0x10/0x10
[Fri Jun 19 20:14:07 2026]  kthread+0xfb/0x120
[Fri Jun 19 20:14:07 2026]  ? __pfx_kthread+0x10/0x10
[Fri Jun 19 20:14:07 2026]  ret_from_fork+0x10c/0x2c0
[Fri Jun 19 20:14:07 2026]  ? __pfx_kthread+0x10/0x10
[Fri Jun 19 20:14:07 2026]  ret_from_fork_asm+0x1a/0x30
[Fri Jun 19 20:14:07 2026]  </TASK>

Steps to Reproduce

Unspontaneous freeze while using the desktop (running Discord and Sway with scx_beerland active). I had to perform an emergency SysRq reboot via SSH to safely recover.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingkernelExpose a kernel issue

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions