reta commented on code in PR #3521: URL: https://github.com/apache/cxf/pull/3521#discussion_r4178970675
########## rt/features/logging/src/main/java/org/apache/cxf/ext/logging/LoggingOutInterceptor.java: ########## Review Comment: > @reta U're welcome. > I know the situation it's quite difficult and confusing. > We need to tackle the two scenario separately. Thanks @vp340 , I spend some time on that today. I think it makes sense to take a step back and at least reproduce the issue (even with synthetic test cases), so I opened https://github.com/apache/cxf/pull/3536 - it has nothing but test cases. Now, back to the double closing and possible leak, I have a few hypothesis here. There are chances that CachedOutputStream::close() is called twice - it should not happen - but it seems like it is, I am wondering if you have a chance to capture a stack trace there (would probably need CXF snapshot version). From other side, even if this is the case, the stream should be unregistered at least once from cleanup queue by CachedOutputStream::resetOut, so how comes it ends in the queue is unclear. To sum up: would be good to find out the test case that reproduces the issue before finding out what the right fix for it could be. Important note on `DelayedCachedOutputStreamCleaner`, this is "last resort patching" to be honest but not the reliable solution, ideally we should never see stream leaking. -- 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]
