[SERVER-47033] StreamableReplicaSetMonitor::onTopologyDescriptionChangedEvent should check if the instance is dropped Created: 21/Mar/20  Updated: 29/Oct/23  Resolved: 23/Mar/20

Status: Closed
Project: Core Server
Component/s: Networking
Affects Version/s: None
Fix Version/s: 4.4.0-rc0

Type: Bug Priority: Major - P3
Reporter: Lamont Nelson Assignee: Lamont Nelson
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Service Arch 2020-03-23, Service Arch 2020-04-06
Participants:
Linked BF Score: 10

 Description   

need to add the following guard at the start of StreamableReplicaSetMonitor::onTopologyDescriptionChangedEvent

 

if (_isDropped.load())
return;


 Comments   
Comment by Lamont Nelson [ 23/Mar/20 ]

This was fixed as part of SERVER-47029

Comment by Lamont Nelson [ 21/Mar/20 ]

This is related to BF-16565. The log shows thats a onTopologyChangedEvent has a segfault as the instance is being shutdown.

backtrace:
#0 0x00007faca728f640 in vtable for boost::log::v2s_mt_posix::attributes::constant<mongo::logv2::LogDomain::Internal const*>::impl ()
#1 0x00007faca5aabb00 in mongo::ReplicaSetChangeNotifier::onConfirmedSet (this=this@entry=0x7faca9ea0020, connectionString=..., primary=..., passives=...)
at src/mongo/client/replica_set_change_notifier.cpp:126
#2 0x00007faca5acc57f in mongo::StreamableReplicaSetMonitor::onTopologyDescriptionChangedEvent (this=<optimized out>, topologyId=...,
previousDescription=..., newDescription=...)
at /opt/mongodbtoolchain/revisions/toolchain_builder_rhel62_patch_57df61bfe08e9c2805a38d201c5cd6c0ea414778_5daee4e830661503f51984bf_19_10_22_11_16_02/stow/gcc-v3.cZb/include/c++/8.2.0/bits/basic_string.h:927
#3 0x00007faca5c0586b in mongo::sdam::TopologyEventsPublisher::_sendEvent (this=<optimized out>, listener=..., event=...)
at /opt/mongodbtoolchain/revisions/toolchain_builder_rhel62_patch_57df61bfe08e9c2805a38d201c5cd6c0ea414778_5daee4e830661503f51984bf_19_10_22_11_16_02/stow/gcc-v3.cZb/include/c++/8.2.0/ext/atomicity.h:96
#4 0x00007faca5c06410 in mongo::sdam::TopologyEventsPublisher::_nextDelivery (this=0x7facb0326790)
at /opt/mongodbtoolchain/revisions/toolchain_builder_rhel62_patch_57df61bfe08e9c2805a38d201c5cd6c0ea414778_5daee4e830661503f51984bf_19_10_22_11_16_02/stow/gcc-v3.cZb/include/c++/8.2.0/ext/atomicity.h:96
#5 0x00007faca5c16224 in mongo::unique_function<void (mongo::Status)>::operator()(mongo::Status) const (args#0=..., this=<optimized out>)
at src/mongo/util/invariant.h:64
#6 mongo::executor::TaskExecutor::<lambda(const mongo::executor::TaskExecutor::CallbackArgs&)>::operator() (args=..., __closure=<optimized out>)
at src/mongo/executor/task_executor.cpp:41
#7 mongo::unique_function<void(const mongo::executor::TaskExecutor::CallbackArgs&)>::callRegularVoid<mongo::executor::TaskExecutor::schedule(mongo::OutOfLine--Type <RET> for more, q to quit,

Generated at Thu Feb 08 05:13:06 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.