Steps to core dump the call stack of crashed ROS node

Recently met a ROS node crash issue which just shows below information
xxx_node-3] process has died [pid 32584, exit code -11, cmd/home/robert/Documents/test_ws/src/flight
-xxx_build/devel/lib/flight_xxx_xxx/solar_xxx_node
_name: =solar  node
_log:=/home/r
obert/.ros/log/0f839167-4411-11ed-92be-48b02d3d8078/solar_orchestrator_node-3.logl
log file: /home/robert/.ros/log/0f839167-4411-11ed-92be-48b02d3d8078/solar_xxx_node-3*.

To debug this issue, we need core dump to see more crash information, here is the steps:

1.  Check and set the core size to unlimited

$ ulimit -a
core file size          (blocks, -c) 0           #  <-- Prevents core dumps

Default corefile size is 0, it means it will not generate coredump file

Set the core size to unlimited:

ulimit -c unlimited

Then again ulimit -a

$ ulimit -a
core file size          (blocks, -c) unlimited

core file size is changed as unlimited
2. Check if coredump file generation with pid

$ cat /proc/sys/kernel/core_uses_pid
0

0 means core dump file pid is deactivated. let’s activate

echo 1 | sudo tee /proc/sys/kernel/core_uses_pid ...
$ cat /proc/sys/kernel/core_uses_pid
1

Now, it can generate coredump with pid
3. Run the ros node and reproduce the crash,such as below
 

(base) test@xavier-rd-x:~/bumbleTest_one$ roslaunch test test.launch 
~~~
[module-1] process has died [pid 10821, exit code -11, cmd 
~~~

The PID number is 8779

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值