ROS2 generating 'core' file on error, how to disable?
I'm running a simple talker/listener demo, using a Docker image based on ros:galactic-ros-core w/ros-galactic-desktop installed. I'm getting an error about half the time when I run the demo, but my question is not about the error, but about the core dump. When I get the error, a large file "core" is created in the current directory which I really don't want. Is this standard behavior? Is there any supported method to stop this from happening by default, either within ROS2 or linux?
Following a cryptic comment from https://www.oreilly.com/library/view/... "... there is already a core directory to prevent core dumps" I can prevent the 'core' file from being created by creating an empty 'core' directory in the current working directory, but this is a workaround.
Not necessarily relevant, but here's the script creating the error:
# start talker and listener in background
ros2 run demo_nodes_cpp talker &
ros2 run demo_nodes_cpp listener &
sleep 10
kill %+
kill %-
and the error is "Failed to create log directory: /root/.ros/log"
off-topic for your question, but
is this an unaltered demo package part of the default ROS 2 set?
If it is, I would encourage you to report the crashes you're seeing, as they should not happen.
This can be duplicated, though intermittently, with the standard components from package demo_nodes_cpp and osrf:/ros:galactic-desktop. Where would I file the bug? The demo files it is based on a pretty simple, the issue is probably in roscpp.
The issue tracker for the
demos
packages is ros2/demos/issues.