You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
UI freeze: deadlock between main thread and LSP listener on quota fallback #179
The Eclipse UI freezes permanently when a 402 quota error triggers the fallback model flow. A deadlock occurs between the main (UI) thread and the LSP message listener thread.
User hits a 402 quota error → ChatContentViewer (line 238–240) calls setFallBackModelAsActiveModel()on the UI thread
That calls persistUserPreference() → getPersistentFilePath() → CompletableFuture.get() — blocking the UI thread waiting for the LSP server to respond
Meanwhile, the Copilot language server sends a chat progress notification
The LSP listener thread tries to deliver it via Display.syncExec() — which needs the UI thread to dispatch
The UI thread is blocked waiting on the LSP response, and the LSP listener is the only thread reading server messages — so the persistence response can never arrive
ChatBaseService.getPersistentFilePath() (line 125) calls this.lsConnection.persistence().get() — an unbounded blocking call — inside a synchronized method that executes on the UI thread. This violates the Eclipse threading rule: never block the UI thread on async results that depend on the same event loop.
Suggested Fixes
Primary: Don't call .get() on the UI thread in getPersistentFilePath(). Cache the persistence path eagerly at startup or use .thenAccept() to persist asynchronously.
Secondary: Change processTurnEvent() from syncExec to asyncExec where possible, so the LSP listener thread isn't blocked by the UI thread.
Safety net: At minimum, add a timeout — .get(5, TimeUnit.SECONDS) — to prevent a permanent freeze.
Reproduction
Trigger a 402 quota exceeded error while a chat response is actively streaming (so the LSP listener thread is busy delivering progress notifications via syncExec).
Activity
jdneo commentedon May 12, 2026
There is another bug, when quota exceeded, it will render a lot of warning dialog: