Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[roslaunch] Some nodes remain unkilled even after a required node dies #2379

Open
pazeshun opened this issue Oct 11, 2024 · 0 comments
Open

Comments

@pazeshun
Copy link

Problem

When a required node (node launched with required="true") dies before all nodes start, some nodes may remain unkilled.

How to reproduce

Setup

mkdir -p ~/ws_test_roslaunch_required/src
cd ~/ws_test_roslaunch_required/src
git clone https://github.com/pazeshun/test_roslaunch_required.git
cd ..
catkin build

Proper behavior

pazeshun@pazeshun-ThinkPad-X1-Nano-Gen-1:~$ source ~/ws_test_roslaunch_required/devel/setup.bash 
pazeshun@pazeshun-ThinkPad-X1-Nano-Gen-1:~$ roslaunch test_roslaunch_required test_roslaunch_required.launch bug:=false
... logging to /home/pazeshun/.ros/log/c07bb2be-87ca-11ef-be25-5733a75426ff/roslaunch-pazeshun-ThinkPad-X1-Nano-Gen-1-36956.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://10.100.172.131:41601/

SUMMARY
========

PARAMETERS
 * /rosdistro: noetic
 * /rosversion: 1.16.0

NODES
  /
    no_operation (test_roslaunch_required/no_operation)
    periodic_print1 (test_roslaunch_required/periodic_print)
    periodic_print2 (test_roslaunch_required/periodic_print)

auto-starting new master
process[master]: started with pid [36964]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to c07bb2be-87ca-11ef-be25-5733a75426ff
process[rosout-1]: started with pid [36974]
started core service [/rosout]
process[no_operation-2]: started with pid [36977]
process[periodic_print1-3]: started with pid [36981]
process[periodic_print2-4]: started with pid [36983]
[ INFO] [1728649036.026604363]: /periodic_print1 is alive
[ INFO] [1728649036.030390224]: /periodic_print2 is alive
================================================================================REQUIRED process [no_operation-2] has died!
process has finished cleanly
log file: /home/pazeshun/.ros/log/c07bb2be-87ca-11ef-be25-5733a75426ff/no_operation-2*.log
Initiating shutdown!
================================================================================
[periodic_print2-4] killing on exit
[periodic_print1-3] killing on exit
[no_operation-2] killing on exit
[rosout-1] killing on exit
[master] killing on exit
shutting down processing monitor...
... shutting down processing monitor complete
done

Problematic behavior

pazeshun@pazeshun-ThinkPad-X1-Nano-Gen-1:~$ roslaunch test_roslaunch_required test_roslaunch_required.launch bug:=true
... logging to /home/pazeshun/.ros/log/04c22aa2-87cb-11ef-be25-5733a75426ff/roslaunch-pazeshun-ThinkPad-X1-Nano-Gen-1-37174.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://10.100.172.131:36899/

SUMMARY
========

PARAMETERS
 * /rosdistro: noetic
 * /rosversion: 1.16.0

NODES
  /
    no_operation (test_roslaunch_required/no_operation)
    periodic_print1 (test_roslaunch_required/periodic_print)
    periodic_print10 (test_roslaunch_required/periodic_print)
    periodic_print11 (test_roslaunch_required/periodic_print)
    periodic_print12 (test_roslaunch_required/periodic_print)
    periodic_print13 (test_roslaunch_required/periodic_print)
    periodic_print14 (test_roslaunch_required/periodic_print)
    periodic_print15 (test_roslaunch_required/periodic_print)
    periodic_print16 (test_roslaunch_required/periodic_print)
    periodic_print17 (test_roslaunch_required/periodic_print)
    periodic_print18 (test_roslaunch_required/periodic_print)
    periodic_print19 (test_roslaunch_required/periodic_print)
    periodic_print2 (test_roslaunch_required/periodic_print)
    periodic_print20 (test_roslaunch_required/periodic_print)
    periodic_print3 (test_roslaunch_required/periodic_print)
    periodic_print4 (test_roslaunch_required/periodic_print)
    periodic_print5 (test_roslaunch_required/periodic_print)
    periodic_print6 (test_roslaunch_required/periodic_print)
    periodic_print7 (test_roslaunch_required/periodic_print)
    periodic_print8 (test_roslaunch_required/periodic_print)
    periodic_print9 (test_roslaunch_required/periodic_print)

auto-starting new master
process[master]: started with pid [37183]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to 04c22aa2-87cb-11ef-be25-5733a75426ff
process[rosout-1]: started with pid [37193]
started core service [/rosout]
process[no_operation-2]: started with pid [37196]
process[periodic_print1-3]: started with pid [37198]
process[periodic_print2-4]: started with pid [37202]
process[periodic_print3-5]: started with pid [37203]
[ INFO] [1728649150.580280956]: /periodic_print1 is alive
process[periodic_print4-6]: started with pid [37209]
process[periodic_print5-7]: started with pid [37214]
================================================================================REQUIRED process [no_operation-2] has died!
process has finished cleanly
log file: /home/pazeshun/.ros/log/04c22aa2-87cb-11ef-be25-5733a75426ff/no_operation-2*.log
Initiating shutdown!
================================================================================
RLException: cannot add process [periodic_print6-8] after process monitor has been shut down
The traceback for the exception was written to the log file
[ INFO] [1728649150.588622394]: /periodic_print2 is alive
[ INFO] [1728649150.590896939]: /periodic_print3 is alive
[ INFO] [1728649150.593602688]: /periodic_print4 is alive
[ INFO] [1728649150.598839350]: /periodic_print5 is alive
pazeshun@pazeshun-ThinkPad-X1-Nano-Gen-1:~$ [ INFO] [1728649152.580280354]: /periodic_print1 is alive
[ INFO] [1728649152.588599594]: /periodic_print2 is alive
[ INFO] [1728649152.590874775]: /periodic_print3 is alive
[ INFO] [1728649152.593610966]: /periodic_print4 is alive
[ INFO] [1728649152.598821544]: /periodic_print5 is alive
[ INFO] [1728649154.580277148]: /periodic_print1 is alive
[ INFO] [1728649154.588582610]: /periodic_print2 is alive
[ INFO] [1728649154.590883246]: /periodic_print3 is alive
[ INFO] [1728649154.593592745]: /periodic_print4 is alive
[ INFO] [1728649154.598808190]: /periodic_print5 is alive
^C
pazeshun@pazeshun-ThinkPad-X1-Nano-Gen-1:~$ [ INFO] [1728649156.580274913]: /periodic_print1 is alive
[ INFO] [1728649156.588609859]: /periodic_print2 is alive
[ INFO] [1728649156.590887151]: /periodic_print3 is alive
[ INFO] [1728649156.593595708]: /periodic_print4 is alive
[ INFO] [1728649156.598824446]: /periodic_print5 is alive

Information of my environment

pazeshun@pazeshun-ThinkPad-X1-Nano-Gen-1:~$ dpkg -l ros-noetic-ros-comm
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                Version                       Architecture Description
+++-===================-=============================-============-==========================================================================================>
ii  ros-noetic-ros-comm 1.16.0-1focal.20230620.191441 amd64        ROS communications-related packages, including core client libraries (roscpp, rospy) and g>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant