IndexOutOfBoundsException during check on bodyBytes

130 views
Skip to first unread message

yva

unread,
Jan 10, 2017, 10:30:33 AM1/10/17
to Gatling User Group
Hi,
Exception is thrown when I execute
check(bodyBytes.transform(_.length).greaterThan(0)))
On chunked response

Gatling 2.2.3

Script to reproduce :

import io.gatling.core.Predef._
import io.gatling.http.Predef._


class TestChunkedResponse extends Simulation {

val httpProtocol = http
.baseURL("http://www.httpwatch.com")
.disableFollowRedirect
.acceptHeader("text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8")
.acceptEncodingHeader("gzip, deflate")
.acceptLanguageHeader("en-US,en;q=0.5")
.userAgentHeader("Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0 Iceweasel/31.7.0")



val uri1 = "http://www.httpwatch.com/httpgallery/chunked/chunkedimage.aspx"

val scn = scenario("TestChunkedResponse")
.exec(http("request_0")
.get("/httpgallery/chunked/chunkedimage.aspx?0.7002945220948651")
.check(bodyBytes.transform(_.length).greaterThan(0)))

setUp(scn.inject(atOnceUsers(1))).protocols(httpProtocol)
}


Stack :

G] i.g.h.a.AsyncHandler - Request 'request_0' failed for user 1
java.lang.IndexOutOfBoundsException: index: 0, length: 33653 (expected: range(0, 578))
at io.netty.buffer.AbstractByteBuf.checkIndex0(AbstractByteBuf.java:1125) ~[netty-buffer-4.0.42.Final.jar:4.0.42.Final]
at io.netty.buffer.SlicedByteBuf.getBytes(SlicedByteBuf.java:201) ~[netty-buffer-4.0.42.Final.jar:4.0.42.Final]
at io.netty.buffer.AbstractByteBuf.getBytes(AbstractByteBuf.java:440) ~[netty-buffer-4.0.42.Final.jar:4.0.42.Final]
at io.gatling.commons.util.ByteBufs$.io$gatling$commons$util$ByteBufs$$$anonfun$2(ByteBufs.scala:32) ~[gatling-commons-2.2.3.jar:2.2.3]
at io.gatling.commons.util.ByteBufs$.io$gatling$commons$util$ByteBufs$$$anonfun$2$adapted(ByteBufs.scala:31) ~[gatling-commons-2.2.3.jar:2.2.3]
at scala.collection.immutable.List.foreach(List.scala:381) ~[scala-library-2.11.8.jar:na]
at io.gatling.commons.util.ByteBufs$.byteBufsToByteArray(ByteBufs.scala:31) ~[gatling-commons-2.2.3.jar:2.2.3]
at io.gatling.http.response.ByteArrayResponseBody$.apply(ResponseBody.scala:90) ~[gatling-http-2.2.3.jar:2.2.3]
at io.gatling.http.response.ResponseBuilder.build(ResponseBuilder.scala:189) ~[gatling-http-2.2.3.jar:2.2.3]
at io.gatling.http.ahc.AsyncHandler.withResponse(AsyncHandler.scala:126) [gatling-http-2.2.3.jar:2.2.3]
at io.gatling.http.ahc.AsyncHandler.onCompleted(AsyncHandler.scala:134) [gatling-http-2.2.3.jar:2.2.3]
at io.gatling.http.ahc.AsyncHandler.onCompleted(AsyncHandler.scala:47) [gatling-http-2.2.3.jar:2.2.3]
at org.asynchttpclient.netty.NettyResponseFuture.getContent(NettyResponseFuture.java:181) [async-http-client-2.0.24.jar:na]
at org.asynchttpclient.netty.NettyResponseFuture.done(NettyResponseFuture.java:215) [async-http-client-2.0.24.jar:na]
at org.asynchttpclient.netty.handler.HttpHandler.finishUpdate(HttpHandler.java:58) [async-http-client-2.0.24.jar:na]
at org.asynchttpclient.netty.handler.HttpHandler.handleChunk(HttpHandler.java:159) [async-http-client-2.0.24.jar:na]
at org.asynchttpclient.netty.handler.HttpHandler.handleRead(HttpHandler.java:187) [async-http-client-2.0.24.jar:na]
at org.asynchttpclient.netty.handler.AsyncHttpClientHandler.channelRead(AsyncHttpClientHandler.java:76) [async-http-client-2.0.24.jar:na]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:367) [netty-transport-4.0.42.Final.jar:4.0.42.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:353) [netty-transport-4.0.42.Final.jar:4.0.42.Final]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:346) [netty-transport-4.0.42.Final.jar:4.0.42.Final]
at io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:86) [netty-transport-4.0.42.Final.jar:4.0.42.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:367) [netty-transport-4.0.42.Final.jar:4.0.42.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:353) [netty-transport-4.0.42.Final.jar:4.0.42.Final]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:346) [netty-transport-4.0.42.Final.jar:4.0.42.Final]
at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102) [netty-codec-4.0.42.Final.jar:4.0.42.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:367) [netty-transport-4.0.42.Final.jar:4.0.42.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:353) [netty-transport-4.0.42.Final.jar:4.0.42.Final]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:346) [netty-transport-4.0.42.Final.jar:4.0.42.Final]
at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:435) [netty-transport-4.0.42.Final.jar:4.0.42.Final]
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:293) [netty-codec-4.0.42.Final.jar:4.0.42.Final]
at io.netty.handler.codec.ByteToMessageDecoder.channelInputClosed(ByteToMessageDecoder.java:354) [netty-codec-4.0.42.Final.jar:4.0.42.Final]
at io.netty.handler.codec.ByteToMessageDecoder.channelInactive(ByteToMessageDecoder.java:325) [netty-codec-4.0.42.Final.jar:4.0.42.Final]
at io.netty.handler.codec.http.HttpClientCodec$Decoder.channelInactive(HttpClientCodec.java:228) [netty-codec-http-4.0.42.Final.jar:4.0.42.Final]
at io.netty.channel.CombinedChannelDuplexHandler.channelInactive(CombinedChannelDuplexHandler.java:220) [netty-transport-4.0.42.Final.jar:4.0.42.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:251) [netty-transport-4.0.42.Final.jar:4.0.42.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:237) [netty-transport-4.0.42.Final.jar:4.0.42.Final]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive(AbstractChannelHandlerContext.java:230) [netty-transport-4.0.42.Final.jar:4.0.42.Final]
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelInactive(DefaultChannelPipeline.java:1289) [netty-transport-4.0.42.Final.jar:4.0.42.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:251) [netty-transport-4.0.42.Final.jar:4.0.42.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:237) [netty-transport-4.0.42.Final.jar:4.0.42.Final]
at io.netty.channel.DefaultChannelPipeline.fireChannelInactive(DefaultChannelPipeline.java:893) [netty-transport-4.0.42.Final.jar:4.0.42.Final]
at io.netty.channel.AbstractChannel$AbstractUnsafe$7.run(AbstractChannel.java:691) [netty-transport-4.0.42.Final.jar:4.0.42.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:408) [netty-common-4.0.42.Final.jar:4.0.42.Final]
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:455) [netty-transport-4.0.42.Final.jar:4.0.42.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:140) [netty-common-4.0.42.Final.jar:4.0.42.Final]
at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:144) [netty-common-4.0.42.Final.jar:4.0.42.Final]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_101]

Thanks a lot,

log.log
TestChunkedResponse.scala

Stéphane LANDELLE

unread,
Jan 10, 2017, 12:07:17 PM1/10/17
to gat...@googlegroups.com
Hi,

Is this something that you can reproduce every time?

I haven't been able to reproduce with current master. Could you please check it out?

Thanks,

Stéphane Landelle
GatlingCorp CEO


--
You received this message because you are subscribed to the Google Groups "Gatling User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gatling+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

yva

unread,
Jan 10, 2017, 1:13:25 PM1/10/17
to Gatling User Group
I will try tomorrow with a 3.0.0-snapshot bundle. The problem could not be related to this fixed bug in the master https://github.com/gatling/gatling/pull/3191

yva

unread,
Jan 11, 2017, 4:18:15 AM1/11/17
to Gatling User Group


Le mardi 10 janvier 2017 19:13:25 UTC+1, yva a écrit :
I will try tomorrow with a 3.0.0-snapshot bundle. The problem could not be related to this fixed bug in the master https://github.com/gatling/gatling/pull/3191


Its work with bundle  3.0.0-snapshot but not in version 2.2.3

Stéphane LANDELLE

unread,
Jan 11, 2017, 4:37:33 AM1/11/17
to gat...@googlegroups.com
Thanks for your feedback. So indeed, your problem is #3191

Stéphane Landelle
GatlingCorp CEO


--

yva

unread,
Jan 11, 2017, 7:04:50 AM1/11/17
to Gatling User Group


Le mercredi 11 janvier 2017 10:37:33 UTC+1, Stéphane Landelle a écrit :
Thanks for your feedback. So indeed, your problem is #3191

Stéphane Landelle
GatlingCorp CEO


On Wed, Jan 11, 2017 at 10:18 AM, yva <yval...@gmail.com> wrote:


Le mardi 10 janvier 2017 19:13:25 UTC+1, yva a écrit :
I will try tomorrow with a 3.0.0-snapshot bundle. The problem could not be related to this fixed bug in the master https://github.com/gatling/gatling/pull/3191


Its work with bundle  3.0.0-snapshot but not in version 2.2.3

--
You received this message because you are subscribed to the Google Groups "Gatling User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gatling+u...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

You will fix it in 2.2.X ??

Stéphane LANDELLE

unread,
Jan 11, 2017, 7:11:39 AM1/11/17
to gat...@googlegroups.com
We don't plan on releasing 2.2.x, except for our FrontLine customers.

Stéphane Landelle
GatlingCorp CEO


To unsubscribe from this group and stop receiving emails from it, send an email to gatling+unsubscribe@googlegroups.com.

Siegfried Goeschl

unread,
Feb 9, 2017, 2:16:02 AM2/9/17
to Gatling User Group
Cool - I had exactly the same problem :-)
Reply all
Reply to author
Forward
0 new messages