Blazemeter / jmeter-http2-plugin

HTTP2 plugin for Apache JMeter
Apache License 2.0
45 stars 27 forks source link

There is a 0.1% chance of an error when using the http2 sampler #23

Closed li-yi-cloud closed 1 year ago

li-yi-cloud commented 2 years ago

environment: JDK 11 jmeter 5.2.1 bzm http2 2.0

error:

java.util.concurrent.ExecutionException: java.nio.channels.AsynchronousCloseException
    at org.eclipse.jetty.client.util.FutureResponseListener.getResult(FutureResponseListener.java:113)
    at org.eclipse.jetty.client.util.FutureResponseListener.get(FutureResponseListener.java:96)
    at org.eclipse.jetty.client.HttpRequest.send(HttpRequest.java:770)
    at com.blazemeter.jmeter.http2.core.HTTP2JettyClient.sample(HTTP2JettyClient.java:150)
    at com.blazemeter.jmeter.http2.sampler.HTTP2Sampler.sample(HTTP2Sampler.java:57)
    at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1282)
    at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1271)
    at org.apache.jmeter.threads.JMeterThread.doSampling(JMeterThread.java:627)
    at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:551)
    at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:490)
    at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:257)
    at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.nio.channels.AsynchronousCloseException
    at org.eclipse.jetty.http2.client.http.HttpConnectionOverHTTP2.close(HttpConnectionOverHTTP2.java:193)
    at org.eclipse.jetty.http2.client.http.HTTPSessionListenerPromise.onClose(HTTPSessionListenerPromise.java:104)
    at org.eclipse.jetty.http2.client.http.HTTPSessionListenerPromise.onClose(HTTPSessionListenerPromise.java:99)
    at org.eclipse.jetty.http2.api.Session$Listener.onClose(Session.java:260)
    at org.eclipse.jetty.http2.HTTP2Session.notifyClose(HTTP2Session.java:1146)
    at org.eclipse.jetty.http2.HTTP2Session$StreamsState.terminate(HTTP2Session.java:2084)
    at org.eclipse.jetty.http2.HTTP2Session$StreamsState.lambda$sendGoAwayAndTerminate$16(HTTP2Session.java:1994)
    at org.eclipse.jetty.util.Callback$4.completed(Callback.java:147)
    at org.eclipse.jetty.util.Callback$Completing.succeeded(Callback.java:272)
    at org.eclipse.jetty.util.Callback$Nested.succeeded(Callback.java:314)
    at org.eclipse.jetty.http2.HTTP2Session$ControlEntry.succeeded(HTTP2Session.java:1327)
    at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
    at org.eclipse.jetty.http2.HTTP2Flusher.finish(HTTP2Flusher.java:312)
    at org.eclipse.jetty.http2.HTTP2Flusher.succeeded(HTTP2Flusher.java:304)
    at org.eclipse.jetty.io.WriteFlusher.write(WriteFlusher.java:288)
    at org.eclipse.jetty.io.AbstractEndPoint.write(AbstractEndPoint.java:418)
    at org.eclipse.jetty.http2.HTTP2Flusher.process(HTTP2Flusher.java:281)
    at org.eclipse.jetty.util.IteratingCallback.processing(IteratingCallback.java:232)
    at org.eclipse.jetty.util.IteratingCallback.iterate(IteratingCallback.java:214)
    at org.eclipse.jetty.http2.HTTP2Session.frame(HTTP2Session.java:776)
    at org.eclipse.jetty.http2.HTTP2Session.frames(HTTP2Session.java:748)
    at org.eclipse.jetty.http2.HTTP2Session.control(HTTP2Session.java:730)
    at org.eclipse.jetty.http2.HTTP2Session$StreamsState.sendGoAway(HTTP2Session.java:1999)
    at org.eclipse.jetty.http2.HTTP2Session$StreamsState.sendGoAwayAndTerminate(HTTP2Session.java:1994)
    at org.eclipse.jetty.http2.HTTP2Session$StreamsState.lambda$onGoAway$4(HTTP2Session.java:1710)
    at org.eclipse.jetty.http2.HTTP2Session$StreamsState.tryRunZeroStreamsAction(HTTP2Session.java:2073)
    at org.eclipse.jetty.http2.HTTP2Session$StreamsState.onStreamDestroyed(HTTP2Session.java:2014)
    at org.eclipse.jetty.http2.HTTP2Session.onStreamDestroyed(HTTP2Session.java:1043)
    at org.eclipse.jetty.http2.HTTP2Session.removeStream(HTTP2Session.java:881)
    at org.eclipse.jetty.http2.HTTP2Stream.processData(HTTP2Stream.java:521)
    at org.eclipse.jetty.http2.HTTP2Stream.onData(HTTP2Stream.java:480)
    at org.eclipse.jetty.http2.HTTP2Stream.process(HTTP2Stream.java:368)
    at org.eclipse.jetty.http2.HTTP2Session.onData(HTTP2Session.java:261)
    at org.eclipse.jetty.http2.HTTP2Connection$ParserListener.onData(HTTP2Connection.java:407)
    at org.eclipse.jetty.http2.parser.BodyParser.notifyData(BodyParser.java:103)
    at org.eclipse.jetty.http2.parser.DataBodyParser.onData(DataBodyParser.java:145)
    at org.eclipse.jetty.http2.parser.DataBodyParser.onData(DataBodyParser.java:140)
    at org.eclipse.jetty.http2.parser.DataBodyParser.parse(DataBodyParser.java:106)
    at org.eclipse.jetty.http2.parser.Parser.parseBody(Parser.java:193)
    at org.eclipse.jetty.http2.parser.Parser.parse(Parser.java:122)
    at org.eclipse.jetty.http2.HTTP2Connection$HTTP2Producer.produce(HTTP2Connection.java:278)
    at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.produceTask(AdaptiveExecutionStrategy.java:446)
    at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.tryProduce(AdaptiveExecutionStrategy.java:239)
    at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.produce(AdaptiveExecutionStrategy.java:190)
    at org.eclipse.jetty.http2.HTTP2Connection.produce(HTTP2Connection.java:208)
    at org.eclipse.jetty.http2.HTTP2Connection.onFillable(HTTP2Connection.java:155)
    at org.eclipse.jetty.http2.HTTP2Connection$FillableCallback.succeeded(HTTP2Connection.java:378)
    at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:100)
    at org.eclipse.jetty.io.ssl.SslConnection$DecryptedEndPoint.onFillable(SslConnection.java:538)
    at org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:387)
    at org.eclipse.jetty.io.ssl.SslConnection$2.succeeded(SslConnection.java:161)
    at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:100)
    at org.eclipse.jetty.io.SocketChannelEndPoint$1.run(SocketChannelEndPoint.java:101)
    at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.runTask(AdaptiveExecutionStrategy.java:412)
    at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.consumeTask(AdaptiveExecutionStrategy.java:381)
    at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.tryProduce(AdaptiveExecutionStrategy.java:268)
    at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.lambda$new$0(AdaptiveExecutionStrategy.java:138)
    at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:378)
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:894)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1038)
    ... 1 more

image

RicardoPoleo commented 2 years ago

Hello @li-yi-cloud,

Thanks for reporting this, it looks pretty inconvenient.

We added this behaviour to our backlog and, as soon a release is made with the fix, I'll come back and let you know.

Happy Coding and, once again, Thanks for taking the time. We really appreciate it.

3dgiordano commented 1 year ago

Hi @li-yi-cloud

I made a pre-release with some changes in the plugin. https://github.com/Blazemeter/jmeter-http2-plugin/releases/tag/v2.0.2

This pre-release solve some problems in the thread management of the internal jetty http client. Maybe you can try the pre-release and let us know if it has improved and solved the problem.

Thanks.

3dgiordano commented 1 year ago

Hi @li-yi-cloud

The final release 2.0.2 is here https://github.com/Blazemeter/jmeter-http2-plugin/releases/tag/v2.0.2 In hours it will be available in Plugin Manager.

We are waiting to see if it resolves your issues.

Regards

3dgiordano commented 1 year ago

Hello @li-yi-cloud

It has been a while since we saw some activity regarding this issue. I'll be closing it but, if the error persists in the current version, please don't hesitate to open it up again.