Gatling Threads Hanging Could Not Quit

there was a odd behavior in my test that some gatling threads could not quit properly when test time was up. They all looked like waiting for some requests to get back. i had to call killall java to kill the process. any ideas why this would happen? Thanks

This usually happens when a component crashed (usually because a user wrote unsafe custom code, like blindly using session(“foo”).as) and we failed to properly recover (we’re supposed to have this covered, but well… nobody’s perfect).

I’m about to develop a LeakReporter that will report all users who were lost along the way: https://github.com/excilys/gatling/issues/1620
Stay tuned, it should be available in master in a few hours, and then, we’ll be able to investigate and find out where the leak happened.

Here’s the leak reporter: https://github.com/excilys/gatling/issues/1620

Please let me know if you can get you hands on its report. Leak should happen just after reported last logged events.

add leak into datawriter list, will this affect performance? i’m going to have a try

在 2014年1月30日星期四UTC-8上午1时50分10秒,Stéphane Landelle写道:

add leak into datawriter list, will this affect performance? i'm going to
have a try

Yes, it could, depending on the number of concurrent users and how many
requests they send per second: it hold in memory a map of every alive user
last event.

i see. then i may set a bigger jvm size.

in your first reply, you said you could be caused bad code that caused component to crash. i checked my code, two pieces that might not be safe:

exec(session => {
val tList = session(“typeList”).as[Seq[String]]
val wList = session(“weightList”).as[Seq[String]]
val index = tList.indexOf(“0”)
val weight = wList(index)
session.set(“index”,index)
session.set(“weight”,weight)
})

.queryParam(""“type”"", session => session(“counter”).as[Int]+1)

will these two cause the crash issue? if so i may think about re-write it.

在 2014年1月30日星期四UTC-8上午10时10分21秒,Stéphane Landelle写道:

I think the problem is on my side with my latest changes.
I was able to reproduce and will try to fix this later tonight.

Hey Kan,

Sorry for the delay, this part is quite complicated.
I just pushed the fix.

Cheers,

Stéphane

Thanks! i will give it a try!