[BUG] INFO: task hung in gfs2_glock_nq (v7.4-rc3)

From: Zheng Zheng

Date: Tue Nov 17 2026 - 06:56:14 EST


Hi Andreas,

We found a reproducible GFS2 task hang on mainline v7.4-rc3 with
syzkaller.

The hang is reported by the kernel's hung-task detector (khungtaskd), not
by the test harness. A task sits in D state on a GFS2 glock and the kernel
prints:

[ 331.476369][ T44] INFO: task syz-executor:10136 blocked for
more than 143 seconds.
[ 331.476395][ T44] Tainted: G EL
7.4.0-rc3-kernsight-kasan #1
[ 331.476415][ T44] task:syz-executor state:D stack:22904
pid:10136 tgid:10136 ppid:1
[ 331.476466][ T44] Call Trace:
[ 331.476472][ T44] <TASK>
[ 331.476489][ T44] __schedule+0x1405/0x7510
[ 331.478052][ T44] bit_wait+0x1a/0x130
[ 331.478073][ T44] __wait_on_bit+0x6f/0x1b0
[ 331.478127][ T44] out_of_line_wait_on_bit+0xdf/0x110
[ 331.478237][ T44] gfs2_glock_wait+0xaa/0x2e0
[ 331.478267][ T44] gfs2_glock_nq+0xd0b/0x17b0
[ 331.478312][ T44] __gfs2_lookup+0x10f/0x2a0
[ 331.478360][ T44] __lookup_slow+0x15b/0x330
[ 331.478509][ T44] lookup_slow+0x59/0x80
[ 331.478532][ T44] path_lookupat+0x603/0xb80
[ 331.478568][ T44] filename_lookup+0x218/0x5f0
[ 331.478767][ T44] user_path_at+0x45/0x90
[ 331.478794][ T44] __x64_sys_umount+0x100/0x190
[ 331.478871][ T44] do_syscall_64+0x132/0x7c0
[ 331.478898][ T44] entry_SYSCALL_64_after_hwframe+0x77/0x7f

The blocked task is unmounting a crafted GFS2 filesystem. It enters
__gfs2_lookup(), calls gfs2_glock_nq_init()/gfs2_glock_nq(), and waits in
gfs2_glock_wait() for a glock that does not make progress. The guest runs
with hung_task_panic=0, so this is a hang report rather than a panic.

Stable reproduction on mainline v7.4-rc3:

1. Build vanilla v7.4-rc3 with:
CONFIG_KASAN=y
CONFIG_PROVE_LOCKING=y
CONFIG_GFS2_FS=y
CONFIG_DEBUG_INFO=y
The bzImage used here has sha256
0c16409f8aec508ac44a63e631c2bd352536401f3fd0856df1d839fb953a1882.

2. Boot a Debian trixie x86_64 guest (6 GiB RAM, 4 vCPU, KVM) with at least:
root=/dev/sda console=ttyS0 oops=panic panic_on_warn=1 hung_task_panic=0
The full QEMU command line is in environment.txt.

3. Copy syz-execprog and syz-executor built from syzkaller commit
853b104bb454141a5b0fc0e4218ec78e9f34ffb1, plus
reproducer/repro.kernsight.prog, into the guest.

4. In the guest, as root, run:

syz-execprog -procs=8 -threaded -repeat=0 \
-executor ./syz-executor repro.kernsight.prog

5. Wait for the kernel hung-task detector to print
"INFO: task ... blocked for more than 143 seconds" with the
gfs2_glock_nq / gfs2_glock_wait stack.

The outer timeout is only used to stop the -repeat=0 loop; it is not the
success criterion. We observed the kernel hung-task report 2/2 on fresh VMs:

Run 1: 331.48 s after boot (blocked > 143 s)
Run 2: 290.82 s after boot (blocked > 143 s)

Both runs show the same gfs2_glock_wait -> gfs2_glock_nq ->
__gfs2_lookup -> ksys_umount stack.

The pipeline-provided recipe is a 183-entry state-reconstruction recipe; it
builds the needed glock state by repeated replay.

Repository contents (all v7.4-rc3):

https://github.com/Zheng-zheng-codes/gfs2-glock-nq-hang

- README.md: phenomenon, kernel hung-task semantics, reproduction steps
and verification results.
- environment.txt: rc3 kernel/guest image hashes, QEMU command line and
syzkaller revision.
- kernel.config: v7.4-rc3 kernel configuration.
- reproducer/repro.kernsight.prog: 183-entry state recipe.
- reproducer/repro.priming.prog: priming portion.
- reproducer/repro.prog: triggering testcase.
- reproducer/repro.report, repro.stats, repro.outcomes.jsonl,
repro.context.json: pipeline verification evidence.
- logs/log-0.txt, logs/report-0.txt: original rc3 syzkaller log and crash
report.
- logs/machineInfo-0.txt, logs/title-stat.json: guest environment and title
statistics.
- logs/external-verification/: full serial consoles and run records for
the two external rc3 reproductions (331.48 s and 290.82 s).
- SHA256SUMS: checksums for the inputs and logs.

Could you advise how to identify which holder is preventing the glock from
being granted in this state, or whether this crafted-image path needs an
additional check?

Best regards,
Zheng Zheng