Closed sgf201 closed 4 months ago
root cause found,The loan API actually affects the way some APIs are used in ROS2, and developers who implement it at a slightly lower level need to handle it carefully https://github.com/foxglove/ros-foxglove-bridge/issues/280
Operating system: Ubuntu 20.04 LTS
Compiler version: GCC 9.4.0
Eclipse iceoryx version: 2.0.3
rmw_cyclonedds version: 1.3.4 cyclonedds version: 0.10.3
Observed result or behaviour: loaned api deserialize crash turn off loaned api it worked [decodec-1] https://github.com/eclipse-iceoryx/iceoryx/issues/12 Object "/home/admin/5v5r/fsinstall/nov_codec/lib/nov_codec/decodec", at 0xaaaae95184e3, in [decodec-1] https://github.com/eclipse-iceoryx/iceoryx/pull/11 Object "/lib/aarch64-linux-gnu/libc.so.6", at 0xffff823bfe0f, in __libc_start_main [decodec-1] https://github.com/eclipse-iceoryx/iceoryx/issues/10 Object "/home/admin/5v5r/fsinstall/nov_codec/lib/nov_codec/decodec", at 0xaaaae9518b57, in main [decodec-1] https://github.com/eclipse-iceoryx/iceoryx/pull/9 Object "/opt/nros/lib/librclcpp.so", at 0xffff828fad83, in rclcpp::executors::SingleThreadedExecutor::spin() [decodec-1] https://github.com/eclipse-iceoryx/iceoryx/issues/8 Object "/opt/nros/lib/librclcpp.so", at 0xffff828f42fb, in rclcpp::Executor::execute_any_executable(rclcpp::AnyExecutable&) [decodec-1] https://github.com/eclipse-iceoryx/iceoryx/issues/7 Object "/opt/nros/lib/librclcpp.so", at 0xffff828f2fcb, in rclcpp::Executor::execute_subscription(std::shared_ptrrclcpp::SubscriptionBase) [decodec-1] https://github.com/eclipse-iceoryx/iceoryx/pull/6 Object "/opt/nros/lib/librclcpp.so", at 0xffff828f208b, in [decodec-1] https://github.com/eclipse-iceoryx/iceoryx/issues/5 Object "/opt/nros/lib/librclcpp.so", at 0xffff828f1ee3, in [decodec-1] https://github.com/eclipse-iceoryx/iceoryx/pull/4 Object "/opt/nros/lib/librcl.so", at 0xffff8233183b, in rcl_take_loaned_message [decodec-1] https://github.com/eclipse-iceoryx/iceoryx/issues/3 Object "/opt/nros/lib/librmw_cyclonedds_cpp.so", at 0xffff81f7bcd3, in [decodec-1] https://github.com/eclipse-iceoryx/iceoryx/pull/2 Object "/opt/nros/lib/librmw_cyclonedds_cpp.so", at 0xffff81f7b5a7, in rmw_deserialize [decodec-1] https://github.com/eclipse-iceoryx/iceoryx/issues/1 Object "/opt/nros/lib/librmw_cyclonedds_cpp.so", at 0xffff81f88b07, in [decodec-1] #0 Object "/opt/nros/lib/librmw_cyclonedds_cpp.so", at 0xffff81f88a84, in [decodec-1] Segmentation fault (Address not mapped to object [(nil)])
Expected result or behaviour: What do you expect to happen? worked Conditions where it occurred / Performed steps: Describe how one can reproduce the bug. code in foxglove_bridge // Copy the message payload into a SerializedMessage object rclcpp::SerializedMessage serializedMessage{message.getLength()}; auto& rclSerializedMsg = serializedMessage.get_rcl_serialized_message(); std::memcpy(rclSerializedMsg.buffer, message.getData(), message.getLength()); rclSerializedMsg.buffer_length = message.getLength();
// Publish the message publisher->publish(serializedMessage);
https://github.com/eclipse-iceoryx/iceoryx/issues/2136