# IDE freeze: deadlock on project close in BackendService.refreshTaintVulnerabilities

**URL:** <https://community.sonarsource.com/t/ide-freeze-deadlock-on-project-close-in-backendservice-refreshtaintvulnerabilities/190517>\
**Category:** IntelliJ Platform\
**Created:** [October 26, 2026, 11:18am UTC](https://community.sonarsource.com/t/ide-freeze-deadlock-on-project-close-in-backendservice-refreshtaintvulnerabilities/190517 "2026-10-26T11:18:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![arpad-palko-qubiz](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/arpad-palko-qubiz/32/78001_2.png) [@arpad-palko-qubiz](https://community.sonarsource.com/u/arpad-palko-qubiz)\
**Post date:** [October 26, 2026, 11:18am UTC](https://community.sonarsource.com/t/ide-freeze-deadlock-on-project-close-in-backendservice-refreshtaintvulnerabilities/190517/1 "2026-10-26T11:18:35Z")

</div>

**Environment**

- SonarQube for IDE (IntelliJ plugin) 12.9.0.85269
- PhpStorm 2026.1.4 (build 261.26222.71), bundled JBR 25.0.3
- macOS 27.0 (26A428)
- Standalone mode (no connected mode / no SonarQube Server or Cloud binding)
- About 10 projects open in separate windows

**What happens**  
Closing a project window (or opening another project in the same window) freezes the whole IDE permanently. The UI stops responding and never recovers; the only way out is to force-quit the IDE. After the first close got stuck, every further project close hit the same deadlock with a different pooled thread.

**Thread dump analysis**  
It’s a lock-order deadlock between the platform’s project disposal and a SonarLint non-blocking read action:

1. `AWT-EventQueue-0` runs `ProjectManagerImpl.closeProject` inside a **write action**. While disposing the project, `PassExecutorService.dispose` (line 108) blocks on `FutureTask.get()`.
2. That future runs `PassExecutorService.lambda$dispose$0` (line 104), which calls `ForkJoinPool.awaitQuiescence`. While “helping” the pool, it picks up a SonarLint task inline: `BackendService.refreshTaintVulnerabilities$lambda$1` (BackendService.kt:997) → `ReadActionUtils.computeReadActionSafely` → `executeNonBlockingReadAction` → `NonBlockingReadActionImpl.executeSynchronously`.
3. That read action parks in `NonBlockingReadActionImpl$Submission.blockUntilWriteActionIsDone` and waits for the write action held by the EDT in step 1.

So the EDT waits for the pool task, and the pool task waits for the EDT’s write action. Two other SonarLint threads were parked in the same `blockUntilWriteActionIsDone` too: `SonarLintIntelliJClient.listFiles` on “SonarLint Client RPC request executor”, and `FileUtils.isFileValidForSonarLintWithExtensiveChecks` on a DefaultDispatcher worker.

Interrupting the pooled thread stuck in `refreshTaintVulnerabilities` let the close finish and unfroze the UI, which confirms that this thread was the blocker.

**Suggested direction**  
`refreshTaintVulnerabilities` (and probably the other `computeReadActionSafely` callers) should not run a synchronous non-blocking read action on a thread that can be borrowed by `ForkJoinPool` quiescence, or should be cancelled when the project is disposed. Calling `ReadAction.nonBlocking(...).expireWith(project)` asynchronously, or skipping the work when the project is disposing, would avoid it.

Stack traces of the two deadlocked threads are attached (sonarlint-deadlock-threads.txt).  
[sonarlint-deadlock-threads.txt](https://community.sonarsource.com/uploads/short-url/69ofaR81UgtFPqyabLUqgZ2TLr2.txt) (12.6 KB)

---

<div class="post-metadata">

**Author:** ![nicolas.quinquenel](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/nicolas.quinquenel/32/40740_2.png) [@nicolas.quinquenel](https://community.sonarsource.com/u/nicolas.quinquenel)\
**Post date:** [October 27, 2026, 9:26am UTC](https://community.sonarsource.com/t/ide-freeze-deadlock-on-project-close-in-backendservice-refreshtaintvulnerabilities/190517/4 "2026-10-27T09:26:18Z")

</div>

Hey @arpad-palko-qubiz, thanks for the detailed report, that’s really useful!

We’re tracking this as a bug on our side and we’ll try to fix it in an upcoming iteration.
