Skip to contentSkip to conversation

fuse: fuse semantics wrt stalled requests

DISCUSSION Sergey Senozhatsky 2 participants 3 messages Nov 28, 2024 VFS

lore
Share & tools
lore
#0 lore raw

Hello Miklos,

A question: does fuse define any semantics for stalled requests handling?

We are currently looking at a number of hung_task watchdog crashes with tasks waiting forever in d_wait_lookup() for dentries to lose PAR_LOOKUP state, and we suspect that those dentries are from fuse mount point (we also sometimes see hung_tasks in fuse_lookup()->fuse_simple_request()). Supposedly (a theory) some tasks are in request_wait_answer() under PAR_LOOKUP, and the rest of tasks are waiting for them to finish and clear PAR_LOOKUP bit.

request_wait_answer() waits indefinitely, however, the interesting thing is that it uses wait_event_interruptible() (when we wait for !fc->no_interrupt request to be processed). What is the idea behind interruptible wait? Is this, may be, for stall requests handling? Does fuse expect user-space to watchdog or monitor its processes/threads that issue syscalls on fuse mount points and, e.g., SIGKILL stalled ones?

To make things even more complex, in our particular case fuse mount point mounts a remote google driver, so it become a network fs in some sense, which adds a whole new dimension of possibilities for stalled/failed requests. How those are expected to be handled? Should fuse still wait indefinitely or would it make sense to add a timeout to request_wait_answer() and FR_INTERRUPTED timeout-ed requests?

#1 lore raw
Quoted 19 lines · Sergey Senozhatsky

Hello Miklos,

A question: does fuse define any semantics for stalled requests handling?

We are currently looking at a number of hung_task watchdog crashes with tasks waiting forever in d_wait_lookup() for dentries to lose PAR_LOOKUP state, and we suspect that those dentries are from fuse mount point (we also sometimes see hung_tasks in fuse_lookup()->fuse_simple_request()). Supposedly (a theory) some tasks are in request_wait_answer() under PAR_LOOKUP, and the rest of tasks are waiting for them to finish and clear PAR_LOOKUP bit.

request_wait_answer() waits indefinitely, however, the interesting thing is that it uses wait_event_interruptible() (when we wait for !fc->no_interrupt request to be processed). What is the idea behind interruptible wait? Is this, may be, for stall requests handling? Does fuse expect user-space to watchdog or monitor its processes/threads that issue syscalls on fuse mount points and, e.g., SIGKILL stalled ones?

Quoted 7 lines

To make things even more complex, in our particular case fuse mount point mounts a remote google driver, so it become a network fs in some sense, which adds a whole new dimension of possibilities for stalled/failed requests. How those are expected to be handled? Should fuse still wait indefinitely or would it make sense to add a timeout to request_wait_answer() and FR_INTERRUPTED timeout-ed requests?

Please see here

https://lore.kernel.org/all/[email protected]/

Thanks,
Bernd

#2 lore raw
Quoted 28 lines · Bernd Schubert
Quoted 19 lines · Sergey Senozhatsky

Hello Miklos,

A question: does fuse define any semantics for stalled requests handling?

We are currently looking at a number of hung_task watchdog crashes with tasks waiting forever in d_wait_lookup() for dentries to lose PAR_LOOKUP state, and we suspect that those dentries are from fuse mount point (we also sometimes see hung_tasks in fuse_lookup()->fuse_simple_request()). Supposedly (a theory) some tasks are in request_wait_answer() under PAR_LOOKUP, and the rest of tasks are waiting for them to finish and clear PAR_LOOKUP bit.

request_wait_answer() waits indefinitely, however, the interesting thing is that it uses wait_event_interruptible() (when we wait for !fc->no_interrupt request to be processed). What is the idea behind interruptible wait? Is this, may be, for stall requests handling? Does fuse expect user-space to watchdog or monitor its processes/threads that issue syscalls on fuse mount points and, e.g., SIGKILL stalled ones?

Quoted 7 lines

To make things even more complex, in our particular case fuse mount point mounts a remote google driver, so it become a network fs in some sense, which adds a whole new dimension of possibilities for stalled/failed requests. How those are expected to be handled? Should fuse still wait indefinitely or would it make sense to add a timeout to request_wait_answer() and FR_INTERRUPTED timeout-ed requests?

Quoted 3 lines

Please see here

https://lore.kernel.org/all/[email protected]/

Thanks for the pointers!