eProsima / Fast-DDS

The most complete DDS - Proven: Plenty of success cases. Looking for commercial support? Contact info@eprosima.com
https://eprosima.com
Apache License 2.0
2.16k stars 765 forks source link

data race on vptr #3883

Open Rrooach opened 1 year ago

Rrooach commented 1 year ago

Is there an already existing issue for this?

Expected behavior

The system start without error.

Current behavior

System emit an tsan report

Steps to reproduce

Basically, I installed ros-humble on a remote server, compiled it with thread sanitizer, And when I start to boot the ros2 system and try to testing it, by running the test_executor demon, I get the following tsan report.

Fast DDS version/commit

Platform/Architecture

Other. Please specify in Additional context section.

Transport layer

Default configuration, UDPv4 & SHM

Additional context

the following is the tsan report: https://pastebin.com/e2TEaq6q

it seems that there is a race condition happened between the following two code section:


Condition::~Condition()
{
    notifier_->will_be_deleted(*this);
}
    auto fill_active_conditions = [&]()
            {
                bool ret_val = false;
                active_conditions.clear();
                for (const Condition* c : entries_)
                {
                    if (c->get_trigger_value())
                    {
                        ret_val = true;
                        active_conditions.push_back(const_cast<Condition*>(c));
                    }
                }
                return ret_val;
            };

It would be so nice of you to review this bug report. Thank you again for taking the time. Any suggestions or feedback you can provide would be helpful.

XML configuration file

No response

Relevant log output

No response

Network traffic capture

No response

JesusPoderoso commented 8 months ago

Hi @Rrooach thanks for using Fast DDS and thanks for the report. We will take a look and come back with some feedback.