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

   **Issue Evaluation**
   
   Category: `type/bug` | Status: **Confirmed**
   
   The reported issue has been verified against the current codebase.
   
   **Root Cause:** `processTimer` is declared in `RemotingCommand` (line 100) 
but never initialized in the constructor. The only initialization point is 
`NettyDecoder` (line 42/49), which creates a `Stopwatch.createStarted()` and 
sets it on the decoded command. `LocalRemotingCommand` bypasses the Netty 
pipeline entirely — it is constructed in-process by the proxy layer, so 
`processTimer` remains `null`.
   
   **Crash Sites:** `NettyRemotingAbstract.writeResponse` dereferences 
`request.getProcessTimer().elapsed(...)` unconditionally at 3 locations (lines 
250, 267, 279), all without null guards.
   
   **Impact:** Any gRPC request through Local Proxy mode will trigger NPE when 
the response is written back, affecting RPC latency metrics recording and 
potentially crashing the response path.
   
   **Severity:** High — affects all Local Proxy mode users.
   
   **Suggested Fix:** Initialize `processTimer` in `RemotingCommand` 
constructor, and/or add null guards at the `writeResponse` call sites.
   
   An automated fix proposal will be generated. Reply `/approve` to proceed 
with PR generation.
   
   ---
   *Automated evaluation by github-manager-bot*


-- 
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