Skip to content

SelectableEventLoop.debugDescription: fix debugDescription deadlock#3360

Merged
Lukasa merged 1 commit intoapple:mainfrom
weissi:jw-deadlock
Aug 28, 2025
Merged

SelectableEventLoop.debugDescription: fix debugDescription deadlock#3360
Lukasa merged 1 commit intoapple:mainfrom
weissi:jw-deadlock

Conversation

@weissi
Copy link
Copy Markdown
Member

@weissi weissi commented Aug 28, 2025

Motivation:

In #3297, I introduced a deadlock involving SelectableEventLoop's debugDescription. I was under the impression that it's not possible to call this from outside the NIO module so I deemed it safe. That was a mistake :).

Modifications:

  • Make it impossible to deadlock around SelectableEventLoop.debugDescription.

Result:

  • Fewer deadlocks

@weissi weissi requested a review from Lukasa August 28, 2025 11:04
@weissi weissi added the 🔨 semver/patch No public API change. label Aug 28, 2025
#endif

func testRegressionSelectableEventLoopDeadlock() throws {
let iterations = 1_000
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note to reviewers: even 10 reproes basically 100% on my machine. 1000 should be really safe

@Lukasa Lukasa merged commit f656af6 into apple:main Aug 28, 2025
54 of 55 checks passed
@weissi weissi deleted the jw-deadlock branch September 2, 2025 14:48
@finagolfin
Copy link
Copy Markdown
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🔨 semver/patch No public API change.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants