-
Notifications
You must be signed in to change notification settings - Fork 143
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
session->LoadMessageEventBuilder Destructor SIGSEV different thread #426
Comments
Hi @kclonts, Thanks for your report! It seems like a bug, but just a little bit more information:
|
Rocky Linux 9 (up to date) X86_64. 7970wx Clang 18.1.8, debug and release builds, w/ & w/o TSAN respectively Updating (after coming up with my workaround, a single-thread on the BMQ start session thread guarded w/ mutex to access builders), the confirm event builder experiences the same issue // Needs Nothing more, nothing less. Many variations on adding message, reset, etc.
void bldrEvntThreadFailure(BloombergLP::bmqa::Session* sess) {
BloombergLP::bmqa::MessageEventBuilder msgBldr;
sess->loadMessageEventBuilder(&msgBldr);
// on dtor throws SIGSEV
}
void bldrConfThreadFailure(BloombergLP::bmqa::Session* sess) {
BloombergLP::bmqa::ConfirmEventBuilder confBldr;
sess->loadConfirmEventBuilder(&confBldr);
// on dtro throws SIGSEV
}
void main() {
auto opts = BloombergLP::bmqt::SessionOptions();
opts.setBrokerUri(std::getenv("BMQ_URI"));
opts.setNumProcessingThreads(4);
auto sess = new BloombergLP::bmqa::Session(opts);
int rc = sess->start();
if (rc != 0) {
// out-of-scope to example
exit(1);
}
// Fails w/ Event Builder
auto t1 = std::thread(&bldrEvntThreadFailure, sess);
t1.join();
// Fails w/ Confirm Event Builder
auto t2 = std::thread(&bldrConfThreadFailure, sess);
t2.join();
}
|
Thanks! As far as we can tell, this code should work, so we'll work on reproducing this. |
You have to call session |
..also, |
I'm able to reproduce this issue with and without calling
|
@kclonts I think the immediate fix to your problem is compiling your program with |
Setting at the CLI running CMake, I get this
And using the new library, the issue is not resolved |
OK! Looked at your PR, I realized what I needed to do here to get this working Enabling I really appreciate the help and quick turnaround here |
Excellent, great to hear! It was a bug that this flag was ever on, so we're going to turn it off by default in our next release. This will break that work-around for you, but it's really where we should have been originally. You'll be able to build at that point without I'll keep this issue open and close it when we merge that change into |
Change has been merged into |
Is there an existing issue for this?
Current Behavior
// thread 1
Session* sess = new Session();
// thread 2
{
MessageEventBuilder b;
session->LoadMessageEventBuilder(&b);
}
SIGSEV on destructor from g_newDeleteAllocatorSingleton
Both Async & Sync mode
Documentation states all Session methods are thread enabled
Expected Behavior
no sigsev; MessageEventBuilder is valid
Steps To Reproduce
see description
BlazingMQ Version
0.92.10, 0.92.6, latest
Anything else?
No response
The text was updated successfully, but these errors were encountered: