Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Launch Service not stopping (possibly launch_ros related) #359

Closed
pbaughman opened this issue Nov 26, 2019 · 1 comment
Closed

Launch Service not stopping (possibly launch_ros related) #359

pbaughman opened this issue Nov 26, 2019 · 1 comment

Comments

@pbaughman
Copy link
Contributor

Bug report

Required Info:

  • Operating System:
    • Ubuntu 18.04 -->
  • Installation type:
    • Source
  • Version or commit hash:
    • Launch: c644dfa
    • Launch Ros: 84cdecd361a3ea274f77f0c1ec2f2c02097fe372
  • DDS implementation:
    • Fast-RTPS

Steps to reproduce issue

I can get this to happen by running ros2 test lifecycle/test/test_lifecycle.py in a loop. Eventually the test will hang after the active tests and before the post-shutdown tests run.

I can determine that launch_testing is stuck in self._launch_service.run()

I can determine the launch service is stuck here

Furthermore, I can print some information about what's in the entity_futures list:

    <Task pending coro=<LaunchService._process_one_event() running at /home/pete.baughman/gc/apex_ws/build/launch/launch/launch_service.py:286> wait_for=<Future
 pending cb=[Task._wakeup()] created at /usr/lib/python3.6/asyncio/base_events.py:295> created at /home/pete.baughman/gc/apex_ws/build/launch/launch/launch_service.py:355>
      [
        <FrameSummary file /home/pete.baughman/gc/apex_ws/build/launch/launch/launch_service.py, line 414 in run>,
        <FrameSummary file /usr/lib/python3.6/asyncio/base_events.py, line 471 in run_until_complete>,
        <FrameSummary file /usr/lib/python3.6/asyncio/base_events.py, line 438 in run_forever>,
        <FrameSummary file /usr/lib/python3.6/asyncio/base_events.py, line 1451 in _run_once>,
        <FrameSummary file /usr/lib/python3.6/asyncio/events.py, line 145 in _run>,
        <FrameSummary file /usr/lib/python3.6/asyncio/tasks.py, line 261 in _wakeup>,
        <FrameSummary file /usr/lib/python3.6/asyncio/tasks.py, line 180 in _step>,
        <FrameSummary file /home/pete.baughman/gc/apex_ws/build/launch/launch/launch_service.py, line 355 in run_async>
      ]
    <Future pending cb=[_chain_future.<locals>._call_check_cancel() at /usr/lib/python3.6/asyncio/futures.py:403] created at /usr/lib/python3.6/asyncio/base_events.py:295>
      [
        <FrameSummary file /usr/lib/python3.6/asyncio/tasks.py, line 180 in _step>,
        <FrameSummary file /home/pete.baughman/gc/apex_ws/build/launch/launch/launch_service.py, line 287 in _process_one_event>,
        <FrameSummary file /home/pete.baughman/gc/apex_ws/build/launch/launch/launch_service.py, line 307 in __process_event>,
        <FrameSummary file /home/pete.baughman/gc/apex_ws/build/launch/launch/utilities/visit_all_entities_and_collect_futures_impl.py, line 38 in visit_all_entities_and_collect_futures>,
        <FrameSummary file /home/pete.baughman/gc/apex_ws/build/launch/launch/action.py, line 89 in visit>,
        <FrameSummary file /home/pete.baughman/gc/apex_ws/build/launch/launch/actions/opaque_function.py, line 75 in execute>,
        <FrameSummary file /home/pete.baughman/gc/apex_ws/build/launch_ros/launch_ros/actions/lifecycle_node.py, line 101 in _on_change_state_event>,
        <FrameSummary file /usr/lib/python3.6/asyncio/base_events.py, line 655 in run_in_executor>,
        <FrameSummary file /usr/lib/python3.6/asyncio/futures.py, line 431 in wrap_future>,
        <FrameSummary file /usr/lib/python3.6/asyncio/base_events.py, line 295 in create_future>
      ]

I'm not so good at asyncio futures, but it looks like I've got one task pending that was created here and another future in the event queue that came from a launch_ros/actions/lifecycle_node that's also waiting for _process_one_event in the launch_service.

Maybe I'm reading the FrameSummary backwards though - like I said I'm not too good at this

Expected behavior

Should not hang!

Actual behavior

Is hanging!

It seems like the lifecycle node's waiting on the LaunchService's _process_one_event is thwarting the 'id_idle' logic that lets us leave this event loop. Perhaps the issue is with launch_ros's Lifecycle node

Additional information

Can someone with a better understanding of what's supposed to be happening here give me a clue for how to debug this further?

@pbaughman
Copy link
Contributor Author

It looks like this is launch_ros, not launch - closing this in favor of the launch_ros issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant