RetainableByteBuffer.DynamicCapacity
enters a corrupt state when released
#12082
Labels
Bug
For general bugs on Jetty side
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: