Repository navigation
Description
Is there an already existing issue for this?
- I have searched the existing issues
Expected behavior
Multiple independent Windows processes should be able to create and delete DDS participants in the same domain using default participant QoS without assertions or crashes.
Each process in the reproducer creates and deletes participants sequentially. Concurrent participant creation occurs across processes, not across application threads within a process.
Current behavior
With four concurrent processes using default transports, participant creation intermittently aborts with:
Assertion failed: open_or_created &&
winapi::get_last_error() != winapi::error_already_exists,
file D:_fdds\52aab079\Source\fastdds\thirdparty\boost\include\boost/interprocess/sync/windows/semaphore.hpp,
line 65
In one local batch:
- Two processes terminated with exit code 3 after this assertion.
- One process completed all 100 create/delete cycles.
Control runs passed:
- Four concurrent processes with FASTDDS_BUILTIN_TRANSPORTS=UDPv4: all 400 cycles completed.
- One process with default transports: all 100 cycles completed.
Steps to reproduce
- Build the following program against the Windows Debug Fast DDS 3.6.2 shared library.
- Leave FASTDDS_BUILTIN_TRANSPORTS unset.
- Start four copies concurrently and collect each process’s output.
- Repeat if necessary; the failure is intermittent.
- As a control, repeat with FASTDDS_BUILTIN_TRANSPORTS=UDPv4.
#include <fastdds/dds/domain/DomainParticipant.hpp>
#include <fastdds/dds/domain/DomainParticipantFactory.hpp>
#include <fastdds/dds/domain/qos/DomainParticipantQos.hpp>
#include <cstdio>
int main()
{
using namespace eprosima::fastdds::dds;
auto* factory = DomainParticipantFactory::get_instance();
for (int iteration = 0; iteration < 100; ++iteration)
{
std::fprintf(stderr, "iteration=%d creating\n", iteration);
auto* participant =
factory->create_participant(3, PARTICIPANT_QOS_DEFAULT);
if (participant == nullptr)
{
return 2;
}
std::fprintf(stderr, "iteration=%d created\n", iteration);
if (factory->delete_participant(participant) != RETCODE_OK)
{
return 4;
}
}
}
The failing path appears associated with Windows shared-memory initialization: the equivalent four-process UDPv4-only control completed successfully.
The tested standalone probe also configured CRT assertion reporting to stderr and disabled crash dialogs. Those diagnostic settings are omitted above; attach the actual probe source and runner from %TEMP%.
Fast DDS version/commit
Fast DDS: 3.6.2
Fast CDR DLL file version: 2.3.6
Local build: Windows Debug shared libraries
Platform/Architecture
Other. Please specify in Additional context section.
Transport layer
Default configuration, UDPv4 & SHM
Additional context
Windows, x86-64
MSVC Debug runtime (/MDd)
Standalone reproducer compiler: MSVC 14.51.36260.0
A possible cause is a Windows synchronization-object name collision: the vendored Boost implementation constructs synchronization names using a QueryPerformanceCounter value. However, no matching cross-process semaphore creation trace has been captured, so this remains a hypothesis.
XML configuration file
Relevant log output
pid=94848 iteration=37 created
pid=94848 iteration=38 creating
Assertion failed: open_or_created && winapi::get_last_error() != winapi::error_already_exists, file D:\_fdds\52aab079\Source\fastdds\thirdparty\boost\include\boost/interprocess/sync/windows/semaphore.hpp, line 65
pid=46108 iteration=2 created
pid=46108 iteration=3 creating
Assertion failed: open_or_created && winapi::get_last_error() != winapi::error_already_exists, file D:\_fdds\52aab079\Source\fastdds\thirdparty\boost\include\boost/interprocess/sync/windows/semaphore.hpp, line 65Network traffic capture
No response
Activity