-
Notifications
You must be signed in to change notification settings - Fork 251
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
SpscQueue race condition bug #578
Comments
Вообще есть еще одна претензия к DoPush https://github.com/userver-framework/userver/blob/develop/core/include/userver/concurrent/queue.hpp#L401 не стоило делать одной транзакцией? Если два треда провалятся в DoPush одновременно в итоге может более total_capacity_ элементов оказаться в очереди |
"Это не баг, это фича", длина очереди может незначительно превышать лимит под нагрузкой, как и описано в доке |
Воспроизведение:
Чтобы лучше воспроизводилось надо "пропатчиить" это место (суть патча добавить sleep чтобы разломать инварианты)
По итогу сниппет кода виснет намертво с таким stdout:
The text was updated successfully, but these errors were encountered: