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

[14362] TypeLookupSubsriber Segmentation fault #2635

Closed
1 task done
lubowu opened this issue Apr 12, 2022 · 8 comments
Closed
1 task done

[14362] TypeLookupSubsriber Segmentation fault #2635

lubowu opened this issue Apr 12, 2022 · 8 comments
Labels
need more info Issue that requires more info from contributor

Comments

@lubowu
Copy link

lubowu commented Apr 12, 2022

Is there an already existing issue for this?

  • I have searched the existing issues

Expected behavior

 @bit_bound(8)
            bitmask MyBitMask
                    {
                            @position(0) flag0,
                            @position(1) flag1,
                            @position(4) flag4,
                            @position(6) flag6,
                            flag7
                    };
            struct HelloWorldTopic
            {
//                @Key BoxType id;
                MyBitMask id;
                unsigned long index;
                string message;
                string test;
                world hello;
            };

publisher this idl,the typelookup Segmentation fault

Current behavior

eprosima::fastrtps::types::TypeIdentifier::operator=(eprosima::fastrtps::types::TypeIdentifier const&) [clone .localalias.55] 0x00007ffff7537131
eprosima::fastrtps::types::TypeObjectFactory::fill_complete_information(eprosima::fastrtps::types::TypeInformation*, eprosima::fastrtps::types::TypeIdentifier const*) const 0x00007ffff7561430
eprosima::fastrtps::types::TypeObjectFactory::fill_complete_dependant_types(eprosima::fastrtps::types::TypeInformation*, eprosima::fastrtps::types::TypeIdentifier const*) const 0x00007ffff75624ed
eprosima::fastrtps::types::TypeObjectFactory::fill_complete_information(eprosima::fastrtps::types::TypeInformation*, eprosima::fastrtps::types::TypeIdentifier const*) const 0x00007ffff7561ab9
eprosima::fastrtps::types::TypeObjectFactory::get_type_information(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const 0x00007ffff75621e4
eprosima::fastrtps::rtps::EDP::newLocalReaderProxyData(eprosima::fastrtps::rtps::RTPSReader*, eprosima::fastrtps::TopicAttributes const&, eprosima::fastdds::dds::ReaderQos const&, eprosima::fastdds::rtps::ContentFilterProperty const*)::{lambda(eprosima::fastrtps::rtps::ReaderProxyData*, bool, eprosima::fastrtps::rtps::ParticipantProxyData const&)#1}::operator()(eprosima::fastrtps::rtps::ReaderProxyData*, bool, eprosima::fastrtps::rtps::ParticipantProxyData const&) const 0x00007ffff75bffe8
eprosima::fastrtps::rtps::PDP::addReaderProxyData(eprosima::fastrtps::rtps::GUID_t const&, eprosima::fastrtps::rtps::GUID_t&, std::function<bool (eprosima::fastrtps::rtps::ReaderProxyData*, bool, eprosima::fastrtps::rtps::ParticipantProxyData const&)>) 0x00007ffff75b02d6
eprosima::fastrtps::rtps::EDP::newLocalReaderProxyData(eprosima::fastrtps::rtps::RTPSReader*, eprosima::fastrtps::TopicAttributes const&, eprosima::fastdds::dds::ReaderQos const&, eprosima::fastdds::rtps::ContentFilterProperty const*) 0x00007ffff75c8fe2
eprosima::fastrtps::rtps::BuiltinProtocols::addLocalReader(eprosima::fastrtps::rtps::RTPSReader*, eprosima::fastrtps::TopicAttributes const&, eprosima::fastdds::dds::ReaderQos const&, eprosima::fastdds::rtps::ContentFilterProperty const*) 0x00007ffff75a130b
eprosima::fastdds::dds::DataReaderImpl::enable() 0x00007ffff7439a31
eprosima::fastdds::dds::DataReader::enable() 0x00007ffff742fc7a
eprosima::fastdds::dds::SubscriberImpl::create_datareader(eprosima::fastdds::dds::TopicDescription*, eprosima::fastdds::dds::DataReaderQos const&, eprosima::fastdds::dds::DataReaderListener*, eprosima::fastdds::dds::StatusMask const&) 0x00007ffff7428112
DynamicDataSubscriber::SubListener::on_type_information_received(eprosima::fastdds::dds::DomainParticipant*, eprosima::fastrtps::fixed_string<255ul>, eprosima::fastrtps::fixed_string<255ul>, eprosima::fastrtps::types::TypeInformation const&)::{lambda(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, eprosima::fastrtps::types::DynamicType_ptr)#1}::operator()(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, eprosima::fastrtps::types::DynamicType_ptr) const 0x00007ffff7b92bde
std::_Function_handler<void (std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, eprosima::fastrtps::types::DynamicType_ptr), DynamicDataSubscriber::SubListener::on_type_information_received(eprosima::fastdds::dds::DomainParticipant*, eprosima::fastrtps::fixed_string<255ul>, eprosima::fastrtps::fixed_string<255ul>, eprosima::fastrtps::types::TypeInformation const&)::{lambda(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, eprosima::fastrtps::types::DynamicType_ptr)#1}>::_M_invoke(std::_Any_data const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, eprosima::fastrtps::types::DynamicType_ptr&&) 0x00007ffff7b932f4
eprosima::fastdds::dds::DomainParticipantImpl::check_get_type_request(eprosima::fastrtps::rtps::SampleIdentity const&, eprosima::fastrtps::types::TypeIdentifier const*, eprosima::fastrtps::types::TypeObject const*, eprosima::fastrtps::types::DynamicType_ptr) 0x00007ffff7466bd8
eprosima::fastdds::dds::DomainParticipantImpl::MyRTPSParticipantListener::on_type_discovery(eprosima::fastrtps::rtps::RTPSParticipant*, eprosima::fastrtps::rtps::SampleIdentity const&, eprosima::fastrtps::fixed_string<255ul> const&, eprosima::fastrtps::types::TypeIdentifier const*, eprosima::fastrtps::types::TypeObject const*, eprosima::fastrtps::types::DynamicType_ptr) 0x00007ffff7466d59
eprosima::fastdds::dds::builtin::TypeLookupReplyListener::onNewCacheChangeAdded(eprosima::fastrtps::rtps::RTPSReader*, eprosima::fastrtps::rtps::CacheChange_t const*) 0x00007ffff7480db9
eprosima::fastrtps::rtps::StatefulReader::NotifyChanges(eprosima::fastrtps::rtps::WriterProxy*) 0x00007ffff73618bd
eprosima::fastrtps::rtps::StatefulReader::change_received(eprosima::fastrtps::rtps::CacheChange_t*, eprosima::fastrtps::rtps::WriterProxy*, unsigned long) 0x00007ffff73619a6
eprosima::fastrtps::rtps::StatefulReader::processDataMsg(eprosima::fastrtps::rtps::CacheChange_t*) 0x00007ffff736a630
eprosima::fastrtps::rtps::MessageReceiver::process_data_message_without_security(eprosima::fastrtps::rtps::EntityId_t const&, eprosima::fastrtps::rtps::CacheChange_t&) 0x00007ffff738c79f
eprosima::fastrtps::rtps::MessageReceiver::proc_Submsg_Data(eprosima::fastrtps::rtps::CDRMessage_t*, eprosima::fastrtps::rtps::SubmessageHeader_t*) 0x00007ffff7396ffd
eprosima::fastrtps::rtps::MessageReceiver::processCDRMsg(eprosima::fastrtps::rtps::Locator_t const&, eprosima::fastrtps::rtps::Locator_t const&, eprosima::fastrtps::rtps::CDRMessage_t*) 0x00007ffff73998ab
eprosima::fastrtps::rtps::ReceiverResource::OnDataReceived(unsigned char const*, unsigned int, eprosima::fastrtps::rtps::Locator_t const&, eprosima::fastrtps::rtps::Locator_t const&) 0x00007ffff739cb76
eprosima::fastdds::rtps::SharedMemChannelResource::perform_listen_operation(eprosima::fastrtps::rtps::Locator_t) 0x00007ffff76df914
std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (eprosima::fastdds::rtps::SharedMemChannelResource::*)(eprosima::fastrtps::rtps::Locator_t), eprosima::fastdds::rtps::SharedMemChannelResource*, eprosima::fastrtps::rtps::Locator_t> > >::_M_run() 0x00007ffff76d55ac
<unknown> 0x00007ffff6bce6df
start_thread 0x00007ffff6ea16db
clone 0x00007ffff662961f

Steps to reproduce

。。。

Fast DDS version/commit

V2.6.0

Platform/Architecture

Ubuntu Focal 20.04 amd64

Transport layer

UDPv4

Additional context

No response

XML configuration file

No response

Relevant log output

No response

Network traffic capture

No response

@lubowu lubowu added the triage Issue pending classification label Apr 12, 2022
@MiguelCompany MiguelCompany added need more info Issue that requires more info from contributor and removed triage Issue pending classification labels Apr 12, 2022
@MiguelCompany
Copy link
Member

@lubowu We check dynamically subscribing to a topic on this test.

Would you mind sharing a reproducible example, so we can analyze whether this is a bug or a misuse of the library?

@MiguelCompany MiguelCompany changed the title TypeLookupSubsriber Segmentation fault [14362] TypeLookupSubsriber Segmentation fault Apr 12, 2022
@lubowu
Copy link
Author

lubowu commented Apr 13, 2022

workspace_DDSHelloWorld.zip
TypeLookupService.zip
1、run HelloWorld
./HelloWorld publisher
2、run TypeLookupExample
./TypeLookupExample subscriber

@lubowu lubowu closed this as completed Jun 2, 2022
@lubowu lubowu reopened this Jun 2, 2022
@JLBuenoLopez JLBuenoLopez removed the need more info Issue that requires more info from contributor label Jun 2, 2022
@lubowu
Copy link
Author

lubowu commented Jun 16, 2022

Have you verified this problem?

@MiguelCompany
Copy link
Member

@lubowu Sorry, we haven't had time yet to check this. We'll try to find some time for it this week.

@Mario-DL
Copy link
Member

Hi @lubowu,
Sorry for the delay in the response. I could reproduce the issue. Unfortunately, the current implementation supports simple types, but we are currently working on improving that. As a result, nesting the world struct inside the HelloWorldTopic would be invalid.

As a workaround, I suggest doing a couple of things, first, modifying the HelloWorld.idl (find it attached, HelloWorldMod), then applying the patch (also attached) that includes a correction when dealing with enums and finally edit the HelloWorldPublisher to publish messages of type HelloWorldTopicMod instead. Check if that overcomes the issue.

files.zip

@Mario-DL Mario-DL added the in progress Issue or PR which is being reviewed label Jun 22, 2023
@JLBuenoLopez JLBuenoLopez added the bug Issue to report a bug label Jul 20, 2023
@bshantam97
Copy link

bshantam97 commented Jul 16, 2024

I am facing the same issue , and my backtrace on gdb is the exact same for FastDDS 2.13.2 Has there been a resolution for this yet ? @Mario-DL

@JesusPoderoso
Copy link
Contributor

Hi @lubowu @bshantam97 , Fast DDS v3.0.0 has been released. It includes Dynamic Types refactor that may have fixed the described issue. Could you check if the problem persists?

@JesusPoderoso JesusPoderoso added need more info Issue that requires more info from contributor and removed bug Issue to report a bug in progress Issue or PR which is being reviewed labels Aug 29, 2024
@Mario-DL
Copy link
Member

Mario-DL commented Sep 5, 2024

As the Dynamic Types refactor has been already introduced in the latest Fast DDS v3.0.0, we internally agreed to close all Dynamic-Types related issues.
We elaborated a Migration guide to help with the upgrade process to this new major release.

Please, feel free to reopen it if the issue persists.

@Mario-DL Mario-DL closed this as completed Sep 5, 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

6 participants