Skip to content

Comments

fix(fcp): Avoid input-output lock-order deadlock#1078

Merged
leumor merged 1 commit intorelease/2from
bugfix/fcp-lock-order-deadlock
Feb 24, 2026
Merged

fix(fcp): Avoid input-output lock-order deadlock#1078
leumor merged 1 commit intorelease/2from
bugfix/fcp-lock-order-deadlock

Conversation

@leumor
Copy link
Collaborator

@leumor leumor commented Feb 24, 2026

Summary

  • break the FCP output-thread lock inversion by reading handler.isClosed() before acquiring outQueue in nextQueueAction()
  • add a regression test that asserts isClosed() is never invoked while holding outQueue
  • preserve existing queue behavior while removing the outQueue -> handler ordering that deadlocked against input-side handler -> outQueue paths

How To Test

  • ./gradlew test --tests *FCPConnectionOutputHandlerTest
  • ./gradlew test

Context

  • investigated threads_report.txt and found repeated mutual wait cycles between FCP input/output handlers (ArrayDeque vs FCPConnectionHandler monitor)
  • this patch targets that lock-order cycle directly

@sonarqubecloud
Copy link

@leumor leumor merged commit 9cc018d into release/2 Feb 24, 2026
4 checks passed
@leumor leumor deleted the bugfix/fcp-lock-order-deadlock branch February 24, 2026 05:53
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