[PR #18676] Fix a handoff deadlock if layout completes synchronously #31587

Open
opened 2026-01-31 09:48:13 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/18676

State: closed
Merged: Yes


I've received a dump from an affected user, and it showed that the layout event in TerminalPage was raised synchronously. This meant that during page initialization, the handoff listener was started while still being stuck inside the handoff listener. This resulted in a deadlock.

This PR fixes the issue by not holding the lock across handoff callback calls.

Closes #18634

Validation Steps Performed

  • Can't repro
**Original Pull Request:** https://github.com/microsoft/terminal/pull/18676 **State:** closed **Merged:** Yes --- I've received a dump from an affected user, and it showed that the layout event in TerminalPage was raised synchronously. This meant that during page initialization, the handoff listener was started while still being stuck inside the handoff listener. This resulted in a deadlock. This PR fixes the issue by not holding the lock across handoff callback calls. Closes #18634 ## Validation Steps Performed * Can't repro ❌
claunia added the pull-request label 2026-01-31 09:48:13 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#31587