Pre-check
Search before asking
Apache Dubbo Component
Java SDK (apache/dubbo)
Dubbo Version
Dubbo Java 3.3, Ubuntu 20.04
Steps to reproduce this issue
Resource leak, non-deterministic.
What you expected to happen
CompositeInputStream.close() should attempt to close all underlying streams, even if one close() throws. After trying all closes, it should throw the first IOException and attach later close failures as suppressed exceptions (if any).
This prevents partial cleanup and potential resource leaks.
Anything else
Current behavior: CompositeInputStream.close() stops at the first IOException, leaving remaining streams unclosed.
Frequency: Every time an underlying stream’s close() throws.
Proposed fix: Wrap each close() in try/catch while draining the queue, collect the first IOException, suppress subsequent failures, and throw after attempting all closes.
Do you have a (mini) reproduction demo?
Are you willing to submit a pull request to fix on your own?
Code of Conduct
Pre-check
Search before asking
Apache Dubbo Component
Java SDK (apache/dubbo)
Dubbo Version
Dubbo Java 3.3, Ubuntu 20.04
Steps to reproduce this issue
Resource leak, non-deterministic.
What you expected to happen
CompositeInputStream.close()should attempt to close all underlying streams, even if one close() throws. After trying all closes, it should throw the firstIOExceptionand attach later close failures as suppressed exceptions (if any).This prevents partial cleanup and potential resource leaks.
Anything else
Current behavior: CompositeInputStream.close() stops at the first IOException, leaving remaining streams unclosed.
Frequency: Every time an underlying stream’s close() throws.
Proposed fix: Wrap each close() in try/catch while draining the queue, collect the first IOException, suppress subsequent failures, and throw after attempting all closes.
Do you have a (mini) reproduction demo?
Are you willing to submit a pull request to fix on your own?
Code of Conduct