-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix buffer leaks in FCGI and H3 HttpClientIdleTimeoutTest
#10432
Fix buffer leaks in FCGI and H3 HttpClientIdleTimeoutTest
#10432
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this leak was entirely contained within the test case.
Interesting.
Wonder if we should document how to turn on Leak tracking in our developer guide?
I'm open to the idea, but the leak tracking buffer pool currently is rough on the edges, so I'm not keen on exposing it to end users as it currently is. @gregw had a similar suggestion here (#10325 (comment)), and we agreed that, as it stands, the leak tracker has little value outside the scope of our tests. |
This requires more investigation as other protocols manage to release their buffers despite the callback not being completed. We, at the very least, need to understand why not FCGI. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we fix FCGI instead of just the test?
On hold until #10277 is sorted. |
HttpClientIdleTimeoutTest
HttpClientIdleTimeoutTest
…ore checking for leaks - improve HttpClientIdleTimeoutTest by making it upload some content - fix FCGI server leak caused by idle timeout - fix H3 server leak caused by idle timeout Signed-off-by: Ludovic Orban <lorban@bitronix.be>
1855c8d
to
a424ae3
Compare
HttpClientIdleTimeoutTest
HttpClientIdleTimeoutTest
@sbordet @gregw @joakime I've reworked these tests by using This PR is finally ready for review. |
HttpClientIdleTimeoutTest
HttpClientIdleTimeoutTest
...y-fcgi-server/src/main/java/org/eclipse/jetty/fcgi/server/internal/ServerFCGIConnection.java
Outdated
Show resolved
Hide resolved
...y-core/jetty-http3/jetty-http3-common/src/main/java/org/eclipse/jetty/http3/HTTP3Stream.java
Outdated
Show resolved
Hide resolved
...nsports/src/test/java/org/eclipse/jetty/test/client/transport/HttpClientIdleTimeoutTest.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
…10226-fcgi-HttpClientIdleTimeoutTest-leaks
@lorban the OSGI CI failures look like hard failures. @janbartel any ideas to help out? |
…10226-fcgi-HttpClientIdleTimeoutTest-leaks
…ore checking for leaks - improve HttpClientIdleTimeoutTest by making it upload some content - fix FCGI server leak caused by idle timeout - fix H3 server leak caused by idle timeout Signed-off-by: Ludovic Orban <lorban@bitronix.be>
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
… empty Signed-off-by: Ludovic Orban <lorban@bitronix.be>
… empty Signed-off-by: Ludovic Orban <lorban@bitronix.be>
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
fa05eda
to
4dbd35a
Compare
I can't see any more issues after rebasing from |
…10226-fcgi-HttpClientIdleTimeoutTest-leaks
…' of github.com:jetty/jetty.project into fix/jetty-12-10226-fcgi-HttpClientIdleTimeoutTest-leaks
…10226-fcgi-HttpClientIdleTimeoutTest-leaks
@sbordet nudge |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a few niggles
...y-fcgi-server/src/main/java/org/eclipse/jetty/fcgi/server/internal/ServerFCGIConnection.java
Outdated
Show resolved
Hide resolved
...y-fcgi-server/src/main/java/org/eclipse/jetty/fcgi/server/internal/ServerFCGIConnection.java
Outdated
Show resolved
Hide resolved
...ty-http3/jetty-http3-common/src/main/java/org/eclipse/jetty/http3/HTTP3StreamConnection.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
…10226-fcgi-HttpClientIdleTimeoutTest-leaks
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
testClientIdleTimeout
andtestRequestIdleTimeout
leak a buffer because the handler's callback is never completed and they don't give the server a chance to reclaim its resources after idle timeout.Note: the leak was only detected in FCGI because the client was not uploading any content. Adding some uploaded content uncovered an equivalent leak in H3.
See #10226