Skip to content

message_passing: fix race condition in send queue#551

Merged
LittleHuba merged 1 commit into
eclipse-score:mainfrom
kitsnet:nb_mp2_queue_fix
Jun 17, 2026
Merged

message_passing: fix race condition in send queue#551
LittleHuba merged 1 commit into
eclipse-score:mainfrom
kitsnet:nb_mp2_queue_fix

Conversation

@kitsnet

@kitsnet kitsnet commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

We were releasing SendCommand objects too early to the "free" pool, while temporarily unlocking the access to this pool for the time we spend in a SendProtocolMessage() call (as this call may result in a blocked IPC). During this temporary unlocking, another thread could obtain and reuse the same object, which could lead to message payload corruption under concurrent load.

Now we are releasing these objects under re-obtained lock right after the message was sent.

@kitsnet kitsnet force-pushed the nb_mp2_queue_fix branch from 16f38ad to 6819b7d Compare June 16, 2026 15:39
@kitsnet kitsnet marked this pull request as ready for review June 16, 2026 16:02
We were releasing SendCommand objects too early to the "free" pool,
while temporarily unlocking the access to this pool for the time
we spend in a SendProtocolMessage() call (as this call may result in a
blocked IPC). During this temporary unlocking, another thread could
obtain and reuse the same object, which could lead to message payload
corruption under concurrent load.

Now we are releasing these objects under re-obtained lock right after
the message was sent.
@LittleHuba LittleHuba added this pull request to the merge queue Jun 17, 2026
Merged via the queue into eclipse-score:main with commit 9f8b8b3 Jun 17, 2026
9 checks passed
@github-project-automation github-project-automation Bot moved this from Backlog to Done in COM - Communication FT Jun 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants