Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When create transport,fastdds will struck in asan, if I use ros2 python example. #5470

Open
1 task done
wddpfx opened this issue Dec 9, 2024 · 2 comments
Open
1 task done
Labels
need more info Issue that requires more info from contributor

Comments

@wddpfx
Copy link

wddpfx commented Dec 9, 2024

Is there an already existing issue for this?

  • I have searched the existing issues

Expected behavior

We can create transport successfully, when run ros2 python example.

Current behavior

fastdds will stuck in asan in creating transport phrase, when run ros2 python example. But if the middleware is rti dds, or if i run ros2 c++ example, there is not this problem,.
There is stack:

(gdb) bt
#0  0x0000ffffbb57160c in __sanitizer::atomic_load<__sanitizer::atomic_uint8_t> (mo=__sanitizer::memory_order_acquire, a=0xffffba5e3038)
    at ../../../../src/libsanitizer/sanitizer_common/sanitizer_atomic_clang_other.h:43
#1  __sanitizer::atomic_load<__sanitizer::atomic_uint8_t> (mo=__sanitizer::memory_order_acquire, a=0xffffba5e3038)
    at ../../../../src/libsanitizer/sanitizer_common/sanitizer_atomic_clang_other.h:24
#2  __asan::AsanThread::GetStackBounds (this=0xffffba5e3000) at ../../../../src/libsanitizer/asan/asan_thread.cc:162
#3  __asan::AsanThread::stack_top (this=this@entry=0xffffba5e3000) at ../../../../src/libsanitizer/asan/asan_thread.cc:178
#4  0x0000ffffbb56fadc in __asan_handle_no_return () at ../../../../src/libsanitizer/asan/asan_rtl.cc:542
#5  0x0000ffffbb4b26c4 in __interceptor___cxa_throw (a=0xffffb3d2d380, b=0xffffaa79e2a8 <typeinfo for std::system_error>, c=0xffffaa692ba0 <std::system_error::~system_error()>)
    at ../../../../src/libsanitizer/asan/asan_interceptors.cc:328
#6  0x0000ffffa254ee44 in void asio::detail::throw_exception<std::system_error>(std::system_error const&) () from /zeekr_plt/platform/ros/galactic/install/lib/libfastrtps.so.2.11
#7  0x0000ffffa2d305f8 in asio::detail::do_throw_error(std::error_code const&, char const*) [clone .isra.0] () from /zeekr_plt/platform/ros/galactic/install/lib/libfastrtps.so.2.11
#8  0x0000ffffa2d49a1c in eprosima::fastdds::rtps::UDPv4Transport::OpenAndBindInputSocket(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned short, bool) () from /zeekr_plt/platform/ros/galactic/install/lib/libfastrtps.so.2.11
#9  0x0000ffffa2d985a8 in eprosima::fastdds::rtps::UDPTransportInterface::CreateInputChannelResource(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, eprosima::fastrtps::rtps::Locator_t const&, bool, unsigned int, eprosima::fastdds::rtps::TransportReceiverInterface*) ()
   from /zeekr_plt/platform/ros/galactic/install/lib/libfastrtps.so.2.11
#10 0x0000ffffa2dacfd8 in eprosima::fastdds::rtps::UDPTransportInterface::OpenAndBindInputSockets(eprosima::fastrtps::rtps::Locator_t const&, eprosima::fastdds::rtps::TransportReceiverInterface*, bool, unsigned int) () from /zeekr_plt/platform/ros/galactic/install/lib/libfastrtps.so.2.11
#11 0x0000ffffa2d45244 in eprosima::fastdds::rtps::UDPv4Transport::OpenInputChannel(eprosima::fastrtps::rtps::Locator_t const&, eprosima::fastdds::rtps::TransportReceiverInterface*, unsigned int) () from /zeekr_plt/platform/ros/galactic/install/lib/libfastrtps.so.2.11
#12 0x0000ffffa29aa324 in eprosima::fastrtps::rtps::ReceiverResource::ReceiverResource(eprosima::fastdds::rtps::TransportInterface&, eprosima::fastrtps::rtps::Locator_t const&, unsigned int) () from /zeekr_plt/platform/ros/galactic/install/lib/libfastrtps.so.2.11
#13 0x0000ffffa299e36c in eprosima::fastrtps::rtps::NetworkFactory::BuildReceiverResources(eprosima::fastrtps::rtps::Locator_t&, std::vector<std::shared_ptr<eprosima::fastrtps::rtps::ReceiverResource>, std::allocator<std::shared_ptr<eprosima::fastrtps::rtps::ReceiverResource> > >&, unsigned int) ()
   from /zeekr_plt/platform/ros/galactic/install/lib/libfastrtps.so.2.11
#14 0x0000ffffa29b45a4 in eprosima::fastrtps::rtps::RTPSParticipantImpl::createReceiverResources(eprosima::fastdds::rtps::LocatorList&, bool, bool) ()
   from /zeekr_plt/platform/ros/galactic/install/lib/libfastrtps.so.2.11
#15 0x0000ffffa29d10ac in eprosima::fastrtps::rtps::RTPSParticipantImpl::RTPSParticipantImpl(unsigned int, eprosima::fastrtps::rtps::RTPSParticipantAttributes const&, eprosima::fastrtps::rtps::GuidPrefix_t const&, eprosima::fastrtps::rtps::GuidPrefix_t const&, eprosima::fastrtps::rtps::RTPSParticipant*, eprosima::fastrtps::rtps::RTPSParticipantListener*) ()
   from /zeekr_plt/platform/ros/galactic/install/lib/libfastrtps.so.2.11
#16 0x0000ffffa2a053c4 in eprosima::fastrtps::rtps::RTPSDomainImpl::createParticipant(unsigned int, bool, eprosima::fastrtps::rtps::RTPSParticipantAttributes const&, eprosima::fastrtps::rtps::RTPSParticipantListener*) () from /zeekr_plt/platform/ros/galactic/install/lib/libfastrtps.so.2.11
#17 0x0000ffffa2c5091c in eprosima::fastdds::dds::DomainParticipantImpl::enable() () from /zeekr_plt/platform/ros/galactic/install/lib/libfastrtps.so.2.11
#18 0x0000ffffa2c86008 in eprosima::fastdds::dds::DomainParticipant::enable() () from /zeekr_plt/platform/ros/galactic/install/lib/libfastrtps.so.2.11
#19 0x0000ffffa2c12fcc in eprosima::fastdds::dds::DomainParticipantFactory::create_participant(unsigned int, eprosima::fastdds::dds::DomainParticipantQos const&, eprosima::fastdds::dds::DomainParticipantListener*, eprosima::fastdds::dds::StatusMask const&) () from /zeekr_plt/platform/ros/galactic/install/lib/libfastrtps.so.2.11
#20 0x0000ffffb40aa164 in rmw_fastrtps_shared_cpp::create_participant(char const*, unsigned long, rmw_security_options_t const*, bool, char const*, rmw_dds_common::Context*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) ()
   from /zeekr_plt/platform/ros/galactic/install/lib/librmw_fastrtps_shared_cpp.so

And sometimes stuck when create udp transport, sometimes stuck when creating SHM transport.

Steps to reproduce

  1. Compile ros2 source code.
  2. Compile ros2 python example "examples_rclpy_minimal_publisher" package
  3. Compile fastdds with asan.
  4. Run this package in aarach64 linux platform with environment "export LD_PRELOAD=/usr/lib/gcc/aarch64-linux-gnu/9/libasan.so"

企业微信截图_1733747960211

Fast DDS version/commit

2.11.2

Platform/Architecture

Ubuntu Focal 20.04 arm64

Transport layer

Default configuration, UDPv4 & SHM

Additional context

Linux tegra-ubuntu 5.15.116-rt-tegra #1 SMP PREEMPT_RT Thu Jul 11 18:09:19 CST 2024 aarch64 aarch64 aarch64 GNU/Linux

ros2 version:galactic

XML configuration file

No response

Relevant log output

No response

Network traffic capture

No response

@wddpfx wddpfx added the triage Issue pending classification label Dec 9, 2024
@EugenioCollado
Copy link
Contributor

Hi @wddpfx ,

Since you are using Fast DDS version 2.11, which is a deprecated version, and Ubuntu 20.04, which is a not supported platform, we recommend updating to a supported version of Fast DDS and trying it on a compatible platform. You can find details on supported versions here, and the tier list of supported platforms here.

We recommend trying one of the supported Fast DDS versions on a platform that best suits your requirements. If the issue persists after updating, please let us know so we can further investigate.

Thank you for your understanding, and we look forward to your feedback!

@wddpfx
Copy link
Author

wddpfx commented Dec 17, 2024 via email

@EugenioCollado EugenioCollado added need more info Issue that requires more info from contributor and removed triage Issue pending classification labels Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need more info Issue that requires more info from contributor
Projects
None yet
Development

No branches or pull requests

2 participants