RockteMQ-AI commented on issue #11083: URL: https://github.com/apache/rocketmq/issues/11083#issuecomment-5595152646
**Issue Evaluation** Category: `bug` | Status: **Confirmed** The reported resource leak has been verified against the current codebase (`develop@37808b38c`). **Root Cause:** `GrpcServerBuilder` creates boss and worker `EventLoopGroup` instances (NIO or Epoll) and passes them to `NettyServerBuilder` via `bossEventLoopGroup()` / `workerEventLoopGroup()`. However, gRPC Java does **not** take ownership of explicitly-supplied event loop groups — it will not shut them down when the server stops. `GrpcServer.shutdown()` only calls `server.shutdown()` and never closes these groups. **Impact:** Repeated Proxy gRPC server start/stop cycles accumulate leaked event loop threads and selector resources. In long-running or test scenarios this leads to thread leaks and potential resource exhaustion. **Affected files:** - `proxy/src/main/java/org/apache/rocketmq/proxy/grpc/GrpcServer.java` — `shutdown()` method - `proxy/src/main/java/org/apache/rocketmq/proxy/grpc/GrpcServerBuilder.java` — constructor creates the groups **Severity:** medium — resource leak, no data loss, but can cause thread accumulation over time. An automated fix proposal can be generated. Reply `/approve` to proceed with PR generation. --- *Automated evaluation by github-manager* -- 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]
