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
[SR-7712] Sync dispatch queue block crash #50252
Comments
Running your test program with Thread Sanitizer enabled very quickly turns up several data races:
If your program still fails after running TSan-clean, please reopen this bug. |
@belkadan Shouldn't this be handled by the queue? All reads and writes are synchronized on that queue to be specifically thread safe, this is what confused me in the first place. One particular thing that stands out is that the sanitizer reports I've gone though several options, including adding |
I didn't really read your code, just ran with TSan. Now that I am reading it, I think the problem is that the |
No way!!![]( Yes, that totally seems to be the reason. Thanks for the insight) |
Attachment: Download
Additional Detail from JIRA
md5: b7d38fbfc062d88b004dbf06d1f89d7c
duplicates:
Issue Description:
While working on a stateful semaphore class I came across a floating crash. I can't really tell what goes wrong, but it seems when sync block is invoked on a queue from another concurrent queue it sometimes can't handle it. This works in most cases, pretty much always in production. But during heavy testing it's easy to crash.
The text was updated successfully, but these errors were encountered: