Skip to content

Conversation

678098
Copy link
Collaborator

@678098 678098 commented Jun 27, 2025

[21:29:46] CASE 497: FAILURE (rc -6)
TEST /Users/emalygin/work/blazingmq/src/groups/mqb/mqbs/mqbs_inmemorystorage.t.cpp CASE 497
(0): BloombergLP::bmqtst::LoggingAllocator::allocate(unsigned long)+0x58 at 0x10500b210 in mqbs_inmemorystorage.t
(1): void bsl::shared_ptr<BloombergLP::ntsb::Resolver>::createInplace<BloombergLP::bslma::Allocator*&>(BloombergLP::bslma::Allocator*, BloombergLP::bslma::Allocator*&)+0x4c at 0x105419f98 in mqbs_inmemorystorage.t
(2): BloombergLP::ntsf::System::createResolver(BloombergLP::bslma::Allocator*)+0x5c at 0x105419f14 in mqbs_inmemorystorage.t
(3): BloombergLP::bmqio::ResolveUtil::getHostname(bsl::basic_string<char, std::__1::char_traits<char>, bsl::allocator<char>>*)+0x70 at 0x104ee2568 in mqbs_inmemorystorage.t
(4): BloombergLP::mqbu::MessageGUIDUtil::initialize()+0x9c at 0x104e7e6ec in mqbs_inmemorystorage.t
(5): main+0x444 at 0x104c1ec7c in mqbs_inmemorystorage.t
(6): start+0x17bc at 0x1926cab98 in /usr/lib/dyld

Error /Users/emalygin/work/blazingmq/src/groups/bmq/bmqtst/bmqtst_loggingallocator.cpp(81): false && "The allocation was recorded"    (failed)
libc++abi: terminating due to uncaught exception of type BloombergLP::bsls::AssertTestException

[21:29:46] CASE 498: FAILURE (rc -6)
TEST /Users/emalygin/work/blazingmq/src/groups/mqb/mqbs/mqbs_inmemorystorage.t.cpp CASE 498
(0): BloombergLP::bmqtst::LoggingAllocator::allocate(unsigned long)+0x58 at 0x102e57210 in mqbs_inmemorystorage.t
(1): void bsl::shared_ptr<BloombergLP::ntsb::Resolver>::createInplace<BloombergLP::bslma::Allocator*&>(BloombergLP::bslma::Allocator*, BloombergLP::bslma::Allocator*&)+0x4c at 0x103265f98 in mqbs_inmemorystorage.t
(2): BloombergLP::ntsf::System::createResolver(BloombergLP::bslma::Allocator*)+0x5c at 0x103265f14 in mqbs_inmemorystorage.t
(3): BloombergLP::bmqio::ResolveUtil::getHostname(bsl::basic_string<char, std::__1::char_traits<char>, bsl::allocator<char>>*)+0x70 at 0x102d2e568 in mqbs_inmemorystorage.t
(4): BloombergLP::mqbu::MessageGUIDUtil::initialize()+0x9c at 0x102cca6ec in mqbs_inmemorystorage.t
(5): main+0x444 at 0x102a6ac7c in mqbs_inmemorystorage.t
(6): start+0x17bc at 0x1926cab98 in /usr/lib/dyld

Error /Users/emalygin/work/blazingmq/src/groups/bmq/bmqtst/bmqtst_loggingallocator.cpp(81): false && "The allocation was recorded"    (failed)
libc++abi: terminating due to uncaught exception of type BloombergLP::bsls::AssertTestException

[21:29:46] CASE 499: FAILURE (rc -6)
TEST /Users/emalygin/work/blazingmq/src/groups/mqb/mqbs/mqbs_inmemorystorage.t.cpp CASE 499
(0): BloombergLP::bmqtst::LoggingAllocator::allocate(unsigned long)+0x58 at 0x10267b210 in mqbs_inmemorystorage.t
(1): void bsl::shared_ptr<BloombergLP::ntsb::Resolver>::createInplace<BloombergLP::bslma::Allocator*&>(BloombergLP::bslma::Allocator*, BloombergLP::bslma::Allocator*&)+0x4c at 0x102a89f98 in mqbs_inmemorystorage.t
(2): BloombergLP::ntsf::System::createResolver(BloombergLP::bslma::Allocator*)+0x5c at 0x102a89f14 in mqbs_inmemorystorage.t
(3): BloombergLP::bmqio::ResolveUtil::getHostname(bsl::basic_string<char, std::__1::char_traits<char>, bsl::allocator<char>>*)+0x70 at 0x102552568 in mqbs_inmemorystorage.t
(4): BloombergLP::mqbu::MessageGUIDUtil::initialize()+0x9c at 0x1024ee6ec in mqbs_inmemorystorage.t
(5): main+0x444 at 0x10228ec7c in mqbs_inmemorystorage.t
(6): start+0x17bc at 0x1926cab98 in /usr/lib/dyld

Error /Users/emalygin/work/blazingmq/src/groups/bmq/bmqtst/bmqtst_loggingallocator.cpp(81): false && "The allocation was recorded"    (failed)
libc++abi: terminating due to uncaught exception of type BloombergLP::bsls::AssertTestException

@678098 678098 requested a review from a team as a code owner June 27, 2025 20:18
if (d_parentCounting_p) {
d_parentCounting_p->onAllocationChange(deltaValue);
}
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved to MANIPULATORS

@678098 678098 force-pushed the 250627_log_default_allocation branch from 54f35d0 to e493b40 Compare June 27, 2025 20:21
@@ -1,3 +1,4 @@
bmqtst_blobtestutil
bmqtst_loggingallocator
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bmqtst doesn't depend on bmqma, andI don't want introduce this dependency by placing LoggingAllocator there

@678098 678098 force-pushed the 250627_log_default_allocation branch from e493b40 to 04c852b Compare June 27, 2025 20:49
@678098 678098 requested a review from dorjesinpo June 27, 2025 20:49
dorjesinpo
dorjesinpo previously approved these changes Jun 27, 2025
@678098 678098 force-pushed the 250627_log_default_allocation branch from 04c852b to 15687c5 Compare June 27, 2025 22:32
Copy link

@bmq-oss-ci bmq-oss-ci bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Build 2819 of commit 15687c5 has completed with FAILURE

@678098 678098 force-pushed the 250627_log_default_allocation branch from 15687c5 to 5a07cb4 Compare July 7, 2025 16:12
Copy link

@bmq-oss-ci bmq-oss-ci bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Build 2839 of commit 5a07cb4 has completed with FAILURE

Comment on lines +84 to +86
if (d_failFast) {
BSLS_ASSERT_OPT(false && "The allocation was recorded");
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In theory BSLS_ASSERT_OPT is not guaranteed to be enabled in every build, it's probably more appropriate to call std::terminate here if that's what was intended.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point! Alternatively, what about raising an exception?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We cannot raise exceptions in this code by policy. Oddly enough I don't think we document that policy anywhere! But we do not allow exceptions to be thrown in bmq, mqb, or bmqbrkr code.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently, any assert statement generates an exception that causes termination of the program if not handled.

libc++abi: terminating due to uncaught exception of type BloombergLP::bsls::AssertTestException

Comment on lines +109 to +111
/// @brief Check whether the undesired allocations were recorded and raise
/// an exception if any.
void checkNoAllocations();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't raise an exception if it fails, rather it just ASSERTs. I think it would be better to return !d_failed.load() and have the caller check for the failure.

@678098 678098 force-pushed the 250627_log_default_allocation branch from 5a07cb4 to f138283 Compare July 9, 2025 09:29
Copy link

@bmq-oss-ci bmq-oss-ci bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Build 2870 of commit f138283 has completed with FAILURE

@678098 678098 force-pushed the 250627_log_default_allocation branch from f138283 to 064d39a Compare July 10, 2025 15:49
Copy link

@bmq-oss-ci bmq-oss-ci bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Build 2878 of commit 064d39a has completed with FAILURE

Signed-off-by: Evgeny Malygin <emalygin@bloomberg.net>
@678098 678098 force-pushed the 250627_log_default_allocation branch from 064d39a to ffd4530 Compare July 30, 2025 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants