-
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
CachingHttpContentFactory$CachedHttpContent already released buffer #12681
Comments
@lorban if I remove the setting of |
@gregw I unfortunately cannot reproduce this locally, however the exception is thrown from Can you put a breakpoint on that catch block's |
@lorban I modified the method to: @Override
public void writeTo(Content.Sink sink, long offset, long length, Callback callback)
{
try
{
_buffer.retain();
sink.write(true, BufferUtil.slice(_buffer.getByteBuffer(), (int)offset, (int)length), Callback.from(_buffer::release, callback));
}
catch (Throwable x)
{
// BufferUtil.slice() may fail if offset and/or length are out of bounds.
try
{
_buffer.release();
}
catch (Throwable x2)
{
x2.addSuppressed(x);
throw x2;
}
callback.failed(x);
}
} and now it reports:
So the buffer has already been released, but not nulled? |
The release is happening from:
|
@lorban the issue is that the content is being released from the cache in the shrink, immediately after it has been added and before it has been used. |
@lorban the model for the |
Jetty version(s)
12.1.x
Jetty Environment
EE11
Description
Whilst developing PR #12678, I have woken up
org.eclipse.jetty.servlet6.embedded.Http2Server
even though there is noPushCacheFilter
anymore. The intention is to convert it to early hints instead.However, whilst running the draft Http2Server, I often get exceptions like below when serving the tiles:
How to reproduce?
run the
Http2Server
class, hit http://localhost:8080, do shift reload a few timesThe text was updated successfully, but these errors were encountered: