-
Notifications
You must be signed in to change notification settings - Fork 392
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
App crash with Mq Error Code 15 #332
Comments
To actually fix this bug, we need to send a session ID with each mqueue message. With the session ID, the recipient can check if the received message is valid or from an outdated session. The message queue communication needs a more sophisticated protocol with an header and payload. Since the communication can break in several ways, I would propose the following changes. To fix this specific bug, only the first step needs to be implemented. Step 1
Step 2
Step 3
Step 1 is necessary to fix this bug. Step 2 will prevent us from bugs where the app receives interleaving messages. We already had this with the introduction of SERVICE_REGISTRY_CHANGE_COUNTER. With the NOTIFICATION approach, app requests could be cached in the app and the app could wait for the actual response. Step 3 is not much work when Step 2 is done and will increase the performance since the serialization is now much simpler. For Step 2 and 3 probably an own story should be created. Maybe it's also unnecessary if we do the transition to a shm based communication, but even there we need some kind of protocol. |
@mossmaurice @elBoberido. Do we still have this issue with the latest changes in #404 ? |
@budrus this issue only persists if there is an additional thread accessing the IPC channel. We had that once in a RouDi extension. This issue contains a proposal how to overhaul the IPC communication. This could be done as part of #611, though. @mossmaurice what do you think? |
@elBoberido please create an issue for the refactoring and then we'll close this one |
With the merge of the Client and Server API, RouDi addons do not need to reuse the socket/message queue therefore this issue is closed. The proposed protocol for the UDS communication will be implemented in #1133 |
Required information
Operating system:
Ubuntu 18.04 LTS
Compiler version:
GCC 7.4.0
Observed result or behaviour:
Add a session ID to the message queue communication to filter outdated messages when an application restarts.
Expected result or behaviour:
Application registers at RouDi and runs like expected.
Conditions where it occurred / Performed steps:
Quite hard, since it is a race. But is is possible with a debugger. Start RouDi and an application. Just stop the activation thread in RouDi right before the WAKEUP_TRIGGER is sent. Stop and restart the application.
Quite rare, but when this bug is triggered, then the application registers at RouDi and receives an outdated message when an application/sender/receiver port is requested. The application terminates itself.
TODO
The text was updated successfully, but these errors were encountered: