Luos-io / luos_engine

Open-source and real-time orchestrator for cyber-physical-systems, to easily design, test and deploy embedded applications and digital twins.
https://www.luos.io
MIT License
514 stars 54 forks source link

[BUG] Gate detection failure with big detections #460

Open nicolas-rabault opened 10 months ago

nicolas-rabault commented 10 months ago

Details

Which version the bug has been detected on

*Luos engine 3.0.0

Description of the bug

With a very big configuration during the detection with a Gate you may experience an out-of-memory. I guess that the Gate sends a start_detection but doesn't consume it, because it's using polling. If detection needs more messages than the MAX_MSG_NB, the oldest message (start_detection) collides with the new one and Luos_engine assert.

Context and environment

I see this with a configuration with approximately 70 services over 6 boards. By debugging it I see that the oldest message is a broadcast one, could be a start_detection or end_detection...

How to reproduce the bug

Get a big configuration and reduce the MAX_MSG_NBR

Possible solution

Find a way to consume the oldest message.