You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "RockteMQ-AI (via GitHub)" <gi...@apache.org> on 2026/08/18 12:14:47 UTC

Re: [I] [Bug] TOCTOU race condition in MQClientInstance.brokerVersionTable access [rocketmq]

RockteMQ-AI commented on issue #10214:
URL: https://github.com/apache/rocketmq/issues/10214#issuecomment-5328016464

   **Issue Evaluation**
   
   Category: `bug` | Status: **Confirmed**
   
   The TOCTOU race condition in `MQClientInstance.brokerVersionTable` is valid. Concurrent access to the `brokerVersionTable` map without proper synchronization can lead to inconsistent reads during broker version checks.
   
   **Root Cause:** `brokerVersionTable` is accessed from multiple threads (network response handler, scheduled task) without adequate synchronization.
   **Impact:** Potential stale reads or ConcurrentModificationException.
   **Severity:** Medium
   
   Suggested fix: Use `ConcurrentHashMap` or synchronize access to `brokerVersionTable`.
   
   ---
   *Automated evaluation by RockteMQ-AI*


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org