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

bag play command segfaults #110

Closed
kgreenek opened this issue May 14, 2023 · 5 comments · Fixed by #112
Closed

bag play command segfaults #110

kgreenek opened this issue May 14, 2023 · 5 comments · Fixed by #112
Labels
help wanted Extra attention is needed

Comments

@kgreenek
Copy link
Contributor

kgreenek commented May 14, 2023

Steps to reproduce:

cd [path to rules_ros2 repo]/examples
bazel build chatter/...

# It is necessary to run the bag command from the runfiles directory.
# See: [#96](https://github.com/mvukov/rules_ros2/issues/96)
cd ./bazel-out/k8-fastbuild/bin/chatter/bag.runfiles/com_github_mvukov_rules_ros2_examples

./chatter/bag play [path to bag file]

Running the above command results in a segfault. The segfault occurs at the very end of playback just before the bag playback is finished.

Some more context:
Following #96, I created a wrapper script that replaces all relative paths passed to the bag command with absolute paths. The wrapper script then finds the runfiles directory and cd's into it before invoking the underlying bag command.

This is working ok as a work-around except for the bag play command. For some reason the bag play command segfaults.

If I run the same command using bazel run chatter:bag -- play [path to bag file], then it does not segfault. So there seems to be something different about the build environment compared to the environment when running the output binary.

@kgreenek kgreenek changed the title bag play command crashes segfaults when run directly bag play command segfaults when run directly May 14, 2023
@kgreenek kgreenek changed the title bag play command segfaults when run directly bag play command segfaults May 14, 2023
@mvukov
Copy link
Owner

mvukov commented May 14, 2023

You could run the binary under valgrind/strace and see if that provides extra info.

@mvukov mvukov added the help wanted Extra attention is needed label May 14, 2023
@kgreenek
Copy link
Contributor Author

Good idea. I was able to get the backtrace by running python3 under GDB and then running the bag launcher script from there.

Thread 1 "python3" received signal SIGSEGV, Segmentation fault.
__strlen_evex () at ../sysdeps/x86_64/multiarch/strlen-evex.S:77
77	../sysdeps/x86_64/multiarch/strlen-evex.S: No such file or directory.

Here is the full backtrace. It looks like the segfault might be happening in the destructor of the Player.

#0  __strlen_evex () at ../sysdeps/x86_64/multiarch/strlen-evex.S:77
#1  0x00007ffff1b1bc5c in std::char_traits<char>::length(char const*) () from external/ros2_rmw_cyclonedds/librmw_cyclonedds.so
#2  0x00007ffff1b1d213 in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string<std::allocator<char> >(char const*, std::allocator<char> const&) ()
   from external/ros2_rmw_cyclonedds/librmw_cyclonedds.so
#3  0x00007ffff1b96077 in sertype_rmw_hash(ddsi_sertype const*) () from external/ros2_rmw_cyclonedds/librmw_cyclonedds.so
#4  0x00007ffff1b9f308 in ddsi_sertype_hash () from external/ros2_rmw_cyclonedds/librmw_cyclonedds.so
#5  0x00007ffff1bba993 in ddsrt_hh_remove () from external/ros2_rmw_cyclonedds/librmw_cyclonedds.so
#6  0x00007ffff1b9f42c in ddsi_sertype_unref_locked () from external/ros2_rmw_cyclonedds/librmw_cyclonedds.so
#7  0x00007ffff1b9f4ff in ddsi_sertype_unref () from external/ros2_rmw_cyclonedds/librmw_cyclonedds.so
#8  0x00007ffff1baa2b3 in dds_delete_impl_pinned () from external/ros2_rmw_cyclonedds/librmw_cyclonedds.so
#9  0x00007ffff1baa791 in dds_writer_delete () from external/ros2_rmw_cyclonedds/librmw_cyclonedds.so
#10 0x00007ffff1baa43f in dds_delete_impl_pinned () from external/ros2_rmw_cyclonedds/librmw_cyclonedds.so
#11 0x00007ffff1b32496 in destroy_publisher(rmw_publisher_s*) () from external/ros2_rmw_cyclonedds/librmw_cyclonedds.so
#12 0x00007ffff1b32aa5 in rmw_destroy_publisher () from external/ros2_rmw_cyclonedds/librmw_cyclonedds.so
#13 0x00007ffff40c63fe in rmw_destroy_publisher ()
   from /home/kgk/.cache/bazel/_bazel_kgk/ae5c2003acad6a67c2ff6afdb8163595/execroot/com_github_mvukov_rules_ros2_examples/bazel-out/k8-fastbuild/bin/chatter/bag.runfiles/ros2_rosbag2/rosbag2_py/rosbag2_py/_transport.so
#14 0x00007ffff400589b in rcl_publisher_fini ()
   from /home/kgk/.cache/bazel/_bazel_kgk/ae5c2003acad6a67c2ff6afdb8163595/execroot/com_github_mvukov_rules_ros2_examples/bazel-out/k8-fastbuild/bin/chatter/bag.runfiles/ros2_rosbag2/rosbag2_py/rosbag2_py/_transport.so
#15 0x00007ffff3ea0ce3 in rclcpp::PublisherBase::PublisherBase(rclcpp::node_interfaces::NodeBaseInterface*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, rosidl_message_type_support_t const&, rcl_publisher_options_s const&)::{lambda(rcl_publisher_s*)#1}::operator()(rcl_publisher_s*) const ()
   from /home/kgk/.cache/bazel/_bazel_kgk/ae5c2003acad6a67c2ff6afdb8163595/execroot/com_github_mvukov_rules_ros2_examples/bazel-out/k8-fastbuild/bin/chatter/bag.runfiles/ros2_rosbag2/rosbag2_py/rosbag2_py/_transport.so
#16 0x00007ffff3ea3612 in std::_Sp_counted_deleter<rcl_publisher_s*, rclcpp::PublisherBase::PublisherBase(rclcpp::node_interfaces::NodeBaseInterface*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, rosidl_message_type_support_t const&, rcl_publisher_options_s const&)::{lambda(rcl_publisher_s*)#1}, std::allocator<void>, (__gnu_cxx::_Lock_policy)2>::_M_dispose() ()
   from /home/kgk/.cache/bazel/_bazel_kgk/ae5c2003acad6a67c2ff6afdb8163595/execroot/com_github_mvukov_rules_ros2_examples/bazel-out/k8-fastbuild/bin/chatter/bag.runfiles/ros2_rosbag2/rosbag2_py/rosbag2_py/_transport.so
#17 0x00007ffff3cbb2e2 in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release() ()
   from /home/kgk/.cache/bazel/_bazel_kgk/ae5c2003acad6a67c2ff6afdb8163595/execroot/com_github_mvukov_rules_ros2_examples/bazel-out/k8-fastbuild/bin/chatter/bag.runfiles/ros2_rosbag2/rosbag2_py/rosbag2_py/_transport.so
#18 0x00007ffff3cb45fb in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() ()
   from /home/kgk/.cache/bazel/_bazel_kgk/ae5c2003acad6a67c2ff6afdb8163595/execroot/com_github_mvukov_rules_ros2_examples/bazel-out/k8-fastbuild/bin/chatter/bag.runfiles/ros2_rosbag2/rosbag2_py/rosbag2_py/_transport.so
#19 0x00007ffff3d5ac38 in std::__shared_ptr<rcl_publisher_s, (__gnu_cxx::_Lock_policy)2>::~__shared_ptr() ()
   from /home/kgk/.cache/bazel/_bazel_kgk/ae5c2003acad6a67c2ff6afdb8163595/execroot/com_github_mvukov_rules_ros2_examples/bazel-out/k8-fastbuild/bin/chatter/bag.runfiles/ros2_rosbag2/rosbag2_py/rosbag2_py/_transport.so
#20 0x00007ffff3d5ac82 in std::shared_ptr<rcl_publisher_s>::~shared_ptr() ()
   from /home/kgk/.cache/bazel/_bazel_kgk/ae5c2003acad6a67c2ff6afdb8163595/execroot/com_github_mvukov_rules_ros2_examples/bazel-out/k8-fastbuild/bin/chatter/bag.runfiles/ros2_rosbag2/rosbag2_py/rosbag2_py/_transport.so
#21 0x00007ffff3ea1c8d in rclcpp::PublisherBase::~PublisherBase() ()
   from /home/kgk/.cache/bazel/_bazel_kgk/ae5c2003acad6a67c2ff6afdb8163595/execroot/com_github_mvukov_rules_ros2_examples/bazel-out/k8-fastbuild/bin/chatter/bag.runfiles/ros2_rosbag2/rosbag2_py/rosbag2_py/_transport.so
#22 0x00007ffff3df3f1c in rclcpp::GenericPublisher::~GenericPublisher() ()
   from /home/kgk/.cache/bazel/_bazel_kgk/ae5c2003acad6a67c2ff6afdb8163595/execroot/com_github_mvukov_rules_ros2_examples/bazel-out/k8-fastbuild/bin/chatter/bag.runfiles/ros2_rosbag2/rosbag2_py/rosbag2_py/_transport.so
#23 0x00007ffff3dfe4a3 in void __gnu_cxx::new_allocator<rclcpp::GenericPublisher>::destroy<rclcpp::GenericPublisher>(rclcpp::GenericPublisher*) ()
   from /home/kgk/.cache/bazel/_bazel_kgk/ae5c2003acad6a67c2ff6afdb8163595/execroot/com_github_mvukov_rules_ros2_examples/bazel-out/k8-fastbuild/bin/chatter/bag.runfiles/ros2_rosbag2/rosbag2_py/rosbag2_py/_transport.so
#24 0x00007ffff3df9a05 in void std::allocator_traits<std::allocator<rclcpp::GenericPublisher> >::destroy<rclcpp::GenericPublisher>(std::allocator<rclcpp::GenericPublisher>&, rclcpp::GenericPublisher*) ()
   from /home/kgk/.cache/bazel/_bazel_kgk/ae5c2003acad6a67c2ff6afdb8163595/execroot/com_github_mvukov_rules_ros2_examples/bazel-out/k8-fastbuild/bin/chatter/bag.runfiles/ros2_rosbag2/rosbag2_py/rosbag2_py/_transport.so
#25 0x00007ffff3df71fd in std::_Sp_counted_ptr_inplace<rclcpp::GenericPublisher, std::allocator<rclcpp::GenericPublisher>, (__gnu_cxx::_Lock_policy)2>::_M_dispose() ()
   from /home/kgk/.cache/bazel/_bazel_kgk/ae5c2003acad6a67c2ff6afdb8163595/execroot/com_github_mvukov_rules_ros2_examples/bazel-out/k8-fastbuild/bin/chatter/bag.runfiles/ros2_rosbag2/rosbag2_py/rosbag2_py/_transport.so
#26 0x00007ffff3cbb2e2 in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release() ()
   from /home/kgk/.cache/bazel/_bazel_kgk/ae5c2003acad6a67c2ff6afdb8163595/execroot/com_github_mvukov_rules_ros2_examples/bazel-out/k8-fastbuild/bin/chatter/bag.runfiles/ros2_rosbag2/rosbag2_py/rosbag2_py/_transport.so
#27 0x00007ffff3cb45fb in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() ()
   from /home/kgk/.cache/bazel/_bazel_kgk/ae5c2003acad6a67c2ff6afdb8163595/execroot/com_github_mvukov_rules_ros2_examples/bazel-out/k8-fastbuild/bin/chatter/bag.runfiles/ros2_rosbag2/rosbag2_py/rosbag2_py/_transport.so
#28 0x00007ffff3d9e54a in std::__shared_ptr<rclcpp::GenericPublisher, (__gnu_cxx::_Lock_policy)2>::~__shared_ptr() ()
   from /home/kgk/.cache/bazel/_bazel_kgk/ae5c2003acad6a67c2ff6afdb8163595/execroot/com_github_mvukov_rules_ros2_examples/bazel-out/k8-fastbuild/bin/chatter/bag.runfiles/ros2_rosbag2/rosbag2_py/rosbag2_py/_transport.so
#29 0x00007ffff3d9e56a in std::shared_ptr<rclcpp::GenericPublisher>::~shared_ptr() ()
   from /home/kgk/.cache/bazel/_bazel_kgk/ae5c2003acad6a67c2ff6afdb8163595/execroot/com_github_mvukov_rules_ros2_examples/bazel-out/k8-fastbuild/bin/chatter/bag.runfiles/ros2_rosbag2/rosbag2_py/rosbag2_py/_transport.so
#30 0x00007ffff3d9e7bc in rosbag2_transport::Player::PlayerPublisher::~PlayerPublisher() ()
   from /home/kgk/.cache/bazel/_bazel_kgk/ae5c2003acad6a67c2ff6afdb8163595/execroot/com_github_mvukov_rules_ros2_examples/bazel-out/k8-fastbuild/bin/chatter/bag.runfiles/ros2_rosbag2/rosbag2_py/rosbag2_py/_transport.so
#31 0x00007ffff3dfe52e in void __gnu_cxx::new_allocator<rosbag2_transport::Player::PlayerPublisher>::destroy<rosbag2_transport::Player::PlayerPublisher>(rosbag2_transport::Player::PlayerPublisher*) ()
   from /home/kgk/.cache/bazel/_bazel_kgk/ae5c2003acad6a67c2ff6afdb8163595/execroot/com_github_mvukov_rules_ros2_examples/bazel-out/k8-fastbuild/bin/chatter/bag.runfiles/ros2_rosbag2/rosbag2_py/rosbag2_py/_transport.so
#32 0x00007ffff3df9b39 in void std::allocator_traits<std::allocator<rosbag2_transport::Player::PlayerPublisher> >::destroy<rosbag2_transport::Player::PlayerPublisher>(std::allocator<rosbag2_transport::Player::PlayerPublisher>&, rosbag2_transport::Player::PlayerPublisher*) ()
   from /home/kgk/.cache/bazel/_bazel_kgk/ae5c2003acad6a67c2ff6afdb8163595/execroot/com_github_mvukov_rules_ros2_examples/bazel-out/k8-fastbuild/bin/chatter/bag.runfiles/ros2_rosbag2/rosbag2_py/rosbag2_py/_transport.so
#33 0x00007ffff3df74e3 in std::_Sp_counted_ptr_inplace<rosbag2_transport::Player::PlayerPublisher, std::allocator<rosbag2_transport::Player::PlayerPublisher>, (__gnu_cxx::_Lock_policy)2>::_M_dispose() ()
   from /home/kgk/.cache/bazel/_bazel_kgk/ae5c2003acad6a67c2ff6afdb8163595/execroot/com_github_mvukov_rules_ros2_examples/bazel-out/k8-fastbuild/bin/chatter/bag.runfiles/ros2_rosbag2/rosbag2_py/rosbag2_py/_transport.so
#34 0x00007ffff3cbb2e2 in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release() ()
   from /home/kgk/.cache/bazel/_bazel_kgk/ae5c2003acad6a67c2ff6afdb8163595/execroot/com_github_mvukov_rules_ros2_examples/bazel-out/k8-fastbuild/bin/chatter/bag.runfiles/ros2_rosbag2/rosbag2_py/rosbag2_py/_transport.so
#35 0x00007ffff3cb45fb in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() ()
   from /home/kgk/.cache/bazel/_bazel_kgk/ae5c2003acad6a67c2ff6afdb8163595/execroot/com_github_mvukov_rules_ros2_examples/bazel-out/k8-fastbuild/bin/chatter/bag.runfiles/ros2_rosbag2/rosbag2_py/rosbag2_py/_transport.so
#36 0x00007ffff3d9f350 in std::__shared_ptr<rosbag2_transport::Player::PlayerPublisher, (__gnu_cxx::_Lock_policy)2>::~__shared_ptr() ()
   from /home/kgk/.cache/bazel/_bazel_kgk/ae5c2003acad6a67c2ff6afdb8163595/execroot/com_github_mvukov_rules_ros2_examples/bazel-out/k8-fastbuild/bin/chatter/bag.runfiles/ros2_rosbag2/rosbag2_py/rosbag2_py/_transport.so
#37 0x00007ffff3d9f39a in std::shared_ptr<rosbag2_transport::Player::PlayerPublisher>::~shared_ptr() ()
--Type <RET> for more, q to quit, c to continue without paging--
   from /home/kgk/.cache/bazel/_bazel_kgk/ae5c2003acad6a67c2ff6afdb8163595/execroot/com_github_mvukov_rules_ros2_examples/bazel-out/k8-fastbuild/bin/chatter/bag.runfiles/ros2_rosbag2/rosbag2_py/rosbag2_py/_transport.so
#38 0x00007ffff3d9f404 in std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::shared_ptr<rosbag2_transport::Player::PlayerPublisher> >::~pair() ()
   from /home/kgk/.cache/bazel/_bazel_kgk/ae5c2003acad6a67c2ff6afdb8163595/execroot/com_github_mvukov_rules_ros2_examples/bazel-out/k8-fastbuild/bin/chatter/bag.runfiles/ros2_rosbag2/rosbag2_py/rosbag2_py/_transport.so
#39 0x00007ffff3db8a6e in void __gnu_cxx::new_allocator<std::__detail::_Hash_node<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::shared_ptr<rosbag2_transport::Player::PlayerPublisher> >, true> >::destroy<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::shared_ptr<rosbag2_transport::Player::PlayerPublisher> > >(std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::shared_ptr<rosbag2_transport::Player::PlayerPublisher> >*) ()
   from /home/kgk/.cache/bazel/_bazel_kgk/ae5c2003acad6a67c2ff6afdb8163595/execroot/com_github_mvukov_rules_ros2_examples/bazel-out/k8-fastbuild/bin/chatter/bag.runfiles/ros2_rosbag2/rosbag2_py/rosbag2_py/_transport.so
#40 0x00007ffff3db216d in void std::allocator_traits<std::allocator<std::__detail::_Hash_node<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::shared_ptr<rosbag2_transport::Player::PlayerPublisher> >, true> > >::destroy<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::shared_ptr<rosbag2_transport::Player::PlayerPublisher> > >(std::allocator<std::__detail::_Hash_node<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::shared_ptr<rosbag2_transport::Player::PlayerPublisher> >, true> >&, std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::shared_ptr<rosbag2_transport::Player::PlayerPublisher> >*) ()
   from /home/kgk/.cache/bazel/_bazel_kgk/ae5c2003acad6a67c2ff6afdb8163595/execroot/com_github_mvukov_rules_ros2_examples/bazel-out/k8-fastbuild/bin/chatter/bag.runfiles/ros2_rosbag2/rosbag2_py/rosbag2_py/_transport.so
#41 0x00007ffff3da9c85 in std::__detail::_Hashtable_alloc<std::allocator<std::__detail::_Hash_node<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::shared_ptr<rosbag2_transport::Player::PlayerPublisher> >, true> > >::_M_deallocate_node(std::__detail::_Hash_node<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::shared_ptr<rosbag2_transport::Player::PlayerPublisher> >, true>*) () from /home/kgk/.cache/bazel/_bazel_kgk/ae5c2003acad6a67c2ff6afdb8163595/execroot/com_github_mvukov_rules_ros2_examples/bazel-out/k8-fastbuild/bin/chatter/bag.runfiles/ros2_rosbag2/rosbag2_py/rosbag2_py/_transport.so
#42 0x00007ffff3da640d in std::__detail::_Hashtable_alloc<std::allocator<std::__detail::_Hash_node<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::shared_ptr<rosbag2_transport::Player::PlayerPublisher> >, true> > >::_M_deallocate_nodes(std::__detail::_Hash_node<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::shared_ptr<rosbag2_transport::Player::PlayerPublisher> >, true>*) ()
   from /home/kgk/.cache/bazel/_bazel_kgk/ae5c2003acad6a67c2ff6afdb8163595/execroot/com_github_mvukov_rules_ros2_examples/bazel-out/k8-fastbuild/bin/chatter/bag.runfiles/ros2_rosbag2/rosbag2_py/rosbag2_py/_transport.so
#43 0x00007ffff3da28b2 in std::_Hashtable<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::shared_ptr<rosbag2_transport::Player::PlayerPublisher> >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::shared_ptr<rosbag2_transport::Player::PlayerPublisher> > >, std::__detail::_Select1st, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<true, false, true> >::clear() ()
   from /home/kgk/.cache/bazel/_bazel_kgk/ae5c2003acad6a67c2ff6afdb8163595/execroot/com_github_mvukov_rules_ros2_examples/bazel-out/k8-fastbuild/bin/chatter/bag.runfiles/ros2_rosbag2/rosbag2_py/rosbag2_py/_transport.so
#44 0x00007ffff3d9fdb8 in std::_Hashtable<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::shared_ptr<rosbag2_transport::Player::PlayerPublisher> >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::shared_ptr<rosbag2_transport::Player::PlayerPublisher> > >, std::__detail::_Select1st, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<true, false, true> >::~_Hashtable() ()
   from /home/kgk/.cache/bazel/_bazel_kgk/ae5c2003acad6a67c2ff6afdb8163595/execroot/com_github_mvukov_rules_ros2_examples/bazel-out/k8-fastbuild/bin/chatter/bag.runfiles/ros2_rosbag2/rosbag2_py/rosbag2_py/_transport.so
#45 0x00007ffff3d9eb94 in std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::shared_ptr<rosbag2_transport::Player::PlayerPublisher>, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::shared_ptr<rosbag2_transport::Player::PlayerPublisher> > > >::~unordered_map() ()
   from /home/kgk/.cache/bazel/_bazel_kgk/ae5c2003acad6a67c2ff6afdb8163595/execroot/com_github_mvukov_rules_ros2_examples/bazel-out/k8-fastbuild/bin/chatter/bag.runfiles/ros2_rosbag2/rosbag2_py/rosbag2_py/_transport.so
#46 0x00007ffff3d894fb in rosbag2_transport::Player::~Player() ()
   from /home/kgk/.cache/bazel/_bazel_kgk/ae5c2003acad6a67c2ff6afdb8163595/execroot/com_github_mvukov_rules_ros2_examples/bazel-out/k8-fastbuild/bin/chatter/bag.runfiles/ros2_rosbag2/rosbag2_py/rosbag2_py/_transport.so
#47 0x00007ffff3ce3ebb in void __gnu_cxx::new_allocator<rosbag2_transport::Player>::destroy<rosbag2_transport::Player>(rosbag2_transport::Player*) ()
   from /home/kgk/.cache/bazel/_bazel_kgk/ae5c2003acad6a67c2ff6afdb8163595/execroot/com_github_mvukov_rules_ros2_examples/bazel-out/k8-fastbuild/bin/chatter/bag.runfiles/ros2_rosbag2/rosbag2_py/rosbag2_py/_transport.so
#48 0x00007ffff3ce3d4d in void std::allocator_traits<std::allocator<rosbag2_transport::Player> >::destroy<rosbag2_transport::Player>(std::allocator<rosbag2_transport::Player>&, rosbag2_transport::Player*) ()
   from /home/kgk/.cache/bazel/_bazel_kgk/ae5c2003acad6a67c2ff6afdb8163595/execroot/com_github_mvukov_rules_ros2_examples/bazel-out/k8-fastbuild/bin/chatter/bag.runfiles/ros2_rosbag2/rosbag2_py/rosbag2_py/_transport.so
#49 0x00007ffff3ce395d in std::_Sp_counted_ptr_inplace<rosbag2_transport::Player, std::allocator<rosbag2_transport::Player>, (__gnu_cxx::_Lock_policy)2>::_M_dispose() ()
   from /home/kgk/.cache/bazel/_bazel_kgk/ae5c2003acad6a67c2ff6afdb8163595/execroot/com_github_mvukov_rules_ros2_examples/bazel-out/k8-fastbuild/bin/chatter/bag.runfiles/ros2_rosbag2/rosbag2_py/rosbag2_py/_transport.so
#50 0x00007ffff3cbb2e2 in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release() ()
   from /home/kgk/.cache/bazel/_bazel_kgk/ae5c2003acad6a67c2ff6afdb8163595/execroot/com_github_mvukov_rules_ros2_examples/bazel-out/k8-fastbuild/bin/chatter/bag.runfiles/ros2_rosbag2/rosbag2_py/rosbag2_py/_transport.so
#51 0x00007ffff3cb45fb in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() ()
   from /home/kgk/.cache/bazel/_bazel_kgk/ae5c2003acad6a67c2ff6afdb8163595/execroot/com_github_mvukov_rules_ros2_examples/bazel-out/k8-fastbuild/bin/chatter/bag.runfiles/ros2_rosbag2/rosbag2_py/rosbag2_py/_transport.so
#52 0x00007ffff3cb37c6 in std::__shared_ptr<rosbag2_transport::Player, (__gnu_cxx::_Lock_policy)2>::~__shared_ptr() ()
   from /home/kgk/.cache/bazel/_bazel_kgk/ae5c2003acad6a67c2ff6afdb8163595/execroot/com_github_mvukov_rules_ros2_examples/bazel-out/k8-fastbuild/bin/chatter/bag.runfiles/ros2_rosbag2/rosbag2_py/rosbag2_py/_transport.so
#53 0x00007ffff3cb37e6 in std::shared_ptr<rosbag2_transport::Player>::~shared_ptr() ()
   from /home/kgk/.cache/bazel/_bazel_kgk/ae5c2003acad6a67c2ff6afdb8163595/execroot/com_github_mvukov_rules_ros2_examples/bazel-out/k8-fastbuild/bin/chatter/bag.runfiles/ros2_rosbag2/rosbag2_py/rosbag2_py/_transport.so
#54 0x00007ffff3c8f2f0 in rosbag2_py::Player::play(rosbag2_storage::StorageOptions const&, (anonymous namespace)::OptionsWrapper<rosbag2_transport::PlayOptions>&) ()
   from /home/kgk/.cache/bazel/_bazel_kgk/ae5c2003acad6a67c2ff6afdb8163595/execroot/com_github_mvukov_rules_ros2_examples/bazel-out/k8-fastbuild/bin/chatter/bag.runfiles/ros2_rosbag2/rosbag2_py/rosbag2_py/_transport.so
#55 0x00007ffff3c93476 in pybind11::cpp_function::cpp_function<void, rosbag2_py::Player, rosbag2_storage::StorageOptions const&, (anonymous namespace)::OptionsWrapper<rosbag2_transport::PlayOptions>&, pybind11::name, pybind11::is_method, pybind11::sibling>(void (rosbag2_py::Player::*)(rosbag2_storage::StorageOptions const&, (anonymous namespace)::OptionsWrapper<rosbag2_transport::PlayOptions>&), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(rosbag2_py::Player*, rosbag2_storage::StorageOptions const&, (anonymous namespace)::OptionsWrapper<rosbag2_transport::PlayOptions>&)#1}::operator()(rosbag2_py::Player*, rosbag2_storage::StorageOptions const&, (anonymous namespace)::OptionsWrapper<rosbag2_transport::PlayOptions>&) const ()
   from /home/kgk/.cache/bazel/_bazel_kgk/ae5c2003acad6a67c2ff6afdb8163595/execroot/com_github_mvukov_rules_ros2_examples/bazel-out/k8-fastbuild/bin/chatter/bag.runfiles/ros2_rosbag2/rosbag2_py/rosbag2_py/_transport.so
#56 0x00007ffff3c9e3d3 in void pybind11::detail::argument_loader<rosbag2_py::Player*, rosbag2_storage::StorageOptions const&, (anonymous namespace)::OptionsWrapper<rosbag2_transport::PlayOptions>&>::call_impl<void, pybind11::cpp_function::cpp_function<void, rosbag2_py::Player, rosbag2_storage::StorageOptions const&, (anonymous namespace)::OptionsWrapper<rosbag2_transport::PlayOptions>&, pybind11::name, pybind11::is_method, pybind11::sibling>(void (rosbag2_py::Player::*)(rosbag2_storage::StorageOptions const&, (anonymous namespace)::OptionsWrapper<rosbag2_transport::PlayOptions>&), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(rosbag2_py::Player*, rosbag2_storage::StorageOptions const&, (anonymous namespace)::OptionsWrapper<rosbag2_transport::PlayOptions>&)#1}&, 0ul, 1ul, 2ul, pybind11::detail::void_type>(pybind11::cpp_function::cpp_function<void, rosbag2_py::Player, rosbag2_storage::StorageOptions const&, (anonymous namespace)::OptionsWrapper<rosbag2_transport::PlayOptions>&, pybind11::name, pybind11::is_method, pybind11::sibling>(void (rosbag2_py::Player::*)(rosbag2_storage::StorageOptions const&, (anonymous namespace)::OptionsWrapper<rosbag2_transport::PlayOptions>&), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(rosbag2_py::Player*, rosbag2_storage::StorageOptions const&, (anonymous namespace)::OptionsWrapper<rosbag2_transport::PlayOptions>&)#1}&, std::integer_sequence<unsigned long, 0ul, 1ul, 2ul>, pybind11::detail::void_type&&) && ()
   from /home/kgk/.cache/bazel/_bazel_kgk/ae5c2003acad6a67c2ff6afdb8163595/execroot/com_github_mvukov_rules_ros2_examples/bazel-out/k8-fastbuild/bin/chatter/bag.runfiles/ros2_rosbag2/rosbag2_py/rosbag2_py/_transport.so
#57 0x00007ffff3c9b299 in std::enable_if<std::is_void<void>::value, pybind11::detail::void_type>::type pybind11::detail::argument_loader<rosbag2_py::Player*, rosbag2_storage::StorageOptions const&, (anonymous namespace)::OptionsWrapper<rosbag2_transport::PlayOptions>&>::call<void, pybind11::detail::void_type, pybind11::cpp_function::cpp_function<void, rosbag2_py::Player, rosbag2_storage::StorageOptions const&, (anonymous namespace)::OptionsWrapper<rosbag2_transpor--Type <RET> for more, q to quit, c to continue without paging--
t::PlayOptions>&, pybind11::name, pybind11::is_method, pybind11::sibling>(void (rosbag2_py::Player::*)(rosbag2_storage::StorageOptions const&, (anonymous namespace)::OptionsWrapper<rosbag2_transport::PlayOptions>&), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(rosbag2_py::Player*, rosbag2_storage::StorageOptions const&, (anonymous namespace)::OptionsWrapper<rosbag2_transport::PlayOptions>&)#1}&>(pybind11::cpp_function::cpp_function<void, rosbag2_py::Player, rosbag2_storage::StorageOptions const&, (anonymous namespace)::OptionsWrapper<rosbag2_transport::PlayOptions>&, pybind11::name, pybind11::is_method, pybind11::sibling>(void (rosbag2_py::Player::*)(rosbag2_storage::StorageOptions const&, (anonymous namespace)::OptionsWrapper<rosbag2_transport::PlayOptions>&), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(rosbag2_py::Player*, rosbag2_storage::StorageOptions const&, (anonymous namespace)::OptionsWrapper<rosbag2_transport::PlayOptions>&)#1}&) && ()
   from /home/kgk/.cache/bazel/_bazel_kgk/ae5c2003acad6a67c2ff6afdb8163595/execroot/com_github_mvukov_rules_ros2_examples/bazel-out/k8-fastbuild/bin/chatter/bag.runfiles/ros2_rosbag2/rosbag2_py/rosbag2_py/_transport.so
#58 0x00007ffff3c9908e in pybind11::cpp_function::initialize<pybind11::cpp_function::initialize<void, rosbag2_py::Player, rosbag2_storage::StorageOptions const&, (anonymous namespace)::OptionsWrapper<rosbag2_transport::PlayOptions>&, pybind11::name, pybind11::is_method, pybind11::sibling>(void (rosbag2_py::Player::*)(rosbag2_storage::StorageOptions const&, (anonymous namespace)::OptionsWrapper<rosbag2_transport::PlayOptions>&), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(rosbag2_py::Player*, rosbag2_storage::StorageOptions const&, (anonymous namespace)::OptionsWrapper<rosbag2_transport::PlayOptions>&)#1}, void, rosbag2_py::Player*, rosbag2_storage::StorageOptions const&, (anonymous namespace)::OptionsWrapper<rosbag2_transport::PlayOptions>&, pybind11::name, pybind11::is_method, pybind11::sibling>(pybind11::cpp_function::initialize<void, rosbag2_py::Player, rosbag2_storage::StorageOptions const&, (anonymous namespace)::OptionsWrapper<rosbag2_transport::PlayOptions>&, pybind11::name, pybind11::is_method, pybind11::sibling>(void (rosbag2_py::Player::*)(rosbag2_storage::StorageOptions const&, (anonymous namespace)::OptionsWrapper<rosbag2_transport::PlayOptions>&), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(rosbag2_py::Player*, rosbag2_storage::StorageOptions const&, (anonymous namespace)::OptionsWrapper<rosbag2_transport::PlayOptions>&)#1}&&, void (*)(rosbag2_py::Player*, rosbag2_storage::StorageOptions const&, (anonymous namespace)::OptionsWrapper<rosbag2_transport::PlayOptions>&), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::function_call&)#3}::operator()(pybind11::detail::function_call&) const ()
   from /home/kgk/.cache/bazel/_bazel_kgk/ae5c2003acad6a67c2ff6afdb8163595/execroot/com_github_mvukov_rules_ros2_examples/bazel-out/k8-fastbuild/bin/chatter/bag.runfiles/ros2_rosbag2/rosbag2_py/rosbag2_py/_transport.so
#59 0x00007ffff3c990e2 in pybind11::cpp_function::initialize<pybind11::cpp_function::initialize<void, rosbag2_py::Player, rosbag2_storage::StorageOptions const&, (anonymous namespace)::OptionsWrapper<rosbag2_transport::PlayOptions>&, pybind11::name, pybind11::is_method, pybind11::sibling>(void (rosbag2_py::Player::*)(rosbag2_storage::StorageOptions const&, (anonymous namespace)::OptionsWrapper<rosbag2_transport::PlayOptions>&), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(rosbag2_py::Player*, rosbag2_storage::StorageOptions const&, (anonymous namespace)::OptionsWrapper<rosbag2_transport::PlayOptions>&)#1}, void, rosbag2_py::Player*, rosbag2_storage::StorageOptions const&, (anonymous namespace)::OptionsWrapper<rosbag2_transport::PlayOptions>&, pybind11::name, pybind11::is_method, pybind11::sibling>(pybind11::cpp_function::initialize<void, rosbag2_py::Player, rosbag2_storage::StorageOptions const&, (anonymous namespace)::OptionsWrapper<rosbag2_transport::PlayOptions>&, pybind11::name, pybind11::is_method, pybind11::sibling>(void (rosbag2_py::Player::*)(rosbag2_storage::StorageOptions const&, (anonymous namespace)::OptionsWrapper<rosbag2_transport::PlayOptions>&), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(rosbag2_py::Player*, rosbag2_storage::StorageOptions const&, (anonymous namespace)::OptionsWrapper<rosbag2_transport::PlayOptions>&)#1}&&, void (*)(rosbag2_py::Player*, rosbag2_storage::StorageOptions const&, (anonymous namespace)::OptionsWrapper<rosbag2_transport::PlayOptions>&), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::function_call&)#3}::_FUN(pybind11::detail::function_call&) ()
   from /home/kgk/.cache/bazel/_bazel_kgk/ae5c2003acad6a67c2ff6afdb8163595/execroot/com_github_mvukov_rules_ros2_examples/bazel-out/k8-fastbuild/bin/chatter/bag.runfiles/ros2_rosbag2/rosbag2_py/rosbag2_py/_transport.so
#60 0x00007ffff3cb0b62 in pybind11::cpp_function::dispatcher(_object*, _object*, _object*) ()
   from /home/kgk/.cache/bazel/_bazel_kgk/ae5c2003acad6a67c2ff6afdb8163595/execroot/com_github_mvukov_rules_ros2_examples/bazel-out/k8-fastbuild/bin/chatter/bag.runfiles/ros2_rosbag2/rosbag2_py/rosbag2_py/_transport.so
#61 0x00007ffff6d68e51 in cfunction_call_varargs (func=0x7ffff5a333b0, args=0x7ffff45181c0, kwargs=0x0) at Objects/call.c:743
#62 PyCFunction_Call (func=0x7ffff5a333b0, args=0x7ffff45181c0, kwargs=0x0) at Objects/call.c:773
#63 0x00007ffff6d67900 in _PyObject_MakeTpCall (callable=0x7ffff551c280, args=<optimized out>, nargs=3, keywords=0x0) at Objects/call.c:159
#64 0x00007ffff6e664f2 in _PyObject_Vectorcall (callable=0x7ffff551c280, args=0x536988, nargsf=<optimized out>, kwnames=0x0) at ./Include/cpython/abstract.h:125
#65 method_vectorcall (method=<optimized out>, args=0x536990, nargsf=<optimized out>, kwnames=0x0) at Objects/classobject.c:60
#66 0x00007ffff6ec907b in _PyObject_Vectorcall (callable=0x1c, args=0x536990, nargsf=<optimized out>, kwnames=0x0) at ./Include/cpython/abstract.h:127
#67 call_function (tstate=0x420060, oparg=<optimized out>, kwnames=0x0, pp_stack=<optimized out>) at Python/ceval.c:4963
#68 _PyEval_EvalFrameDefault (f=0x5367c0, throwflag=<optimized out>) at Python/ceval.c:3469
#69 0x00007ffff6e62215 in PyEval_EvalFrameEx (f=0x5367c0, throwflag=0) at Python/ceval.c:741
#70 _PyEval_EvalCodeWithName (_co=<optimized out>, globals=<optimized out>, locals=0x0, args=<optimized out>, argcount=<optimized out>, kwnames=0x7ffff61bd178, kwargs=<optimized out>, kwcount=1, kwstep=1, defs=0x0, 
    defcount=<optimized out>, kwdefs=0x0, closure=0x0, name=<optimized out>, qualname=0x7ffff5cb7af0) at Python/ceval.c:4298
#71 _PyFunction_Vectorcall (func=<optimized out>, stack=<optimized out>, nargsf=<optimized out>, kwnames=<optimized out>) at Objects/call.c:436
#72 0x00007ffff6e662d9 in _PyObject_Vectorcall (callable=0x7ffff551c280, args=0x7ffff5f151c8, nargsf=1, kwnames=0x7ffff61bd160) at ./Include/cpython/abstract.h:127
#73 method_vectorcall (method=<optimized out>, args=0x7ffff5f151d0, nargsf=<optimized out>, kwnames=0x7ffff61bd160) at Objects/classobject.c:60
#74 0x00007ffff6ec6cf4 in _PyObject_Vectorcall (callable=0x7ffff5f0d800, args=0x7ffff5f151d0, nargsf=<optimized out>, kwnames=0x1c) at ./Include/cpython/abstract.h:127
#75 call_function (tstate=0x420060, oparg=<optimized out>, kwnames=0x1c, pp_stack=<optimized out>) at Python/ceval.c:4963
#76 _PyEval_EvalFrameDefault (f=0x7ffff5f15040, throwflag=<optimized out>) at Python/ceval.c:3515
#77 0x00007ffff6e62215 in PyEval_EvalFrameEx (f=0x7ffff5f15040, throwflag=0) at Python/ceval.c:741
#78 _PyEval_EvalCodeWithName (_co=<optimized out>, globals=<optimized out>, locals=0x0, args=<optimized out>, argcount=<optimized out>, kwnames=0x7ffff61f97d8, kwargs=<optimized out>, kwcount=2, kwstep=1, defs=0x0, 
    defcount=<optimized out>, kwdefs=0x0, closure=0x0, name=<optimized out>, qualname=0x7ffff6040f80) at Python/ceval.c:4298
#79 _PyFunction_Vectorcall (func=<optimized out>, stack=<optimized out>, nargsf=<optimized out>, kwnames=<optimized out>) at Objects/call.c:436
#80 0x00007ffff6e662d9 in _PyObject_Vectorcall (callable=0x7ffff551c280, args=0x58fbe8, nargsf=1, kwnames=0x7ffff61f97c0) at ./Include/cpython/abstract.h:127
#81 method_vectorcall (method=<optimized out>, args=0x58fbf0, nargsf=<optimized out>, kwnames=0x7ffff61f97c0) at Objects/classobject.c:60
#82 0x00007ffff6ec6cf4 in _PyObject_Vectorcall (callable=0x7ffff5f0db40, args=0x58fbf0, nargsf=<optimized out>, kwnames=0x1c) at ./Include/cpython/abstract.h:127
#83 call_function (tstate=0x420060, oparg=<optimized out>, kwnames=0x1c, pp_stack=<optimized out>) at Python/ceval.c:4963
#84 _PyEval_EvalFrameDefault (f=0x58fa30, throwflag=<optimized out>) at Python/ceval.c:3515
#85 0x00007ffff6e62215 in PyEval_EvalFrameEx (f=0x58fa30, throwflag=0) at Python/ceval.c:741
#86 _PyEval_EvalCodeWithName (_co=<optimized out>, globals=<optimized out>, locals=0x0, args=<optimized out>, argcount=<optimized out>, kwnames=0x7ffff60ec238, kwargs=<optimized out>, kwcount=1, kwstep=1, defs=0x0, 
    defcount=<optimized out>, kwdefs=0x7ffff61e6d00, closure=0x0, name=<optimized out>, qualname=0x7ffff6106cf0) at Python/ceval.c:4298
#87 _PyFunction_Vectorcall (func=<optimized out>, stack=<optimized out>, nargsf=<optimized out>, kwnames=<optimized out>) at Objects/call.c:436
#88 0x00007ffff6ec6cf4 in _PyObject_Vectorcall (callable=0x7ffff609f310, args=0x7ffff67b39c0, nargsf=<optimized out>, kwnames=0x1c) at ./Include/cpython/abstract.h:127
#89 call_function (tstate=0x420060, oparg=<optimized out>, kwnames=0x1c, pp_stack=<optimized out>) at Python/ceval.c:4963
#90 _PyEval_EvalFrameDefault (f=0x7ffff67b3840, throwflag=<optimized out>) at Python/ceval.c:3515
#91 0x00007ffff6fbfb1d in PyEval_EvalFrameEx (f=0x7ffff67b3840, throwflag=0) at Python/ceval.c:741
#92 _PyEval_EvalCodeWithName (_co=<optimized out>, globals=<optimized out>, locals=<optimized out>, args=<optimized out>, argcount=<optimized out>, kwnames=0x0, kwargs=0x0, kwcount=<optimized out>, kwstep=2, defs=0x0, defcount=0, 
    kwdefs=0x0, closure=0x0, name=<optimized out>, qualname=0x0) at Python/ceval.c:4298
#93 0x00007ffff6fe66cd in PyEval_EvalCodeEx (_co=0x7ffff60eed40, globals=0x7ffff67d0e80, locals=0x7ffff67d0e80, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0) at Python/ceval.c:4327
#94 PyEval_EvalCode (co=0x7ffff60eed40, globals=0x7ffff67d0e80, locals=0x7ffff67d0e80) at Python/ceval.c:718
#95 run_eval_code_obj (co=0x7ffff60eed40, globals=0x7ffff67d0e80, locals=0x7ffff67d0e80) at Python/pythonrun.c:1166
#96 run_mod (mod=<optimized out>, filename=<optimized out>, globals=0x7ffff67d0e80, locals=0x7ffff67d0e80, flags=<optimized out>, arena=<optimized out>) at Python/pythonrun.c:1188
--Type <RET> for more, q to quit, c to continue without paging--
#97 0x00007ffff6db66ae in pyrun_file (fp=0x40f8e0, filename=0x7ffff67ee690, start=<optimized out>, globals=0x7fffffff6d1f, locals=0x7fffffff6d40, closeit=1, flags=<optimized out>) at Python/pythonrun.c:1085
#98 0x00007ffff6db61b7 in pyrun_simple_file (fp=0x40f8e0, filename=0x7ffff67ee690, closeit=1, flags=0x7fffffffbf60) at Python/pythonrun.c:439
#99 0x00007ffff6db6091 in PyRun_SimpleFileExFlags (fp=0x40f8e0, filename=<optimized out>, closeit=1, flags=0x7fffffffbf60) at Python/pythonrun.c:472
#100 0x00007ffff6dbec98 in pymain_run_file (config=<optimized out>, cf=0x7fffffffbf60) at Modules/main.c:385
#101 0x00007ffff6dbe48b in pymain_run_python (exitcode=0x7fffffffbfb4) at Modules/main.c:610
#102 0x00007ffff6dbe2b1 in Py_RunMain () at Modules/main.c:689
#103 0x00007ffff6dbf4d7 in Py_BytesMain (argc=<optimized out>, argv=0x7fffffff6d40) at Modules/main.c:743
#104 0x00007ffff6829d90 in __libc_start_call_main (main=main@entry=0x401060 <main>, argc=argc@entry=4, argv=argv@entry=0x7fffffffc0f8) at ../sysdeps/nptl/libc_start_call_main.h:58
#105 0x00007ffff6829e40 in __libc_start_main_impl (main=0x401060 <main>, argc=4, argv=0x7fffffffc0f8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffc0e8) at ../csu/libc-start.c:392

ahans added a commit to ahans/rules_ros2 that referenced this issue May 15, 2023
This adds a patch that moves the `std::shared_ptr` holding a reference
to a `rclcpp::SharedLibrary` from `rclcpp::GenericPublisher` to
`rclcpp::PublisherBase`. The shared library in question contains type
support code for the publisher's message type. In the standard ROS
build, two separate shared objects are used, one is represented by the
mentioned `shared_ptr`-wrapped `SharedLibrary` instance, the other is
never unloaded. At the same time, code from the latter library is
required during destruction of a `PublisherBase` instance. The
rules_ros2 build creates a single library, which is unloaded when
`GenericPublisher` is destroyed (the `shared_ptr`'s reference count goes
to zero). When `GenericPublisher`'s parent class, `PublisherBase`, is
destroyed, trying to call code from the shared library failed and caused
a segfault. Moving the `shared_ptr` to `PublisherBase` makes sure the
shared library stays loaded as long as required.

We further extend the existing rosbag test to also excersise the `play`
command.

This fix is similar to what was done for PR#47. See the discussion there
for more details.

Fixes mvukov#110
ahans added a commit to ahans/rules_ros2 that referenced this issue May 15, 2023
This adds a patch that moves the `std::shared_ptr` holding a reference
to a `rclcpp::SharedLibrary` from `rclcpp::GenericPublisher` to
`rclcpp::PublisherBase`. The shared library in question contains type
support code for the publisher's message type. In the standard ROS
build, two separate shared objects are used, one is represented by the
mentioned `shared_ptr`-wrapped `SharedLibrary` instance, the other is
never unloaded. At the same time, code from the latter library is
required during destruction of a `PublisherBase` instance. The
rules_ros2 build creates a single library, which is unloaded when
`GenericPublisher` is destroyed (the `shared_ptr`'s reference count goes
to zero). When `GenericPublisher`'s parent class, `PublisherBase`, is
destroyed, trying to call code from the shared library failed and caused
a segfault. Moving the `shared_ptr` to `PublisherBase` makes sure the
shared library stays loaded as long as required.

We further extend the existing rosbag test to also excersise the `play`
command.

This fix is similar to what was done for PR#47. See the discussion there
for more details.

Fixes mvukov#110
@mvukov
Copy link
Owner

mvukov commented May 15, 2023

Just wanted to ping you @ahans , but I see that you're already working on this :) Very nice!

@ahans
Copy link
Contributor

ahans commented May 15, 2023

This is very similar to the issue we had with PR#47. In addition to the subscription path, we also need to patch the publisher one. I created a PR that does just that.

Btw, the segfault also happens when run under Bazel. You can tell when looking at the return code. For some reason Bazel swallows the segfault message. The same also happened for the recorder test in PR#47.

ahans added a commit to ahans/rules_ros2 that referenced this issue May 15, 2023
This adds a patch that moves the `std::shared_ptr` holding a reference
to a `rclcpp::SharedLibrary` from `rclcpp::GenericPublisher` to
`rclcpp::PublisherBase`. The shared library in question contains type
support code for the publisher's message type. In the standard ROS
build, two separate shared objects are used, one is represented by the
mentioned `shared_ptr`-wrapped `SharedLibrary` instance, the other is
never unloaded. At the same time, code from the latter library is
required during destruction of a `PublisherBase` instance. The
rules_ros2 build creates a single library, which is unloaded when
`GenericPublisher` is destroyed (the `shared_ptr`'s reference count goes
to zero). When `GenericPublisher`'s parent class, `PublisherBase`, is
destroyed, trying to call code from the shared library failed and caused
a segfault. Moving the `shared_ptr` to `PublisherBase` makes sure the
shared library stays loaded as long as required.

We further extend the existing rosbag test to also excersise the `play`
command.

This fix is similar to what was done for PR#47. See the discussion there
for more details.

Fixes mvukov#110
@kgreenek
Copy link
Contributor Author

Thank you! I pulled in the fix and confirmed that I no longer see the play command segfaulting :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants