ros2 / demos

Apache License 2.0
507 stars 331 forks source link

QoS_demo_cpp: Process hung on [INFO] [rclcpp]: signal_handler(signal_value=2) #407

Closed claireyywang closed 3 months ago

claireyywang commented 5 years ago

Bug report

Required Info:

Steps to reproduce issue

RMW_IMPLEMENTATION=rmw_connext_cpp ros2 run quality_of_service_demo_cpp interactive_publisher --delay 0.5 --deadline 1 --liveliness MANUAL_BY_TOPIC --lease 1
RMW_IMPLEMENTATION=rmw_connext_cpp ros2 run quality_of_service_demo_cpp interactive_subscriber --deadline 1 --liveliness MANUAL_BY_TOPIC --lease 1

Expected behavior

print

^C[INFO] [rclcpp]: signal_handler(signal_value=2)

then exit the process

Actual behavior

[INFO] [rclcpp]: signal_handler(signal_value=2)
[INFO] [rclcpp]: signal_handler(signal_value=2)
[INFO] [rclcpp]: signal_handler(signal_value=2)
[INFO] [rclcpp]: signal_handler(signal_value=2)

never exit.

clalancette commented 5 years ago

Out of curiousity, how long did you wait? We have a known issue somewhere where Connext can take a substantial amount of time to cleanup after itself (like 10 seconds or something). I'm wondering if this is a duplicate.

claireyywang commented 5 years ago

Out of curiousity, how long did you wait? We have a known issue somewhere where Connext can take a substantial amount of time to cleanup after itself (like 10 seconds or something). I'm wondering if this is a duplicate.

I tried again, waited for at least five minutes and got the same result. I had to close the terminal to kill it.

clalancette commented 5 years ago

I tried again, waited for at least five minutes and got the same result. I had to close the terminal to kill it.

Sounds like something new :+1:

hidmic commented 5 years ago

I came across the same thing. @claireyywang try pressing x...

The thing is that these demos spin up a separate thread to support stdin-based user interaction. Because of the way that bit is coded, you have to either Ctrl-C or press x (to stop the executor) and then press another random key to get yourself out of a blocking getch*() call.

I fiddled a bit on how to fix it but being cross-platform is going to be time consuming. I'll come back later.

wjwwood commented 4 years ago

@claireyywang can you push on this issue. @hidmic says the code may need to be refactored to close when doing ctrl-c. We can either backlog this or fix it. Thanks!

claireyywang commented 4 years ago

@wjwwood sure I'll look into it

clalancette commented 3 months ago

Since we don't support rmw_connext_cpp anymore, I'm going to go ahead and close this out.