Closed yashi closed 1 year ago
This seems like something Reconnections and liveliness documents/discusses.
We've been using the hard liveness check with great success here.
Hello, the underlying Fast DDS implementation creates threads when a new DDS Domain Participant is created, this is out of the scope of the micro-ROS Agent codebase. They are destroyed when the DDS Domain Participants are destroyed.
As @gavanderhoorn mentioned, if you reset the MCU, there is no automated DDS Domain Participant destruction procedure.
Normally if your MCUs are halting without a controlled destruction, it is recommended to:
Thank you guys! I'll try them and re-open if I still have the problem.
With UCLIENT_HARD_LIVELINESS_CHECK
set to ON
in microxrcedds-client
, I see a bunch of thread exit messages! Thank you again!
[Thread 0x7fff327fc6c0 (LWP 468141) exited]
[Thread 0x7fff98ff96c0 (LWP 468116) exited]
[Thread 0x7fff8bfff6c0 (LWP 468117) exited]
[Thread 0x7fff8b7fe6c0 (LWP 468118) exited]
[Thread 0x7fff8affd6c0 (LWP 468119) exited]
[Thread 0x7fff997fa6c0 (LWP 468115) exited]
:
Describe the bug This is more like a question than a bug report. It is indeed a problem for me but I might have done in a wrong way. Anyway, here goes.
I have micro-ROS setup in my lab. I have one Agent and some nodes running on my PC and a few micro-ROS nodes running on a MCU. Since I'm debugging my micro-ROS nodes, I frequently restarts my MCU with micro-ROS nodes. While doing so, the agents started to die with the following message:
Every time I restart, meaning power-cycling, the MCU, I see a set of new threads created on the Agent.
This is just after start:
Then we I start the MCU, additional message displayed:
It's fine to create new threads, but I don't see, in source code, where these threads are retrieved or freed. It just goes on and on while in my debugging session and finally dies with the "too many open files".
To Reproduce I don't have exact steps since I'm using my own code. I want to ask anyone using micro-ROS agent how the situation is. Is this just me?
Expected behaviour I want the agent to retrieve unused threads. I assume it's quite difficult since we never know when the old node sends a new message. It could be long duration before sending second message.
OTOH, what was the design choise for this? How can I run agent in long time without leaking resources?
System information (please complete the following information):