Skip to content

Fix mount timeout when auth/network is slow#2034

Open
tyrielv wants to merge 1 commit into
microsoft:masterfrom
tyrielv:tyrielv/mount-timeout
Open

Fix mount timeout when auth/network is slow#2034
tyrielv wants to merge 1 commit into
microsoft:masterfrom
tyrielv:tyrielv/mount-timeout

Conversation

@tyrielv

@tyrielv tyrielv commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

A user reported 'Unable to mount because the GVFS.Mount process is not responding' when authentication issues before the mount pipe was opened took more than the 60s we currently wait for the pipe to open. A previous PR already partially addressed this by moving the named pipe opening earlier in the mount process, but we can do more.

Fix

  1. MountVerb now uses process tracking - passes a MountProcessSnapshot delegate to WaitUntilMounted, the same mechanism previously added for the GVFS.Service automount path. This enables:

    • Fast-fail when the mount process exits unexpectedly (e.g., arg-parse crash)
    • Short-interval (500ms) connect retries with process liveness checks instead of a single 60s blocking call

    We previously implemented process tracking for GVFS.Service (automount), but hadn't incorporated it into regular user-initiated mounts.

  2. Auth/network retry progress surfaced to user - The ConfigHttpRequestor retry loop now reports failures and retry attempts into the mount progress message (via onRetry callback). Users see live status like 'Network: Server returned 401 (Unauthorized), retrying (attempt 2/7)...' instead of a frozen 'Mounting...' spinner. This lets them Ctrl+C early if auth is broken rather than waiting 3+ minutes for retries to exhaust.

@tyrielv tyrielv force-pushed the tyrielv/mount-timeout branch from 994c625 to 223b028 Compare June 19, 2026 18:17
The MountVerb used a single 60s pipe-connect call without process
tracking, causing 'GVFS.Mount process is not responding' errors even
when the mount process was alive but blocked on network retries.

Changes:
- MountVerb now passes a process-tracking delegate to WaitUntilMounted
  (the same mechanism previously added for GVFS.Service automount),
  enabling fast-fail on process exit and short-interval connect retries
  instead of a single blocking 60s connect.
- Auth/network retry progress is now surfaced in the mount status
  message visible to the user via GetStatus polling, so they can see
  issues like '401 Unauthorized, retrying (attempt 2/7)...' and choose
  to kill the mount early rather than waiting blindly.

The pipe-connected GetStatus polling loop is already unbounded (waits
indefinitely while mount reports progress), so once the pipe connects,
slow network operations no longer cause timeouts — users just see
live status updates instead of a frozen 'Mounting...' spinner.

Assisted-by: Claude Opus 4.6
Signed-off-by: Tyrie Vella <tyrielv@gmail.com>
@tyrielv tyrielv force-pushed the tyrielv/mount-timeout branch from 223b028 to 95cc5ad Compare June 19, 2026 18:35
@tyrielv tyrielv marked this pull request as ready for review June 19, 2026 18:39
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