Skip to content
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

Possible to mis-use QueueOptions with subscriptions to cause broker crash #133

Closed
1 task done
678098 opened this issue Oct 20, 2023 · 0 comments
Closed
1 task done
Assignees
Labels
A-Broker Area: C++ Broker A-Client Area: C++ SDK bug Something isn't working

Comments

@678098
Copy link
Collaborator

678098 commented Oct 20, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

The sample consumer with the problem exposed:

https://github.com/bloomberg/blazingmq/pull/132/files

The crash log looks like this:

20OCT2023_13:24:39.771 (6108901376) FATAL mqbblp_queuehandle.cpp:634 Assertion failed: subscription->d_downstreamSubQueueId == downstreamSubId, stack trace:
(0): bmqAssertHandler(char const*, char const*, int)+0xe4 at 0x104461d84 in bmqbrkr.tsk
(1): BloombergLP::bsls::Assert::failOnViolation(BloombergLP::bsls::AssertViolation const&)+0x54 at 0x1053f82f4 in bmqbrkr.tsk
(2): BloombergLP::bsls::Assert::invokeHandler(BloombergLP::bsls::AssertViolation const&)+0x24 at 0x1053f857c in bmqbrkr.tsk
(3): BloombergLP::mqbblp::QueueHandle::registerSubscription(unsigned int, unsigned int, BloombergLP::bmqp_ctrlmsg::ConsumerInfo const&, unsigned int)+0x324 at 0x1048691a8 in bmqbrkr.tsk
(4): BloombergLP::mqbblp::Routers::Consumer::registerSubscriptions(BloombergLP::mqbi::QueueHandle*)+0xb8 at 0x10496acfc in bmqbrkr.tsk
(5): BloombergLP::mqbblp::Routers::AppContext::registerSubscriptions()+0x80 at 0x10496e640 in bmqbrkr.tsk
(6): BloombergLP::mqbblp::RootQueueEngine::configureHandle(BloombergLP::mqbi::QueueHandle*, BloombergLP::bmqp_ctrlmsg::StreamParameters const&, bsl::function<void (BloombergLP::bmqp_ctrlmsg::Status const&, BloombergLP::bmqp_ctrlmsg::StreamParameters const&)> const&)+0xe3c at 0x10494bd24 in bmqbrkr.tsk
(7): BloombergLP::mqbblp::LocalQueue::configureHandle(BloombergLP::mqbi::QueueHandle*, BloombergLP::bmqp_ctrlmsg::StreamParameters const&, bsl::function<void (BloombergLP::bmqp_ctrlmsg::Status const&, BloombergLP::bmqp_ctrlmsg::StreamParameters const&)> const&)+0xf8 at 0x1047e8e14 in bmqbrkr.tsk
(8): BloombergLP::mqbblp::Queue::configureHandle(BloombergLP::mqbi::QueueHandle*, BloombergLP::bmqp_ctrlmsg::StreamParameters const&, bsl::function<void (BloombergLP::bmqp_ctrlmsg::Status const&, BloombergLP::bmqp_ctrlmsg::StreamParameters const&)> const&)+0xb8 at 0x10480291c in bmqbrkr.tsk
(9): BloombergLP::mqbblp::QueueHandle::configureDispatched(BloombergLP::bmqp_ctrlmsg::StreamParameters const&, bsl::function<void (BloombergLP::bmqp_ctrlmsg::Status const&, BloombergLP::bmqp_ctrlmsg::StreamParameters const&)> const&)+0x344 at 0x10486bc00 in bmqbrkr.tsk

Expected Behavior

Will be good to handle this in the broker, so other SDKs (including custom-made) are not able to cause crash. Also will be good to add check for this in the SDK, so the troublesome message is not sent at all.

Steps To Reproduce

  1. Build QueueOptions with subscriptions
  2. Use the same QueueOptions for different fanout appIds.
  3. Broker crashes.

BlazingMQ Version

0.90.18

Anything else?

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Broker Area: C++ Broker A-Client Area: C++ SDK bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants