ros / ros_comm

ROS communications-related packages, including core client libraries (roscpp, rospy, roslisp) and graph introspection tools (rostopic, rosnode, rosservice, rosparam).
http://wiki.ros.org/ros_comm
745 stars 911 forks source link

properly shutdown xml rpc server #2368

Open jamesdarrenmuir opened 5 months ago

jamesdarrenmuir commented 5 months ago

stop CPU usage spike when a rospy node receives a signals.SIGINT interrupt but before it terminates the process (e.g. pressing CTRL+C while the node is sleeping due to a rospy.sleep() call no longer sends CPU usage of a core to 100%)

should also fix https://github.com/ros/ros_comm/issues/2238

peci1 commented 4 months ago

This apparently causes problems elsewhere - see the timing out unit tests...

jamesdarrenmuir commented 4 months ago

I looked at the build log but I'm still not sure which test failed.

I saw these lines in the build log:

14:05:56 Scanning dependencies of target _run_tests_rosgraph_nosetests_test
14:05:56 -- run_tests.py: execute commands
14:05:56   "/usr/bin/cmake" -E make_directory /tmp/ws/test_results/rosgraph
14:05:56   /usr/bin/nosetests3 -P --process-timeout=60 --where=/tmp/ws/src/ros_comm/tools/rosgraph/test --with-xunit --xunit-file=/tmp/ws/test_results/rosgraph/nosetests-test.xml
14:05:56 /tmp/ws/src/ros_comm/tools/rosgraph/test/test_names.py:97: SyntaxWarning: "is" with a literal. Did you mean "=="?
14:05:56   if 'ROS_NAMESPACE' is os.environ:
14:05:56 ........ERROR: Invalid remapping argument 'foo:=bar:=baz'
14:05:56 ..........invalid ROS_IP (must be a valid IPv4 or IPv6 address)
14:05:56 invalid ROS_IP (must be a valid IPv4 or IPv6 address)
14:05:56 .invalid ROS_IP (must be a valid IPv4 or IPv6 address)
14:05:56 .invalid ROS_IP (must be a valid IPv4 or IPv6 address)
14:05:56 ................................Build timed out (after 120 minutes). Marking the build as failed.
14:05:56 Build was aborted

But I'm not sure which of these, if any, caused the test failure.

jamesdarrenmuir commented 4 months ago

I am running the tests on my machine now (catkin test), but I am getting failures when testing the latest noetic-devel branch as well.

jamesdarrenmuir commented 4 months ago

Ok, it seems like running the tests in the rosgraph package gets stuck. I will look more into this later.