[rclcpp] C++ lib leaking `rclcpp::Node()` can cause segfaults at `dlclose()`

未关闭
#2,567 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
30/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
cpp
领域
robotics

调研方向

从链接的 rclcpp_dlclose_segfault repository 及其 README 开始,在使用 Humble 和 rmw_cyclonedds_cpp 的 Ubuntu 22.04 上复现该故障。然后检查 rclcpp::Node 的生命周期、worker 关闭以及 dlclose 之间如何相互作用;当 Node 被泄漏时产生的 race 和由此导致的 segfault 都被消除后,即表示完成。

由索引模型根据 Issue 内容生成。

描述

Bug report

Required Info:

  • Operating System: Ubuntu 22.04
  • Installation type: binaries
  • Version or commit hash: humble
  • DDS implementation: rmw_cyclonedds_cpp
  • Client library (if applicable): rclcpp
Steps to reproduce issue

See https://github.com/EricCousineau-TRI/rclcpp_dlclose_segfault

Expected behavior

dlclose() does not trigger race conditions with threads -- ideally, shutdowns existing workers, or tries to order atexit operations manually.

Actual behavior

dlclose() appears to trigger race conditions when user leaks rclcpp::Node.

Additional information

See README in https://github.com/EricCousineau-TRI/rclcpp_dlclose_segfault

主要语言
C++
星标
829
派生
587
平均合并
4 天 6 小时
30 天内合并 PR
30

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

ros2/rclcpp 的其他 Issue

查看 ros2/rclcpp 的全部 Issue

相似的 Issue

更多 C++ Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。