Skip to content

Segmentation fault on dds_delete_topic_descriptor #2318

@paulsohn

Description

@paulsohn

I'm not actually sure if this is a DDS issue or an RMW issue, but dds_delete_topic_descriptor called from RMW dynamic_type_register occasionally gives a segfault. This occurs on node initialization phase.

glog stack trace:

*** Aborted at 1762942890 (unix time) try "date -d @1762942890" if you are using GNU date ***
PC: @                0x0 (unknown)
*** SIGSEGV (@0x0) received by PID 5866 (TID 0x7f13f4736680) from PID 0; stack trace: ***
    @     0x7f13f4fcc4d6 google::(anonymous namespace)::FailureSignalHandler()
    @     0x7f13f4442520 (unknown)
    @     0x7f13f433a65d ddsi_topic_descriptor_fini
    @     0x7f13f435c912 dds_delete_topic_descriptor
    @     0x7f13f46ebdfa dynamic_type_register()
    @     0x7f13f46f2118 create_msg_dds_dynamic_type()
    @     0x7f13f46c8166 create_cdds_subscription()
    @     0x7f13f46c8518 create_subscription()
    @     0x7f13f46caa20 rmw_create_subscription
    @     0x7f13f4be7b70 rcl_subscription_init
    @     0x7f13f4e1db36 rclcpp::SubscriptionBase::SubscriptionBase()
    @     0x7f13f3330ba2 rclcpp::Subscription<>::Subscription()
    @     0x7f13f3331dac _ZNSt17_Function_handlerIFSt10shared_ptrIN6rclcpp16SubscriptionBaseEEPNS1_15node_interfaces17NodeBaseInterfaceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS1_3QoSEEZNS1_27create_subscription_factoryIN21tier4_perception_msgs3msg27DetectedObjectsWithFeature_ISaIvEEEZN8autoware29image_projection_based_fusion10FusionNodeIN24autoware_perception_msgs3msg16DetectedObjects_ISN_EESO_SV_EC4ESE_RKNS1_11NodeOptionsEEUlS0_IKSO_EE0_SN_NS1_12SubscriptionISO_SN_SO_SO_NS1_23message_memory_strategy21MessageMemoryStrategyISO_SN_EEEES16_SO_EENS1_19SubscriptionFactoryEOT0_RKNS1_32SubscriptionOptionsWithAllocatorIT1_EENT3_9SharedPtrES0_INS1_16topic_statistics27SubscriptionTopicStatisticsIT4_EEEEUlS6_SE_SH_E_E9_M_invokeERKSt9_Any_dataOS6_SE_SH_
    @     0x7f13f4db949c rclcpp::node_interfaces::NodeTopics::create_subscription()
(...)

My working environment is a bit complex;

Is there any possibility that deleting a topic descriptor suffers from some race condition?
At a glimpse it seems like finding a topic and deleting a topic descriptor has raced, and the ddsi_topic_descriptor_fini function lacks a locking mechanism.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions