Skip to contentSkip to conversation

BUG: workqueue lockup in update_super_work

syzbot Superseded syzbot 5 participants 8 messages Nov 24 – Nov 30 Workqueue

lore
Share & tools
lore

syzbot

author syzbot
#0 lore raw

Hello,

syzbot found the following issue on:

HEAD commit:    a041bdbe1f3a arm64: Drop stdint.h type overrides from asm/..
git tree:       git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git
console output: https://syzkaller.appspot.com/x/log.txt?x=1410c1d9580000
kernel config:  https://syzkaller.appspot.com/x/.config?x=4e8e6c1701ad8af2
dashboard link: https://syzkaller.appspot.com/bug?extid=97fde463a8ffb9e839d2
compiler:       Debian clang version 22.1.8 (1~deb13u4), Debian LLD 22.1.8
userspace arch: arm64
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=17576985580000

AI-generated root cause summary:
The workqueue watchdog detected a 35-second lockup on CPU 0's per-CPU worker pool (pool 2), where all four busy workers (update_super_work, smc_ib_port_event_work, srcu_invoke_callbacks, and wg_packet_tx_worker) are in TASK_RUNNING (state:R) and switched out at __switch_to, unable to be scheduled onto CPU 0 while CPU 1 (pool 6) continues running normally. Because srcu_invoke_callbacks and smc_ib_port_event_work (which blocked on rtnl_lock) cannot resume on CPU 0, the stall cascades to fsnotify_mark_destroy_workfn (synchronize_srcu), cfg80211_wiphy_work, reg_todo, and batadv_tt_purge. The exact code currently monopolizing CPU 0 cannot be conclusively determined from this report because show_cpu_pool_busy_workers() checks task_is_running() rather than whether a worker is actively executing on the CPU, and therefore skipped trigger_single_cpu_backtrace(0).

full analysis: https://syzkaller.appspot.com/x/ai_root_cause?x=97fde463a8ffb9e839d2

IMPORTANT: if you fix the issue, please add the following tag to the commit:

Reported-by [email protected]
BUG: workqueue lockup - pool cpus=0 node=0 flags=0x0 nice=0 stuck for 5s!

Showing busy workqueues and worker pools:
workqueue events: flags=0x100
pwq 2: cpus=0 node=0 flags=0x0 nice=0 active=6 refcnt=8
in-flight: 4867:update_super_work for 6s
pending: refresh_vm_stats BAR(5070), vmstat_shepherd, 2*nsim_dev_hwstats_traffic_work, free_obj_work
pwq 6: cpus=1 node=0 flags=0x0 nice=0 active=1 refcnt=2
in-flight: 24:request_firmware_work_func for 42s
workqueue mm_percpu_wq: flags=0x108
pwq 2: cpus=0 node=0 flags=0x0 nice=0 active=1 refcnt=2
pending: vmstat_update
workqueue kblockd: flags=0x118
pwq 3: cpus=0 node=0 flags=0x0 nice=-20 active=2 refcnt=3
pending: 2*blk_mq_timeout_work
pool 2: cpus=0 node=0 flags=0x0 nice=0 hung=5s workers=5 idle: 1171 10 1104 9
pool 6: cpus=1 node=0 flags=0x0 nice=0 hung=0s workers=6 idle: 26 4849 876 4848 4769 Showing backtraces of busy workers in stalled worker pools:
pool 2:
task:kworker/0:4 state:R running task stack:0 pid:4867 tgid:4867 ppid:2 task_flags:0x4208060 flags:0x00000010

Workqueue: events update_super_work
Call trace:
 __switch_to+0x2b4/0x6e4 arch/arm64/kernel/process.c:792 (T)
 context_switch kernel/sched/core.c:5583 [inline]
 __schedule+0x1368/0x2b50 kernel/sched/core.c:7382
 __schedule_loop kernel/sched/core.c:7459 [inline]
 schedule+0x13c/0x20c kernel/sched/core.c:7474
 io_schedule+0x1c/0xe0 kernel/sched/core.c:8146
 bit_wait_io+0x1c/0xe8 kernel/sched/wait_bit.c:258
 __wait_on_bit+0xb8/0x178 kernel/sched/wait_bit.c:52
 out_of_line_wait_on_bit+0x130/0x184 kernel/sched/wait_bit.c:67
 wait_on_bit_io include/linux/wait_bit.h:106 [inline]
 __wait_on_buffer+0x6c/0x7c fs/buffer.c:118
 wait_on_buffer include/linux/buffer_head.h:476 [inline]
 ext4_commit_super+0x2b4/0x458 fs/ext4/super.c:6417
 update_super_work+0x2dc/0x384 fs/ext4/super.c:817
 process_one_work kernel/workqueue.c:3495 [inline]
 process_scheduled_works+0x91c/0x1250 kernel/workqueue.c:3578
 worker_thread+0x798/0xbd0 kernel/workqueue.c:3659
 kthread+0x304/0x3d4 kernel/kthread.c:436
 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:854
BUG: workqueue lockup - pool cpus=0 node=0 flags=0x0 nice=0 stuck for 8s!
BUG: workqueue lockup - pool cpus=0 node=0 flags=0x0 nice=-20 stuck for 3s!

Showing busy workqueues and worker pools:
workqueue events: flags=0x100
pwq 2: cpus=0 node=0 flags=0x0 nice=0 active=7 refcnt=9
in-flight: 4867:update_super_work for 9s
pending: refresh_vm_stats BAR(5070), vmstat_shepherd, 2*nsim_dev_hwstats_traffic_work, free_obj_work, psi_avgs_work
pwq 6: cpus=1 node=0 flags=0x0 nice=0 active=1 refcnt=2
in-flight: 24:request_firmware_work_func for 45s
workqueue events_dfl_long: flags=0x2
pwq 8: cpus=0-1 flags=0x4 nice=0 active=1 refcnt=2
pending: defense_work_handler
workqueue mm_percpu_wq: flags=0x108
pwq 2: cpus=0 node=0 flags=0x0 nice=0 active=1 refcnt=2
pending: vmstat_update
workqueue kblockd: flags=0x118
pwq 3: cpus=0 node=0 flags=0x0 nice=-20 active=2 refcnt=3
pending: 2*blk_mq_timeout_work
pool 2: cpus=0 node=0 flags=0x0 nice=0 hung=8s workers=5 idle: 1171 10 1104 9
pool 6: cpus=1 node=0 flags=0x0 nice=0 hung=0s workers=6 idle: 4849 26 876 4848 4769
Showing backtraces of busy workers in stalled worker pools:
pool 2:
task:kworker/0:4 state:R running task stack:0 pid:4867 tgid:4867 ppid:2 task_flags:0x4208060 flags:0x00000010

Workqueue: events update_super_work
Call trace:
 __switch_to+0x2b4/0x6e4 arch/arm64/kernel/process.c:792 (T)
 context_switch kernel/sched/core.c:5583 [inline]
 __schedule+0x1368/0x2b50 kernel/sched/core.c:7382
 __schedule_loop kernel/sched/core.c:7459 [inline]
 schedule+0x13c/0x20c kernel/sched/core.c:7474
 io_schedule+0x1c/0xe0 kernel/sched/core.c:8146
 bit_wait_io+0x1c/0xe8 kernel/sched/wait_bit.c:258
 __wait_on_bit+0xb8/0x178 kernel/sched/wait_bit.c:52
 out_of_line_wait_on_bit+0x130/0x184 kernel/sched/wait_bit.c:67
 wait_on_bit_io include/linux/wait_bit.h:106 [inline]
 __wait_on_buffer+0x6c/0x7c fs/buffer.c:118
 wait_on_buffer include/linux/buffer_head.h:476 [inline]
 ext4_commit_super+0x2b4/0x458 fs/ext4/super.c:6417
 update_super_work+0x2dc/0x384 fs/ext4/super.c:817
 process_one_work kernel/workqueue.c:3495 [inline]
 process_scheduled_works+0x91c/0x1250 kernel/workqueue.c:3578
 worker_thread+0x798/0xbd0 kernel/workqueue.c:3659
 kthread+0x304/0x3d4 kernel/kthread.c:436
 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:854

pool 3: no worker in running state, cpu=0 is busy (nr_workers=2 nr_idle=2) The pool might have trouble waking an idle worker.
Backtrace of last woken worker:
task:kworker/0:1H state:R running task stack:0 pid:4368 tgid:4368 ppid:2 task_flags:0x4208060 flags:0x00000010

Workqueue:  0x0 (kblockd)
Call trace:
 __switch_to+0x2b4/0x6e4 arch/arm64/kernel/process.c:792 (T)
 context_switch kernel/sched/core.c:5583 [inline]
 __schedule+0x1368/0x2b50 kernel/sched/core.c:7382
 __schedule_loop kernel/sched/core.c:7459 [inline]
 schedule+0x13c/0x20c kernel/sched/core.c:7474
 worker_thread+0x924/0xbd0 kernel/workqueue.c:3674
 kthread+0x304/0x3d4 kernel/kthread.c:436
 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:854
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 UID: 0 PID: 5064 Comm: syz-executor298 Not tainted syzkaller #0 PREEMPT 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/06/2026
pstate: 00001000 (nzcv daif -PAN -UAO -TCO -DIT +SSBS BTYPE=--)
pc : 0000ffff92d12354
lr : 0000ffff92c64e84

sp : 0000ffffd134ccf0
x29: 0000ffffd134ccf0 x28: 0000ffff92cb3000 x27: 0000ffff92cb3000
x26: 0000ffff92cb3000 x25: 0000ffff92cb3000 x24: 0000000000000004
x23: 0000ffffd134cdd0 x22: 0000000000000001 x21: 0000ffff92d00000
x20: 0000ffffd134ce90 x19: 0000ffff92d01000 x18: 0000000001503538
x17: 0000000ca3baf921 x16: 0000000000000017 x15: 0000000000800000
x14: 0000000ca3c7df44 x13: 0000000000002490 x12: 000000007fffffff
x11: 0000000000000001 x10: 0000000000000001 x9 : 0000ffff92d0e010 x8 : 0000ffff92d0e000 x7 : 0000000000000000 x6 : 0000000000000000 x5 : 0000000000000000 x4 : 0000000000002490 x3 : 0012c684c0000000 x2 : 0000ffff92d12310 x1 : 0000ffffd134ce90 x0 : 0000000000000001

BUG: workqueue lockup - pool cpus=0 node=0 flags=0x0 nice=0 stuck for 11s!
BUG: workqueue lockup - pool cpus=0 node=0 flags=0x0 nice=-20 stuck for 6s!

Showing busy workqueues and worker pools:
workqueue events: flags=0x100
pwq 2: cpus=0 node=0 flags=0x0 nice=0 active=7 refcnt=9
in-flight: 4867:update_super_work for 12s
pending: refresh_vm_stats BAR(5070), vmstat_shepherd, 2*nsim_dev_hwstats_traffic_work, free_obj_work, psi_avgs_work
pwq 6: cpus=1 node=0 flags=0x0 nice=0 active=1 refcnt=2
in-flight: 24:request_firmware_work_func for 48s
workqueue events_unbound: flags=0x2
pwq 8: cpus=0-1 flags=0x4 nice=0 active=3 refcnt=4
pending: nsim_dev_trap_report_work, toggle_allocation_gate, nsim_dev_trap_report_work
workqueue mm_percpu_wq: flags=0x108
pwq 2: cpus=0 node=0 flags=0x0 nice=0 active=1 refcnt=2
pending: vmstat_update
workqueue kblockd: flags=0x118
pwq 3: cpus=0 node=0 flags=0x0 nice=-20 active=2 refcnt=3
pending: 2*blk_mq_timeout_work
pool 2: cpus=0 node=0 flags=0x0 nice=0 hung=11s workers=5 idle: 1171 10 1104 9
pool 6: cpus=1 node=0 flags=0x0 nice=0 hung=0s workers=6 idle: 4849 26 876 4848 4769
Showing backtraces of busy workers in stalled worker pools:
pool 2:
task:kworker/0:4 state:R running task stack:0 pid:4867 tgid:4867 ppid:2 task_flags:0x4208060 flags:0x00000010

Workqueue: events update_super_work
Call trace:
 __switch_to+0x2b4/0x6e4 arch/arm64/kernel/process.c:792 (T)
 context_switch kernel/sched/core.c:5583 [inline]
 __schedule+0x1368/0x2b50 kernel/sched/core.c:7382
 __schedule_loop kernel/sched/core.c:7459 [inline]
 schedule+0x13c/0x20c kernel/sched/core.c:7474
 io_schedule+0x1c/0xe0 kernel/sched/core.c:8146
 bit_wait_io+0x1c/0xe8 kernel/sched/wait_bit.c:258
 __wait_on_bit+0xb8/0x178 kernel/sched/wait_bit.c:52
 out_of_line_wait_on_bit+0x130/0x184 kernel/sched/wait_bit.c:67
 wait_on_bit_io include/linux/wait_bit.h:106 [inline]
 __wait_on_buffer+0x6c/0x7c fs/buffer.c:118
 wait_on_buffer include/linux/buffer_head.h:476 [inline]
 ext4_commit_super+0x2b4/0x458 fs/ext4/super.c:6417
 update_super_work+0x2dc/0x384 fs/ext4/super.c:817
 process_one_work kernel/workqueue.c:3495 [inline]
 process_scheduled_works+0x91c/0x1250 kernel/workqueue.c:3578
 worker_thread+0x798/0xbd0 kernel/workqueue.c:3659
 kthread+0x304/0x3d4 kernel/kthread.c:436
 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:854

pool 3: no worker in running state, cpu=0 is busy (nr_workers=2 nr_idle=2) The pool might have trouble waking an idle worker.
Backtrace of last woken worker:
task:kworker/0:1H state:R running task stack:0 pid:4368 tgid:4368 ppid:2 task_flags:0x4208060 flags:0x00000010

Workqueue:  0x0 (kblockd)
Call trace:
 __switch_to+0x2b4/0x6e4 arch/arm64/kernel/process.c:792 (T)
 context_switch kernel/sched/core.c:5583 [inline]
 __schedule+0x1368/0x2b50 kernel/sched/core.c:7382
 __schedule_loop kernel/sched/core.c:7459 [inline]
 schedule+0x13c/0x20c kernel/sched/core.c:7474
 worker_thread+0x924/0xbd0 kernel/workqueue.c:3674
 kthread+0x304/0x3d4 kernel/kthread.c:436
 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:854
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 UID: 0 PID: 5064 Comm: syz-executor298 Not tainted syzkaller #0 PREEMPT 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/06/2026
pstate: 00001000 (nzcv daif -PAN -UAO -TCO -DIT +SSBS BTYPE=--)
pc : 0000ffff92d12364
lr : 0000ffff92c64e84

sp : 0000ffffd134ccf0
x29: 0000ffffd134ccf0 x28: 0000ffff92cb3000 x27: 0000ffff92cb3000
x26: 0000ffff92cb3000 x25: 0000ffff92cb3000 x24: 0000000000000004
x23: 0000ffffd134cdd0 x22: 0000000000000001 x21: 0000ffff92d00000
x20: 0000ffffd134ce90 x19: 0000ffff92d01000 x18: 0000000001503538
x17: 0000000d5ab774a1 x16: 0000000000000017 x15: 0000000000800000
x14: 0000000d5ac496d8 x13: 00000000000026f6 x12: 000000007fffffff
x11: 0000000000000001 x10: 0000ffffd134ccf0 x9 : 0000ffff92d0e010 x8 : 0000ffff92d0e000 x7 : 0000000000000000 x6 : 0000000000000000 x5 : 0000000000000000 x4 : 00000000000026f6 x3 : 0014dc9380000000 x2 : 0000ffff92d12310 x1 : 0000ffffd134ce90 x0 : 0000000000000001

---
This report is generated by a bot. It may contain errors. See https://goo.gl/tpsmEJ for more information about syzbot. syzbot engineers can be reached at [email protected].

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup

#1 lore raw
Quoted 14 lines

Date: Tue, 24 Nov 2026 03:36:26 -0800
Hello,

syzbot found the following issue on:

HEAD commit:    a041bdbe1f3a arm64: Drop stdint.h type overrides from asm/..
git tree:       git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git
console output: https://syzkaller.appspot.com/x/log.txt?x=1410c1d9580000
kernel config:  https://syzkaller.appspot.com/x/.config?x=4e8e6c1701ad8af2
dashboard link: https://syzkaller.appspot.com/bug?extid=97fde463a8ffb9e839d2
compiler:       Debian clang version 22.1.8 (1~deb13u4), Debian LLD 22.1.8
userspace arch: arm64
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=17576985580000
Quoted 15 lines

AI-generated root cause summary:
The workqueue watchdog detected a 35-second lockup on CPU 0's per-CPU worker pool (pool 2), where all four busy workers (update_super_work, smc_ib_port_event_work, srcu_invoke_callbacks, and wg_packet_tx_worker) are in TASK_RUNNING (state:R) and switched out at __switch_to, unable to be scheduled onto CPU 0 while CPU 1 (pool 6) continues running normally. Because srcu_invoke_callbacks and smc_ib_port_event_work (which blocked on rtnl_lock) cannot resume on CPU 0, the stall cascades to fsnotify_mark_destroy_workfn (synchronize_srcu), cfg80211_wiphy_work, reg_todo, and batadv_tt_purge. The exact code currently monopolizing CPU 0 cannot be conclusively determined from this report because show_cpu_pool_busy_workers() checks task_is_running() rather than whether a worker is actively executing on the CPU, and therefore skipped trigger_single_cpu_backtrace(0).

Incorrect, given the print -- The pool might have trouble waking an idle worker.

Quoted 197 lines

full analysis: https://syzkaller.appspot.com/x/ai_root_cause?x=97fde463a8ffb9e839d2

IMPORTANT: if you fix the issue, please add the following tag to the commit:

Reported-by [email protected]
BUG: workqueue lockup - pool cpus=0 node=0 flags=0x0 nice=0 stuck for 5s!

Showing busy workqueues and worker pools:
workqueue events: flags=0x100
pwq 2: cpus=0 node=0 flags=0x0 nice=0 active=6 refcnt=8
in-flight: 4867:update_super_work for 6s
pending: refresh_vm_stats BAR(5070), vmstat_shepherd, 2*nsim_dev_hwstats_traffic_work, free_obj_work
pwq 6: cpus=1 node=0 flags=0x0 nice=0 active=1 refcnt=2
in-flight: 24:request_firmware_work_func for 42s
workqueue mm_percpu_wq: flags=0x108
pwq 2: cpus=0 node=0 flags=0x0 nice=0 active=1 refcnt=2
pending: vmstat_update
workqueue kblockd: flags=0x118
pwq 3: cpus=0 node=0 flags=0x0 nice=-20 active=2 refcnt=3
pending: 2*blk_mq_timeout_work
pool 2: cpus=0 node=0 flags=0x0 nice=0 hung=5s workers=5 idle: 1171 10 1104 9
pool 6: cpus=1 node=0 flags=0x0 nice=0 hung=0s workers=6 idle: 26 4849 876 4848 4769 Showing backtraces of busy workers in stalled worker pools:
pool 2:
task:kworker/0:4 state:R running task stack:0 pid:4867 tgid:4867 ppid:2 task_flags:0x4208060 flags:0x00000010

Workqueue: events update_super_work
Call trace:
 __switch_to+0x2b4/0x6e4 arch/arm64/kernel/process.c:792 (T)
 context_switch kernel/sched/core.c:5583 [inline]
 __schedule+0x1368/0x2b50 kernel/sched/core.c:7382
 __schedule_loop kernel/sched/core.c:7459 [inline]
 schedule+0x13c/0x20c kernel/sched/core.c:7474
 io_schedule+0x1c/0xe0 kernel/sched/core.c:8146
 bit_wait_io+0x1c/0xe8 kernel/sched/wait_bit.c:258
 __wait_on_bit+0xb8/0x178 kernel/sched/wait_bit.c:52
 out_of_line_wait_on_bit+0x130/0x184 kernel/sched/wait_bit.c:67
 wait_on_bit_io include/linux/wait_bit.h:106 [inline]
 __wait_on_buffer+0x6c/0x7c fs/buffer.c:118
 wait_on_buffer include/linux/buffer_head.h:476 [inline]
 ext4_commit_super+0x2b4/0x458 fs/ext4/super.c:6417
 update_super_work+0x2dc/0x384 fs/ext4/super.c:817
 process_one_work kernel/workqueue.c:3495 [inline]
 process_scheduled_works+0x91c/0x1250 kernel/workqueue.c:3578
 worker_thread+0x798/0xbd0 kernel/workqueue.c:3659
 kthread+0x304/0x3d4 kernel/kthread.c:436
 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:854
BUG: workqueue lockup - pool cpus=0 node=0 flags=0x0 nice=0 stuck for 8s!
BUG: workqueue lockup - pool cpus=0 node=0 flags=0x0 nice=-20 stuck for 3s!

Showing busy workqueues and worker pools:
workqueue events: flags=0x100
pwq 2: cpus=0 node=0 flags=0x0 nice=0 active=7 refcnt=9
in-flight: 4867:update_super_work for 9s
pending: refresh_vm_stats BAR(5070), vmstat_shepherd, 2*nsim_dev_hwstats_traffic_work, free_obj_work, psi_avgs_work
pwq 6: cpus=1 node=0 flags=0x0 nice=0 active=1 refcnt=2
in-flight: 24:request_firmware_work_func for 45s
workqueue events_dfl_long: flags=0x2
pwq 8: cpus=0-1 flags=0x4 nice=0 active=1 refcnt=2
pending: defense_work_handler
workqueue mm_percpu_wq: flags=0x108
pwq 2: cpus=0 node=0 flags=0x0 nice=0 active=1 refcnt=2
pending: vmstat_update
workqueue kblockd: flags=0x118
pwq 3: cpus=0 node=0 flags=0x0 nice=-20 active=2 refcnt=3
pending: 2*blk_mq_timeout_work
pool 2: cpus=0 node=0 flags=0x0 nice=0 hung=8s workers=5 idle: 1171 10 1104 9
pool 6: cpus=1 node=0 flags=0x0 nice=0 hung=0s workers=6 idle: 4849 26 876 4848 4769
Showing backtraces of busy workers in stalled worker pools:
pool 2:
task:kworker/0:4 state:R running task stack:0 pid:4867 tgid:4867 ppid:2 task_flags:0x4208060 flags:0x00000010

Workqueue: events update_super_work
Call trace:
 __switch_to+0x2b4/0x6e4 arch/arm64/kernel/process.c:792 (T)
 context_switch kernel/sched/core.c:5583 [inline]
 __schedule+0x1368/0x2b50 kernel/sched/core.c:7382
 __schedule_loop kernel/sched/core.c:7459 [inline]
 schedule+0x13c/0x20c kernel/sched/core.c:7474
 io_schedule+0x1c/0xe0 kernel/sched/core.c:8146
 bit_wait_io+0x1c/0xe8 kernel/sched/wait_bit.c:258
 __wait_on_bit+0xb8/0x178 kernel/sched/wait_bit.c:52
 out_of_line_wait_on_bit+0x130/0x184 kernel/sched/wait_bit.c:67
 wait_on_bit_io include/linux/wait_bit.h:106 [inline]
 __wait_on_buffer+0x6c/0x7c fs/buffer.c:118
 wait_on_buffer include/linux/buffer_head.h:476 [inline]
 ext4_commit_super+0x2b4/0x458 fs/ext4/super.c:6417
 update_super_work+0x2dc/0x384 fs/ext4/super.c:817
 process_one_work kernel/workqueue.c:3495 [inline]
 process_scheduled_works+0x91c/0x1250 kernel/workqueue.c:3578
 worker_thread+0x798/0xbd0 kernel/workqueue.c:3659
 kthread+0x304/0x3d4 kernel/kthread.c:436
 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:854

pool 3: no worker in running state, cpu=0 is busy (nr_workers=2 nr_idle=2) The pool might have trouble waking an idle worker.
Backtrace of last woken worker:
task:kworker/0:1H state:R running task stack:0 pid:4368 tgid:4368 ppid:2 task_flags:0x4208060 flags:0x00000010

Workqueue:  0x0 (kblockd)
Call trace:
 __switch_to+0x2b4/0x6e4 arch/arm64/kernel/process.c:792 (T)
 context_switch kernel/sched/core.c:5583 [inline]
 __schedule+0x1368/0x2b50 kernel/sched/core.c:7382
 __schedule_loop kernel/sched/core.c:7459 [inline]
 schedule+0x13c/0x20c kernel/sched/core.c:7474
 worker_thread+0x924/0xbd0 kernel/workqueue.c:3674
 kthread+0x304/0x3d4 kernel/kthread.c:436
 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:854
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 UID: 0 PID: 5064 Comm: syz-executor298 Not tainted syzkaller #0 PREEMPT 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/06/2026
pstate: 00001000 (nzcv daif -PAN -UAO -TCO -DIT +SSBS BTYPE=--)
pc : 0000ffff92d12354
lr : 0000ffff92c64e84

sp : 0000ffffd134ccf0
x29: 0000ffffd134ccf0 x28: 0000ffff92cb3000 x27: 0000ffff92cb3000
x26: 0000ffff92cb3000 x25: 0000ffff92cb3000 x24: 0000000000000004
x23: 0000ffffd134cdd0 x22: 0000000000000001 x21: 0000ffff92d00000
x20: 0000ffffd134ce90 x19: 0000ffff92d01000 x18: 0000000001503538
x17: 0000000ca3baf921 x16: 0000000000000017 x15: 0000000000800000
x14: 0000000ca3c7df44 x13: 0000000000002490 x12: 000000007fffffff
x11: 0000000000000001 x10: 0000000000000001 x9 : 0000ffff92d0e010 x8 : 0000ffff92d0e000 x7 : 0000000000000000 x6 : 0000000000000000 x5 : 0000000000000000 x4 : 0000000000002490 x3 : 0012c684c0000000 x2 : 0000ffff92d12310 x1 : 0000ffffd134ce90 x0 : 0000000000000001

BUG: workqueue lockup - pool cpus=0 node=0 flags=0x0 nice=0 stuck for 11s!
BUG: workqueue lockup - pool cpus=0 node=0 flags=0x0 nice=-20 stuck for 6s!

Showing busy workqueues and worker pools:
workqueue events: flags=0x100
pwq 2: cpus=0 node=0 flags=0x0 nice=0 active=7 refcnt=9
in-flight: 4867:update_super_work for 12s
pending: refresh_vm_stats BAR(5070), vmstat_shepherd, 2*nsim_dev_hwstats_traffic_work, free_obj_work, psi_avgs_work
pwq 6: cpus=1 node=0 flags=0x0 nice=0 active=1 refcnt=2
in-flight: 24:request_firmware_work_func for 48s
workqueue events_unbound: flags=0x2
pwq 8: cpus=0-1 flags=0x4 nice=0 active=3 refcnt=4
pending: nsim_dev_trap_report_work, toggle_allocation_gate, nsim_dev_trap_report_work
workqueue mm_percpu_wq: flags=0x108
pwq 2: cpus=0 node=0 flags=0x0 nice=0 active=1 refcnt=2
pending: vmstat_update
workqueue kblockd: flags=0x118
pwq 3: cpus=0 node=0 flags=0x0 nice=-20 active=2 refcnt=3
pending: 2*blk_mq_timeout_work
pool 2: cpus=0 node=0 flags=0x0 nice=0 hung=11s workers=5 idle: 1171 10 1104 9
pool 6: cpus=1 node=0 flags=0x0 nice=0 hung=0s workers=6 idle: 4849 26 876 4848 4769
Showing backtraces of busy workers in stalled worker pools:
pool 2:
task:kworker/0:4 state:R running task stack:0 pid:4867 tgid:4867 ppid:2 task_flags:0x4208060 flags:0x00000010

Workqueue: events update_super_work
Call trace:
 __switch_to+0x2b4/0x6e4 arch/arm64/kernel/process.c:792 (T)
 context_switch kernel/sched/core.c:5583 [inline]
 __schedule+0x1368/0x2b50 kernel/sched/core.c:7382
 __schedule_loop kernel/sched/core.c:7459 [inline]
 schedule+0x13c/0x20c kernel/sched/core.c:7474
 io_schedule+0x1c/0xe0 kernel/sched/core.c:8146
 bit_wait_io+0x1c/0xe8 kernel/sched/wait_bit.c:258
 __wait_on_bit+0xb8/0x178 kernel/sched/wait_bit.c:52
 out_of_line_wait_on_bit+0x130/0x184 kernel/sched/wait_bit.c:67
 wait_on_bit_io include/linux/wait_bit.h:106 [inline]
 __wait_on_buffer+0x6c/0x7c fs/buffer.c:118
 wait_on_buffer include/linux/buffer_head.h:476 [inline]
 ext4_commit_super+0x2b4/0x458 fs/ext4/super.c:6417
 update_super_work+0x2dc/0x384 fs/ext4/super.c:817
 process_one_work kernel/workqueue.c:3495 [inline]
 process_scheduled_works+0x91c/0x1250 kernel/workqueue.c:3578
 worker_thread+0x798/0xbd0 kernel/workqueue.c:3659
 kthread+0x304/0x3d4 kernel/kthread.c:436
 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:854

pool 3: no worker in running state, cpu=0 is busy (nr_workers=2 nr_idle=2) The pool might have trouble waking an idle worker.
Backtrace of last woken worker:
task:kworker/0:1H state:R running task stack:0 pid:4368 tgid:4368 ppid:2 task_flags:0x4208060 flags:0x00000010

Workqueue:  0x0 (kblockd)
Call trace:
 __switch_to+0x2b4/0x6e4 arch/arm64/kernel/process.c:792 (T)
 context_switch kernel/sched/core.c:5583 [inline]
 __schedule+0x1368/0x2b50 kernel/sched/core.c:7382
 __schedule_loop kernel/sched/core.c:7459 [inline]
 schedule+0x13c/0x20c kernel/sched/core.c:7474
 worker_thread+0x924/0xbd0 kernel/workqueue.c:3674
 kthread+0x304/0x3d4 kernel/kthread.c:436
 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:854
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 UID: 0 PID: 5064 Comm: syz-executor298 Not tainted syzkaller #0 PREEMPT 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/06/2026
pstate: 00001000 (nzcv daif -PAN -UAO -TCO -DIT +SSBS BTYPE=--)
pc : 0000ffff92d12364
lr : 0000ffff92c64e84

sp : 0000ffffd134ccf0
x29: 0000ffffd134ccf0 x28: 0000ffff92cb3000 x27: 0000ffff92cb3000
x26: 0000ffff92cb3000 x25: 0000ffff92cb3000 x24: 0000000000000004
x23: 0000ffffd134cdd0 x22: 0000000000000001 x21: 0000ffff92d00000
x20: 0000ffffd134ce90 x19: 0000ffff92d01000 x18: 0000000001503538
x17: 0000000d5ab774a1 x16: 0000000000000017 x15: 0000000000800000
x14: 0000000d5ac496d8 x13: 00000000000026f6 x12: 000000007fffffff
x11: 0000000000000001 x10: 0000ffffd134ccf0 x9 : 0000ffff92d0e010 x8 : 0000ffff92d0e000 x7 : 0000000000000000 x6 : 0000000000000000 x5 : 0000000000000000 x4 : 00000000000026f6 x3 : 0014dc9380000000 x2 : 0000ffff92d12310 x1 : 0000ffffd134ce90 x0 : 0000000000000001

#2 lore raw

PATCH 1/1 workqueue: Avoid noise generated by real-time tasks

In reply to syzbot

A user creates a SCHED_FIFO real-time thread and pins it to CPU0, and arm watchdog timer on CPU1 with 3s threshold. The real-time thread runs for an extended period without voluntarily yielding the CPU, preventing standard kworker threads on CPU0 from gaining access to the processor.

As a result, certain kernel works cannot be executed in a timely manner, which may even trigger a watchdog report:

BUG: workqueue lockup - pool cpus=0 node=0 flags=0x0 nice=0 stuck for 5s!

Showing busy workqueues and worker pools:
workqueue mm_percpu_wq: flags=0x108
pwq 2: cpus=0 node=0 flags=0x0 nice=0 active=1 refcnt=2
pending: vmstat_update

To address this, a check for CPU-bound tasks has been added to the work pool; this helps prevent false-positive reports caused by prolonged CPU occupancy by real-time tasks.

Fixes 82607adcf9cd ("workqueue: implement lockup detector")
Reported-by [email protected]
---
 kernel/workqueue.c | 8 ++++++++
 1 file changed, 8 insertions(+)
kernel/workqueue.c +8 -0
index af845214e78b..daf7aad79062 100644
@@ -52,6 +52,7 @@
 #include <linux/uaccess.h>
 #include <linux/sched/isolation.h>
 #include <linux/sched/debug.h>
+#include <sched/sched.h>
 #include <linux/nmi.h>
 #include <linux/kvm_para.h>
 #include <linux/delay.h>
@@ -8202,6 +8203,8 @@ static void wq_watchdog_timer_fn(struct timer_list *unused)
 		 * is a hotter path.
 		 */
 		if (time_after(now, ts + thresh)) {
+			struct task_struct *p;
+
 			scoped_guard(raw_spinlock_irqsave, &pool->lock) {
 				pool_ts = pool->last_progress_ts;
 				if (time_after(pool_ts, touched))
@@ -8212,6 +8215,11 @@ static void wq_watchdog_timer_fn(struct timer_list *unused)
 			if (!time_after(now, ts + thresh))
 				continue;
 
+			p = pool->cpu >= 0 ? cpu_curr(pool->cpu) : NULL;
+			if (p && (p->policy == SCHED_FIFO ||
+				  p->policy == SCHED_RR))
+				continue;
+
 			lockup_detected = true;
 			stall_time = jiffies_to_msecs(now - pool_ts) / 1000;
 			max_stall_time = max(max_stall_time, stall_time);
Signature · 1 line
2.43.0
maintainer
#3 lore raw

Re: [PATCH] workqueue: Avoid noise generated by real-time tasks

Quoted 9 lines · Edward Adam Davis

A user creates a SCHED_FIFO real-time thread and pins it to CPU0, and arm watchdog timer on CPU1 with 3s threshold. The real-time thread runs for an extended period without voluntarily yielding the CPU, preventing standard kworker threads on CPU0 from gaining access to the processor.

As a result, certain kernel works cannot be executed in a timely manner, which may even trigger a watchdog report:

BUG: workqueue lockup - pool cpus=0 node=0 flags=0x0 nice=0 stuck for 5s!
Quoted 8 lines

Showing busy workqueues and worker pools:
workqueue mm_percpu_wq: flags=0x108
pwq 2: cpus=0 node=0 flags=0x0 nice=0 active=1 refcnt=2
pending: vmstat_update

To address this, a check for CPU-bound tasks has been added to the work pool; this helps prevent false-positive reports caused by prolonged CPU occupancy by real-time tasks.

Workqueue did lock up tho? This is one of the conditions that the mechanism is intended to warn about.

Signature · 1 line
tejun
#4 lore raw

Re: [PATCH] workqueue: Avoid noise generated by real-time tasks

From: Edward Aadm Davis <[email protected]>

Quoted 14 lines · Tejun Heo
Quoted 14 lines

A user creates a SCHED_FIFO real-time thread and pins it to CPU0, and arm watchdog timer on CPU1 with 3s threshold. The real-time thread runs for an extended period without voluntarily yielding the CPU, preventing standard kworker threads on CPU0 from gaining access to the processor.

As a result, certain kernel works cannot be executed in a timely manner, which may even trigger a watchdog report:

BUG: workqueue lockup - pool cpus=0 node=0 flags=0x0 nice=0 stuck for 5s!

Showing busy workqueues and worker pools:
workqueue mm_percpu_wq: flags=0x108
pwq 2: cpus=0 node=0 flags=0x0 nice=0 active=1 refcnt=2
pending: vmstat_update

Quoted 6 lines
Quoted 3 lines

To address this, a check for CPU-bound tasks has been added to the work pool; this helps prevent false-positive reports caused by prolonged CPU occupancy by real-time tasks.

Workqueue did lock up tho? This is one of the conditions that the mechanism is intended to warn about.

For userspace realtime tasks, the mechanism same?

BR,
Edward

#5 lore raw

PATCH v2 1/1 workqueue: Avoid noise generated by userspace realtime tasks

In reply to Edward Adam Davis

A user creates a SCHED_FIFO real-time thread and pins it to CPU0, and arm watchdog timer on CPU1 with 3s threshold. The real-time thread runs for an extended period without voluntarily yielding the CPU, preventing standard kworker threads on CPU0 from gaining access to the processor.

As a result, certain kernel works cannot be executed in a timely manner, which may even trigger a watchdog report:

BUG: workqueue lockup - pool cpus=0 node=0 flags=0x0 nice=0 stuck for 5s!

Showing busy workqueues and worker pools:
workqueue mm_percpu_wq: flags=0x108
pwq 2: cpus=0 node=0 flags=0x0 nice=0 active=1 refcnt=2
pending: vmstat_update

To address this, a check for CPU-bound tasks has been added to the work pool; this helps prevent false-positive reports caused by prolonged CPU occupancy by real-time tasks.

Fixes 82607adcf9cd ("workqueue: implement lockup detector")
Reported-by [email protected]

---
v1 -> v2:
1. update subject
2. use cpu_curr_snapshot_rcu() to get stall cpu's current task
3. Exclude cases where tasks running on a stalled CPU are kernel threads
4. not for RT kernel

 kernel/workqueue.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
kernel/workqueue.c +17 -0
index baadc7815585..9bd9cccdf3cf 100644
@@ -8287,6 +8287,23 @@ static void wq_watchdog_timer_fn(struct timer_list *unused)
 			if (!time_after(now, ts + thresh))
 				continue;
 
+			if (!IS_ENABLED(CONFIG_PREEMPT_RT)) {
+				struct task_struct *p;
+				unsigned int policy;
+				int cpu;
+
+				cpu = pool->cpu;
+				if (cpu >= 0 && !(pool->flags & POOL_DISASSOCIATED)) {
+					guard(rcu)();
+					p = cpu_curr_snapshot_rcu(cpu);
+					if (p && !(p->flags & PF_KTHREAD)) {
+						policy = READ_ONCE(p->policy);
+						if (policy == SCHED_FIFO ||
+						    policy == SCHED_RR)
+							continue;
+					}
+				}
+			}
 			lockup_detected = true;
 			stall_time = jiffies_to_msecs(now - pool_ts) / 1000;
 			max_stall_time = max(max_stall_time, stall_time);
Signature · 1 line
2.43.0
#6 lore raw

Re: [PATCH] workqueue: Avoid noise generated by real-time tasks

In reply to Edward Adam Davis
kernel test robot noticed the following build warnings:

Hi Edward,

kernel test robot noticed the following build warnings:

[auto build test WARNING on tj-wq/for-next]
[also build test WARNING on linus/master v7.4-rc4 next-20261127] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Edward-Adam-Davis/workqueue-Avoid-noise-generated-by-real-time-tasks/20261126-182530
base:   https://git.kernel.org/pub/scm/linux/kernel/git/tj/wq.git for-next
patch link:    https://lore.kernel.org/r/20261126102530.37205-1-eadavis%40sina.com
patch subject: [PATCH] workqueue: Avoid noise generated by real-time tasks
config: powerpc64-randconfig-r2301-20261129 (https://download.01.org/0day-ci/archive/20261129/[email protected]/config)
compiler: powerpc64-linux-gcc (GCC) 10.5.0
sparse: v0.6.5-rc1-21-g84ec0658
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261129/[email protected]/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

sparse warnings: (new ones prefixed by >>)

>> kernel/workqueue.c:8319:27: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct task_struct *p @@     got struct task_struct [noderef] __rcu * @@

kernel/workqueue.c:8319:27: sparse: expected struct task_struct *p
kernel/workqueue.c:8319:27: sparse: got struct task_struct [noderef] __rcu *

vim +8319 kernel/workqueue.c

8254
8255 static void wq_watchdog_timer_fn(struct timer_list *unused)
8256 {
8257 unsigned long thresh = READ_ONCE(wq_watchdog_thresh) * HZ;
8258 unsigned int max_stall_time = 0;
8259 bool lockup_detected = false;
8260 bool cpu_pool_stall = false;
8261 unsigned long now = jiffies;
8262 struct worker_pool *pool;
8263 unsigned int stall_time;
8264 int pi;
8265
8266 if (!thresh)
8267 return;
8268
8269 for_each_pool(pool, pi) {
8270 unsigned long pool_ts, touched, ts;
8271
8272 pool->cpu_stall = false;
8273 if (list_empty(&pool->worklist))
8274 continue;
8275
8276 /*
8277 * If a virtual machine is stopped by the host it can look to
8278 * the watchdog like a stall.
8279 */
8280 kvm_check_and_clear_guest_paused();
8281
8282 /* get the latest of pool and touched timestamps */
8283 if (pool->cpu >= 0)
8284 touched = READ_ONCE(per_cpu(wq_watchdog_touched_cpu, pool->cpu));
8285 else
8286 touched = READ_ONCE(wq_watchdog_touched);
8287 pool_ts = READ_ONCE(pool->last_progress_ts);
8288
8289 if (time_after(pool_ts, touched))
8290 ts = pool_ts;
8291 else
8292 ts = touched;
8293
8294 /*
8295 * Did we stall?
8296 *
8297 * Do a lockless check first to do not disturb the system.
8298 *
8299 * Prevent false positives by double checking the timestamp
8300 * under pool->lock. The lock makes sure that the check reads
8301 * an updated pool->last_progress_ts when this CPU saw
8302 * an already updated pool->worklist above. It seems better
8303 * than adding another barrier into __queue_work() which
8304 * is a hotter path.
8305 */
8306 if (time_after(now, ts + thresh)) {
8307 struct task_struct *p;
8308
8309 scoped_guard(raw_spinlock_irqsave, &pool->lock) {
8310 pool_ts = pool->last_progress_ts;
8311 if (time_after(pool_ts, touched))
8312 ts = pool_ts;
8313 else
8314 ts = touched;
8315 }
8316 if (!time_after(now, ts + thresh))
8317 continue;
8318

> 8319				p = pool->cpu >= 0 ? cpu_curr(pool->cpu) : NULL;

8320 if (p && (p->policy == SCHED_FIFO ||
8321 p->policy == SCHED_RR))
8322 continue;
8323
8324 lockup_detected = true;
8325 stall_time = jiffies_to_msecs(now - pool_ts) / 1000;
8326 max_stall_time = max(max_stall_time, stall_time);
8327 if (is_percpu_pool(pool) && !(pool->flags & POOL_BH)) {
8328 pool->cpu_stall = true;
8329 cpu_pool_stall = true;
8330 }
8331 pr_emerg("BUG: workqueue lockup - pool");
8332 pr_cont_pool_info(pool);
8333 pr_cont(" stuck for %us!\n", stall_time);
8334 }
8335 }
8336
8337 if (lockup_detected)
8338 show_all_workqueues();
8339
8340 if (cpu_pool_stall)
8341 show_cpu_pools_busy_workers();
8342
8343 if (lockup_detected)
8344 panic_on_wq_watchdog(max_stall_time);
8345
8346 wq_watchdog_reset_touched();
8347 mod_timer(&wq_watchdog_timer, jiffies + thresh);
8348 }
8349

Signature · 2 lines
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
#7 lore raw

Re: [PATCH] workqueue: Avoid noise generated by real-time tasks

In reply to Edward Adam Davis
kernel test robot noticed the following build errors:

Hi Edward,

kernel test robot noticed the following build errors:

[auto build test ERROR on tj-wq/for-next]
[also build test ERROR on linus/master v7.4-rc5 next-20261127] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Edward-Adam-Davis/workqueue-Avoid-noise-generated-by-real-time-tasks/20261126-182530
base:   https://git.kernel.org/pub/scm/linux/kernel/git/tj/wq.git for-next
patch link:    https://lore.kernel.org/r/20261126102530.37205-1-eadavis%40sina.com
patch subject: [PATCH] workqueue: Avoid noise generated by real-time tasks
config: s390-allnoconfig-bpf (https://download.01.org/0day-ci/archive/20261130/[email protected]/config)
compiler: s390x-linux-gnu-gcc (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261130/[email protected]/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All errors (new ones prefixed by >>):

>> kernel/workqueue.c:56:10: fatal error: sched/sched.h: No such file or directory
      56 | #include <sched/sched.h>
         |          ^~~~~~~~~~~~~~~

compilation terminated.

vim +56 kernel/workqueue.c

  > 56	#include <sched/sched.h>
    57	#include <linux/nmi.h>
    58	#include <linux/kvm_para.h>
    59	#include <linux/delay.h>
    60	#include <linux/irq_work.h>
    61	#include <linux/math64.h>
    62	
Signature · 2 lines
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki