RockteMQ-AI commented on issue #1331:
URL: 
https://github.com/apache/rocketmq-clients/issues/1331#issuecomment-5556535801

   **Issue Evaluation**
   
   Category: `bug` | Status: **Confirmed**
   
   Verified against `python/rocketmq/v5/consumer/push/push_consumer.py`:
   
   - **`__execute_receive`** (line 235-237): When cache is full, calls 
`self.__execute_receive_later(message_queue, process_queue, attempt_id)` 
**synchronously**.
   - **`__execute_receive_later`** (line 269-271): Calls 
`time.sleep(PushConsumer.RECEIVE_RETRY_DELAY)` then **directly** calls 
`self.__execute_receive(message_queue, process_queue, attempt_id)` — still 
synchronous.
   
   This creates a synchronous mutual recursion: `__execute_receive` → 
`__execute_receive_later` → `__execute_receive` → ... Each cycle adds stack 
frames until `RecursionError`.
   
   **Root Cause:** `__execute_receive_later` should schedule the next 
`__execute_receive` call asynchronously (e.g., via `threading.Timer` or the 
executor), not call it synchronously after `time.sleep`.
   
   **Impact:** Critical — Python PushConsumer crashes with `RecursionError` 
under sustained load when the cache stays full.
   
   **Severity:** Critical — application crash under normal operating conditions.
   
   **Fix direction:** Replace the synchronous `time.sleep` + direct call with 
an async schedule, similar to how the Java client uses 
`scheduler.schedule(...)`.
   
   An automated fix proposal will be generated. Reply `/approve` to proceed 
with PR generation.
   
   ---
   *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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to