Closed 678098 closed 7 months ago
Place where the problem might occur:
https://github.com/bloomberg/blazingmq/blob/a6f119b17930c7aa5fcc2d285048f2affc7dada3/src/groups/bmq/bmqt/bmqt_subscription.cpp#L46
This static local variable initialization is not thread safe in general. The probability to observe a bug is small though.
Here are some details and advices:
https://bloomberg.github.io/bde-resources/doxygen/bde_api_prod/group__bslmt__once.html#_details
Here is how we did a safe initialization for another component:
https://github.com/bloomberg/blazingmq/blob/08a6d16b1b73d1d71113f80f7c22fcdd3e5392d8/src/groups/bmq/bmqt/bmqt_correlationid.cpp#L33-L42
Will be good to do the same for the problematic line of code above.
Try to build multiple SubscriptionHandles at the same time from different threads just after the app starts.
SubscriptionHandle
0.90.18
No response
I am taking this
Fixed
Is there an existing issue for this?
Current Behavior
Place where the problem might occur:
https://github.com/bloomberg/blazingmq/blob/a6f119b17930c7aa5fcc2d285048f2affc7dada3/src/groups/bmq/bmqt/bmqt_subscription.cpp#L46
This static local variable initialization is not thread safe in general. The probability to observe a bug is small though.
Here are some details and advices:
https://bloomberg.github.io/bde-resources/doxygen/bde_api_prod/group__bslmt__once.html#_details
Expected Behavior
Here is how we did a safe initialization for another component:
https://github.com/bloomberg/blazingmq/blob/08a6d16b1b73d1d71113f80f7c22fcdd3e5392d8/src/groups/bmq/bmqt/bmqt_correlationid.cpp#L33-L42
Will be good to do the same for the problematic line of code above.
Steps To Reproduce
Try to build multiple
SubscriptionHandle
s at the same time from different threads just after the app starts.BlazingMQ Version
0.90.18
Anything else?
No response