Unanswered question

What is the reason for java.util.ConcurrentModificationException?

I am running a load test with many users, and my script uses websockets (not sure if that matters).

Some of the users die and I see the following error in the logs:

2019/02/28 16:43:48 ERROR - neoload.Engine: VirtualUserEngine - Unexpected error: java.util.ConcurrentModificationException
at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:901)
at java.util.ArrayList$Itr.next(ArrayList.java:851)
at com.neotys.nl.controller.data.result.CheckEntry.storeVariables(CheckEntry.java:594)
at com.neotys.nl.controller.data.result.CheckEntry.storeContent(CheckEntry.java:480)
at com.neotys.nl.controller.data.result.CheckEntry.store(CheckEntry.java:381)
at com.neotys.nl.controller.data.result.CheckEntry.store(CheckEntry.java:359)
at com.neotys.nl.lg.a.b.a(b.java:141)
at com.neotys.nl.lg.a.a.a(a.java:49)
at com.neotys.nl.lg.a.i.a(i.java:359)
at com.neotys.nl.lg.J.c(J.java:463)
at com.neotys.nl.lg.K.a(K.java:144)
at com.neotys.nl.lg.engine.Q.internalExecute(Q.java:135)
at com.neotys.nl.lg.engine.l.a(l.java:146)
at com.neotys.nl.lg.engine.v.c(v.java:125)
at com.neotys.nl.lg.engine.w.internalExecute(w.java:83)
at com.neotys.nl.lg.engine.l.a(l.java:146)
at com.neotys.nl.lg.engine.P.internalExecute(P.java:66)
at com.neotys.nl.lg.engine.l.a(l.java:146)
at com.neotys.nl.lg.engine.v.c(v.java:125)
at com.neotys.nl.lg.engine.w.internalExecute(w.java:83)
at com.neotys.nl.lg.engine.l.a(l.java:146)
at com.neotys.nl.lg.engine.P.internalExecute(P.java:66)
at com.neotys.nl.lg.engine.l.a(l.java:146)
at com.neotys.nl.lg.engine.v.c(v.java:125)
at com.neotys.nl.lg.engine.w.internalExecute(w.java:83)
at com.neotys.nl.lg.engine.l.a(l.java:146)
at com.neotys.nl.lg.engine.T.internalExecute(T.java:86)
at com.neotys.nl.lg.engine.l.a(l.java:146)
at com.neotys.nl.lg.engine.v.c(v.java:125)
at com.neotys.nl.lg.engine.v.internalExecute(v.java:60)
at com.neotys.nl.lg.engine.l.a(l.java:146)
at com.neotys.nl.lg.engine.X.internalExecute(X.java:70)
at com.neotys.nl.lg.engine.l.a(l.java:146)
at com.neotys.nl.lg.engine.v.c(v.java:125)
at com.neotys.nl.lg.engine.w.internalExecute(w.java:83)
at com.neotys.nl.lg.engine.l.a(l.java:146)
at com.neotys.nl.lg.engine.H.i(H.java:251)
at com.neotys.nl.lg.engine.H.internalExecute(H.java:98)
at com.neotys.nl.lg.engine.l.a(l.java:146)
at com.neotys.nl.lg.engine.c.a(c.java:179)
at com.neotys.nl.lg.engine.c.run(c.java:110)

I have various Javascript files that use "context.variableManager.setValue". Isn't this the right way to set variables? I assume each virtual user has their own context, right?

Anyway, I don't know where in my script this exception happens.

Any idea what might be wrong and what other information I can share with you to maybe help with troubleshooting?

Thanks.

Theodore T.
Theodore T.

Theodore T.

Level
0
23 / 100
points

Answers

Neil W.
Neil W.

Neil W.

Level
3
3884 / 5000
points
Team

Do you have multiple users setting the same variables? I could see they may effect each other. If you truely want separating I would user the put and get functions. context.currentVU.put

https://www.neotys.com/documents/doc/neoload/latest/#593.htm#o605