DDSWaitSet destructor crashes

3 posts / 0 new
Last post
ilya_1725's picture
Offline
Last seen: 1 year 9 months ago
Joined: 04/20/2020
Posts: 24
DDSWaitSet destructor crashes

Hello:

I have a very reproducible segfault when the code deltes a DDSWaitSet object. Here is the stack trace:

0x00007ffff6ee7a2e in RTIOsapiSemaphore_take (me=0x0, blockDurationIn=0x0) at Semaphore.c:828
828     Semaphore.c: No such file or directory.
(gdb) bt
#0  0x00007ffff6ee7a2e in RTIOsapiSemaphore_take (me=0x0, blockDurationIn=0x0) at Semaphore.c:828
#1  0x00007ffff74a9573 in DDS_DomainParticipantGlobals_initializeWorkerFactoryI (self=0x7ffff7bc8a00 <DDS_DomainParticipantGlobals_g_singleton>, qos=0x555555e56668, mutex=0x0, alreadyCreated=0x0) at DomainParticipantGlobals.c:512
#2  0x00007ffff74a2c67 in DDS_DomainParticipantFactory_get_worker_factoryI (self=0x555555e56660, alreadyCreated=0x0) at DomainParticipantFactory.c:2693
#3  0x00007ffff74a2d1c in DDS_DomainParticipantFactory_get_workerI (self=0x555555e56660) at DomainParticipantFactory.c:2720
#4  0x00007ffff74799e8 in DDS_WaitSet_get_workerI (self=0x555555e71180) at WaitSet.c:836
#5  0x00007ffff74780ef in DDS_WaitSet_finalize (self=0x555555e71180) at WaitSet.c:292
#6  0x00007ffff747801e in DDS_WaitSet_delete (self=0x555555e71180) at WaitSet.c:269
#7  0x00007ffff7cd26b2 in DDSWaitSet_impl::~DDSWaitSet_impl (this=0x555555e71160, __in_chrg=<optimized out>) at WaitSet_impl.cxx:139
#8  0x00007ffff7cd26e6 in DDSWaitSet_impl::~DDSWaitSet_impl (this=0x555555e71160, __in_chrg=<optimized out>) at WaitSet_impl.cxx:140
#9  0x00007ffff7cd31a0 in DDSWaitSet::~DDSWaitSet (this=0x555555e710a8, __in_chrg=<optimized out>) at WaitSet.cxx:62
#10 0x00005555559622c3 in avcommon::DDSReader<avionics::actuator::MotorFeedback, void>::~DDSReader (this=0x555555e71060, __in_chrg=<optimized out>, __vtt_parm=<optimized out>) at /usr/include/c++/9/bits/unordered_map.h:102

 

Anything could be done about it?

RTI version is 6.0.1, x86 version.

 

Offline
Last seen: 2 months 2 weeks ago
Joined: 04/02/2013
Posts: 194

Have you manually deleted the DomainParticipantFactory? That can only be done at the very end of the application (and deleting the factory is not strictly necessary).

ilya_1725's picture
Offline
Last seen: 1 year 9 months ago
Joined: 04/20/2020
Posts: 24

We used:

DDSDataReader->delete_contained_entities();