-
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
RetainableByteBuffer.DynamicCapacity
enters a corrupt state when released
#12082
Labels
Bug
For general bugs on Jetty side
Comments
lorban
added a commit
that referenced
this issue
Jul 24, 2024
Signed-off-by: Ludovic Orban <[email protected]>
lorban
added a commit
that referenced
this issue
Aug 6, 2024
Signed-off-by: Ludovic Orban <[email protected]>
lorban
added a commit
that referenced
this issue
Aug 7, 2024
Signed-off-by: Ludovic Orban <[email protected]>
lorban
added a commit
that referenced
this issue
Aug 7, 2024
Signed-off-by: Ludovic Orban <[email protected]>
lorban
added a commit
that referenced
this issue
Aug 29, 2024
#12082 Add assertions to DynamicCapacity to avoid entering an undetected corrupt state after it is released. Signed-off-by: Ludovic Orban <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Jetty version(s)
12.1.x
Description
HttpClientTransportOverHTTP2Test.testClientStopsServerDoesNotCloseClientCloses()
illustrates the problem.When you run that test, it passes but dumps the following stack trace to
stderr
:This happens because
writeFrames()
is called more than once, and itself callsRetainableByteBuffer.DynamicCapacity.release()
.The first time
writeFrames()
is called, everything works as expected:release()
figures out it's time to cleanup and does it well.The second time,
release()
relies on aReferenceCounter
instance held it a superclass that was not reset by the first call, hence it throws the above exception to complain that release was already performed. Unfortunately, in the meantime the dynamic capacity accumulator was asked to accumulate, and it did without error. At this point in time,RetainableByteBuffer.DynamicCapacity
contains lifecycled resources that it does not correctly track and is incapable of releasing.The text was updated successfully, but these errors were encountered: