Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix deadlock in initialization of CoreBTypes using Lazy container #19298

Merged

Conversation

WojciechMazur
Copy link
Contributor

Replaces #19297 and fixes #19293

The deadlocks are now fixed by introduction of PostProcessorFrontendAccess.Lazy[T] container for which initialization is synchronized with the frontend Context, while providing a thread-safe access lacking in original solution.

It now also audits where the unrestricted access to context was used and replaces these usages with safer access.
Reverts #19292

@WojciechMazur WojciechMazur merged commit 33bdaac into scala:main Dec 20, 2023
19 checks passed
@WojciechMazur WojciechMazur deleted the fix/parallel-backend-deadlock-2 branch December 20, 2023 10:19
@Kordyjan Kordyjan added this to the 3.4.0 milestone Dec 20, 2023
odersky pushed a commit to dotty-staging/dotty that referenced this pull request Jan 6, 2024
…ala#19298)

Replaces scala#19297 and fixes scala#19293 

The deadlocks are now fixed by introduction of
`PostProcessorFrontendAccess.Lazy[T]` container for which initialization
is synchronized with the frontend Context, while providing a thread-safe
access lacking in original solution.

It now also audits where the unrestricted access to context was used and
replaces these usages with safer access.
Reverts scala#19292
WojciechMazur added a commit that referenced this pull request Jul 10, 2024
…9298)

Replaces #19297 and fixes #19293 

The deadlocks are now fixed by introduction of
`PostProcessorFrontendAccess.Lazy[T]` container for which initialization
is synchronized with the frontend Context, while providing a thread-safe
access lacking in original solution.

It now also audits where the unrestricted access to context was used and
replaces these usages with safer access.
Reverts #19292
[Cherry-picked 33bdaac][modified]
WojciechMazur added a commit that referenced this pull request Jul 11, 2024
…tainer" to LTS (#21162)

Backports #19298 to the LTS branch.

PR submitted by the release tooling.
[skip ci]
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Parallel backend can deadlock when accessing the synchronizing access to frontend.
3 participants