fast-discovery-server crash due to uninitialized change pointer upon start-up #5578
Open
1 task done
Labels
triage
Issue pending classification
Is there an already existing issue for this?
Expected behavior
fast-discovery-server not crashing
Current behavior
fast-discovery-server crashing
Steps to reproduce
Start fast-discovery-server, 20 reader processes reading the same topic and 1 writer process writing the topic.
Depending on the hardware ,1 in about 10 runs will result in fast-discovery-server crashing. On "fast" hardware crash may not happen at all.
Fast DDS version/commit
Platform/Architecture
Other. Please specify in Additional context section.
Transport layer
UDPv4
Additional context
Platform/Architecture: Windows 11 Pro 24H2 Visual Studio 2022
Note that a RelWithDebInfo build is used.
...\src\fastdds\src\cpp\rtps\builtin\discovery\participant\PDPServer.cpp
The change pointer is not initialized, 0 in this case. The change pointer in question is added to the send_list (
DiscoveryDataBase::pdp_to_send_
) byDiscoveryDataBase::add_own_pdp_to_send_
.add_own_pdp_to_send_
is called byPDPServer::assignRemoteEndpoints
.The change is
DiscoveryParticipantInfo::change_
. TheDiscoveryParticipantInfo
object is a value in theDiscoveryDataBase::participants_
map with keyDiscoveryParticipantInfo::server_guid_prefix_
.Somehow sometimes the
DiscoveryParticipantInfo::change_
is uninitialized whenDiscoveryDataBase::add_own_pdp_to_send_
adds it to itsDiscoveryDataBase::pdp_to_send_
list. When this happens the subsequent call toPDPServer::process_to_send_list
will crash as shown.It was found that this only happens during start-up. The crash can be worked around by letting
PDPServer::assignRemoteEndpoints
not callDiscoveryDataBase::add_own_pdp_to_send_
for the first 15 calls, see below;On the left is the workaround.
I realize that more info may be needed for analysis. I'm happy to provide any information needed.
XML configuration file
Relevant log output
No response
Network traffic capture
No response
The text was updated successfully, but these errors were encountered: