Skip to content

CA-432805: Avoid fuse exit hanging in flush_all - #7364

Draft
BengangY wants to merge 2 commits into
xapi-project:masterfrom
BengangY:private/bengangy/CA-432805-fuse-exit
Draft

BengangY wants to merge 2 commits into
xapi-project:masterfrom
BengangY:private/bengangy/CA-432805-fuse-exit

Conversation

@BengangY

Copy link
Copy Markdown
Contributor

When the fuse exits xapi, Stdlib.exit runs flush_all, which can block forever writing a stale channel whose fd has been reused by an unread socket. The process then never exits.

  1. Exit with Unix._exit instead of Stdlib.exit, which skips flush_all.
  2. Start a timer when the fuse is lit that forces the process to exit if it is still running fuse_exit_grace seconds (default 60) after the fuse delay.

Bengang Yuan added 2 commits October 29, 2026 09:16
Stdlib.exit calls flush_all which does a blocking write() on every
unflushed out_channel. One stale channel whose fd was reused by an
unread socket blocks it forever. Use Unix._exit instead which doesn't
call flush_all.

Signed-off-by: Bengang Yuan <bengang.yuan@citrix.com>
Start a timer in the fuse process to force exiting the process if it
is still running fuse_exit_grace seconds (default 60) after the fuse
delay.

Signed-off-by: Bengang Yuan <bengang.yuan@citrix.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant