Skip to content

Conversation

Trolldemorted
Copy link

@Trolldemorted Trolldemorted commented Oct 3, 2025

What I did
Current main fails to properly abort with --watch on permission issues because:

  • up.go:Up() notices globalCtx is done, calls watcher.Stop()
  • watch.go:Stop() reads from w.errCh
  • watch.go:Stop() is deadlocked because watch.go:Start has not and will not write to w.errCh

The fix is simple: Ensure watch.go:Start() writes the error from watchFn into w.errCh.

Related issue
Fixes #13262

@Trolldemorted Trolldemorted requested a review from a team as a code owner October 3, 2025 23:32
Up's loop will notice globalCtx is done, and invoke watcher.Stop(). Stop() reads from the watcher error channel. If Start() does not write an error, Stop() will never finish.

Fixes docker#13262

Signed-off-by: Benedikt Radtke <[email protected]>
@Trolldemorted Trolldemorted force-pushed the fixpermissionissuedeadlock branch from 0976251 to 3d1a3ec Compare October 3, 2025 23:33
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.

[BUG] docker compose watch fails to detect permission issue and deadlocks
1 participant