Aias00 opened a new issue, #6776:
URL: https://github.com/apache/shenyu/issues/6776

   - Severity: Medium
   - Location:
   
`shenyu-disruptor/src/main/java/org/apache/shenyu/disruptor/DisruptorProviderManage.java:98-134`
   - 
   Description:
   `startup()` unconditionally constructs a new `OrderlyExecutor`, a new 
`Disruptor`, new `QueueConsumer`s, and overwrites `this.provider` without 
shutting down any prior instance. No guard (`provider != null`) and no shutdown 
of previously-assigned disruptor/executor. Threads are `daemon=false`.
   - 
   Impact:
   Any code path calling `startup()` a second time (reconnect, re-init, retry, 
test re-entry) leaks the previous Disruptor's non-daemon provider threads plus 
`OrderlyExecutor`/`SingletonExecutor` threads; prevents JVM exit and grows 
thread counts.
   - 
   Suggested fix:
   Guard with `AtomicBoolean started`; on re-entry `if (provider != null) 
shutdown()` first; make `startup` idempotent.
   - 
   Confidence: Medium
   - Related existing: none — #6262 is `shutdown()` not closing executor; this 
is `startup()` not closing the *previous* instance on re-entry.
   
   ---
   _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]

Reply via email to