gatling - scenario executed with repeat goes into infinite loop.

Gatling version:

Scenario gets into infinite loop most of the time.
To terminate the execution, we need to explicitly add the “maxDuration” setting in the setup.

There is NO exception, gatling keeps printing the results for every 5 secs with the same status.

---- SCENARIO_1 -----------------------------------------------------------------
[###################################---------------------------------------] 47%
waiting: 0 / active: 53 / done: 47

Gatling version ?

Gatling Version: 3.0.0

Thanks Stephane.

It’s very likely this issue has been fixed for a very long time!
Please upgrade to 3.2.1.

Hi Stephane,

Upgraded gatling to latest version 3.2.1

Still facing the same issue. No luck :frowning:

Please provide a way for us to reproduce on our side.

Below is the code snippet that I am using. Gatling version is 3.2.1.

Consistently getting the infinite loop issue. But no exceptions. Is there any thread dump I can get when gatling is running to probe more?

`

def getProtocol(endpoint: String, useragent : String): Protocol = http.baseUrl(endpoint)
.inferHtmlResources()
.acceptHeader("/")
.acceptEncodingHeader(“gzip, deflate”)
.acceptLanguageHeader(“en-US, en;q=0.5”)
.userAgentHeader(useragent)
.disableWarmUp
.enableHttp2

// Scenario which gets into infinite loop most of the time.
val scn: ScenarioBuilder = scenario(“SCENARIO_1”)
.exec(repeat(100) {
exitBlockOnFail {
feed(jsonFile(“feeders/test.json”))
.exec(getData1)
.exec(getData2)
}
})

// Below code is used to load the scenario
setUp(
scn.inject(
atOnceUsers(200)
).protocols(getProtocol("",
“Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:59.0) Gecko/20100101 Firefox/59.0”))
).maxDuration(FiniteDuration(“100”,“seconds”) )

`

Really: impossible to debug without being able to reproduce on our side.
Being curious : try removing .inferHtmlResources()

Found the steps to reproduce the issue in one specific scenario.

We are using typesafe scala logging in the code.

`

package com.test.perf.utils
import com.typesafe.scalalogging.StrictLogging

object PerfRun extends CustomSettings with StrictLogging{

def checkHttp(){
logger.debug(s"Testing")
}
}

`

In logback.xml,

`

`

Gatling logs just captures only the HTTP req/res details. Our business use case demands adding additional log information.

If I comment the logging code, simulations are running fine and it completes in less than a second.

Please let me know if this is the right way of using custom logging.

Thanks,
Kamal T

Sorry, but no, we can’t investigate if we don’t get a full actionable sample.

Hi Stephane…

Code snippet what I provided are the exact steps to reproduce.

If there is a way to add custom log data to the same file where gatling is writing the logs, that would be more helpful.
Or if there is option to write custom logs to different file, that should also help.

Thank,

Kamal T