ros2 / ros2cli

ROS 2 command line interface tools
Apache License 2.0
173 stars 159 forks source link

Autocomplete hangs before calling NodeStrategy #851

Closed RBT22 closed 8 months ago

RBT22 commented 1 year ago

Bug report

Required Info:

Steps to reproduce issue

docker pull osrf/ros:humble-desktop
docker run -it osrf/ros:humble-desktop
source ros_entrypoint.sh 

Then try autocompletion with the following and tab tab.. It gets stucked..

ros2 topic echo /

Expected behavior

It should return the available topics.

Actual behavior

Gets stucked and doesn't return.

Additional information

The problem is in connection with NodeStrategy. After calling for example the following, it works perfectly:

python3 -c "from ros2cli.node.strategy import NodeStrategy; NodeStrategy(None)"
fujitatomoya commented 1 year ago

thanks for the issue. i can reproduce this issue with rolling https://github.com/ros2/ros2/commit/3490c0f49487693dbaa58123504d5cc3c278099d

this looks like the issue for spawn_daemon process, that receives signal ERESTARTSYS. either if damon is already running (ros2 daemon status) or using DirectNode only, we have no problem. but if the daemon is instantiate the process with TopicNameCompleter, we can see this problem.

@iuhilnehc-ynos by any chance, do you have any idea for this?