Skip to content

Fix load memory order #21818

New issue

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

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

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 25, 2025
Merged

Conversation

jvolmer
Copy link
Contributor

@jvolmer jvolmer commented Jun 23, 2025

This fixes the load memory order in the ThreadOwnedList which is used in the async registry. Using memory_order_release for a load operation does not make sense and can lead to compiler or runtime errors. Unfortunately, the combination of clang and libstdc++ does not seem to catch this error during compilation.

This wrong memory order usage can lead to a data race in the async registry but which is not really relevant: this data race can happen when we run the garbage collection on the async registry which can lead to an entry in the async registry not beeing deleted. But the garbage collection runs regularly, per default every second, so in the next run the item can the be deleted properly.

This is most likely the issue leading to #21811.

@jvolmer jvolmer self-assigned this Jun 23, 2025
@cla-bot cla-bot bot added the cla-signed label Jun 23, 2025
@neunhoef neunhoef merged commit ef52434 into devel Jun 25, 2025
7 checks passed
@neunhoef neunhoef deleted the bugfix/fix-memory-order-in-thread-owned-list branch June 25, 2025 06:47
mchacki pushed a commit that referenced this pull request Jun 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants