Re: NFSD threads hang when destroying a session or client ID

Chuck Lever via Bugspray Bot
2025-01-20T15:39:44Z

Chuck Lever writes via Kernel.org Bugzilla:

v6.1 symptomology:

The following stack trace shows that the active callback workqueue item is stuck in rpc_shutdown_client() waiting for RPC operations to complete. Because the callback workqueue is single-threaded (max_active = 1) and this work item never completes, it prevents subsequent flush_workqueue() calls on the callback work queue from completing.

> [7257352.347503] task:kworker/u32:6 state:D stack:0 pid:173983 ppid:2
> flags:0x00004000
> [7257352.347511] Workqueue: nfsd4_callbacks nfsd4_run_cb_work [nfsd]
> [7257352.347568] Call Trace:
> [7257352.347571] <TASK>
> [7257352.347577] __schedule+0x34d/0x9e0
> [7257352.347589] schedule+0x5a/0xd0
> [7257352.347597] schedule_timeout+0x94/0x150
> [7257352.347606] ? __bpf_trace_tick_stop+0x10/0x10
> [7257352.347616] rpc_shutdown_client+0xf2/0x150 [sunrpc]
> [7257352.347683] ? cpuusage_read+0x10/0x10
> [7257352.347694] nfsd4_process_cb_update+0x4c/0x270 [nfsd]
> [7257352.347763] nfsd4_run_cb_work+0x9f/0x150 [nfsd]
> [7257352.347812] process_one_work+0x1c7/0x380
> [7257352.347824] worker_thread+0x4d/0x380
> [7257352.347835] ? rescuer_thread+0x3a0/0x3a0
> [7257352.347843] kthread+0xda/0x100
> [7257352.347849] ? kthread_complete_and_exit+0x20/0x20
> [7257352.347859] ret_from_fork+0x22/0x30
> [7257352.347875] </TASK>

Based on the full stack trace output, there do not appear to be any outstanding RPC operations.

View: https://bugzilla.kernel.org/show_bug.cgi?id=219710#c3