Aias00 opened a new issue, #6735: URL: https://github.com/apache/shenyu/issues/6735
- severity: Medium - files: `shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-tcp/src/main/java/org/apache/shenyu/plugin/tcp/handler/TcpProxySelectorDataHandler.java:38-46`; `.../TcpBootstrapFactory.java:68-70` - description: `handlerProxySelector` checks `inCache(name)`, then `createBootstrapServer` (binds port, starts event-loop threads), then `cache(name, server)`. This check-then-act is not atomic; `cache` is a plain `ConcurrentHashMap.put`. Two concurrent sync events for the same selector both observe `inCache=false`, both call `start()` (second throws `BindException`, or two servers created and `put` keeps only the last). The orphaned server is never `shutdown()`. - impact: Duplicate/orphaned TCP bootstrap servers with leaked event-loop threads and orphan EventBus. - suggested_fix: Use `computeIfAbsent(name, n -> createAndStart(...))` or `putIfAbsent` and shut down the loser. - confidence: Medium - related_existing: #5047 describes the leak symptom; this is the distinct concurrency root cause. --- _Identified during the 2026-08-02 deep re-scan; full list in [`docs/scan2-2026-08-02/06-medium-tiers.md`](docs/scan2-2026-08-02/06-medium-tiers.md)._ -- 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]
