Proper Tear down of Objects (Rust) #1158
-
|
Hello and thanks in advance to anyone helping me out. I am using iceoryx2 in my project and generally work quite well with it. I am using the examples showcased in the example folder and build on top of this foundation a more abstract api to send and receive in messages in a pub sub pattern, as well as in a req res pattern. I use Events alongside these Publisher/Subscriber or Server/Client objects to be able to wake up threads to avoid busy polling the objects. I also build a moderatly medium sized test suite for my use case (around 80-120 tests). When running these tests i realised that if i open and close many subscribers/publishers or servers/clients as well as their companying Events in quick succession my tests run quite flakey. Quite consistently random singular tests fail because the creation of the these Objects fail with errors such as (ServiceInCorruptedState, IsMarkedForDestruction). The Tests each have unique ServiceNames they are using. So there is no clash in namings. Some of the tests are opening and closing these Objects within the test itself multiple times a Service/Objects using this services (Subscribers/Publishers/Listeners....). Is there maybe something i have to take into account when tearing down objects? In the examples Objects are just dropped when they move out of scope and it is insinuated that i dont have to deregister or destroy/close anything manually. Is this the case or can someone point me to proper tear down procedures? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
|
@cerdelen which version of iceoryx2 are you using? |
Beta Was this translation helpful? Give feedback.
I guess that our dead node detection is interfering with the startup. We might need to tweak it a bit further.
Meanwhile, there are two workarounds
local::Serviceservice variant. This keeps the services contained in the processIf you can share the code that causes the issues or create a minimal testcase to trigger the behavior, we would have a chance to properly fix the issue