#2289 new
yuan

a random ConcurrentModificationException in Play framework 1.2.7.2

Reported by yuan | December 25th, 2018 @ 02:35 PM

I'm a user of Play framework of 1.2.7.2.
I have met an error when i do stress testing in Jmeter, the server is tomcat 6/7, java 7/8, almost of the result is correct, but few of result is http 500, this error result is aboult 0.05%.

Could I do any workaround or config to avoid this error?

Framework version:
1.2.7.2

Platform you're using:
Centos 7, tomcat 6/7, java 7/8

Reproduction steps:

Details:

in the tomcat log:

Internal Server Error (500)

Oops: ConcurrentModificationException
An unexpected error occured caused by exception ConcurrentModificationException: null

play.exceptions.UnexpectedException: Unexpected Error
at play.mvc.ActionInvoker.invoke(ActionInvoker.java:264) at play.server.ServletWrapper$ServletInvocation.execute(ServletWrapper.java:574) at play.Invoker$Invocation.run(Invoker.java:278) at play.server.ServletWrapper$ServletInvocation.run(ServletWrapper.java:565) at play.Invoker.invokeInThread(Invoker.java:68) at play.server.ServletWrapper.service(ServletWrapper.java:143) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:228) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:212) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:634) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445) at java.lang.Thread.run(Thread.java:748) Caused by: java.util.ConcurrentModificationException
at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:909) at java.util.ArrayList$Itr.next(ArrayList.java:859) at play.mvc.ActionInvoker.handleBefores(ActionInvoker.java:302) at play.mvc.ActionInvoker.invoke(ActionInvoker.java:142) ... 18 more 2018.12.25 14:29:58 ERROR play(602):?

Oops: ConcurrentModificationException
An unexpected error occured caused by exception ConcurrentModificationException: null

play.exceptions.UnexpectedException: Exception while doing @Finally
at play.mvc.ActionInvoker.handleFinallies(ActionInvoker.java:445) at play.mvc.ActionInvoker.invoke(ActionInvoker.java:257) at play.server.ServletWrapper$ServletInvocation.execute(ServletWrapper.java:574) at play.Invoker$Invocation.run(Invoker.java:278) at play.server.ServletWrapper$ServletInvocation.run(ServletWrapper.java:565) at play.Invoker.invokeInThread(Invoker.java:68) at play.server.ServletWrapper.service(ServletWrapper.java:143) at javax.servlet.http.HttpServlet.service(HttpServlet.java:731) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:218) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:110) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:506) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:962) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:445) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1087) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748) Caused by: java.util.ConcurrentModificationException
at java.util.ArrayList.sort(ArrayList.java:1464) at java.util.Collections.sort(Collections.java:175) at play.mvc.ActionInvoker.handleFinallies(ActionInvoker.java:391) ... 27 more

Internal Server Error (500)

Oops: ConcurrentModificationException
An unexpected error occured caused by exception ConcurrentModificationException: null

play.exceptions.UnexpectedException: Unexpected Error
at play.mvc.ActionInvoker.invoke(ActionInvoker.java:264) at play.server.ServletWrapper$ServletInvocation.execute(ServletWrapper.java:574) at play.Invoker$Invocation.run(Invoker.java:278) at play.server.ServletWrapper$ServletInvocation.run(ServletWrapper.java:565) at play.Invoker.invokeInThread(Invoker.java:68) at play.server.ServletWrapper.service(ServletWrapper.java:143) at javax.servlet.http.HttpServlet.service(HttpServlet.java:731) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:218) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:110) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:506) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:962) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:445) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1087) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748) Caused by: java.util.ConcurrentModificationException
at java.util.ArrayList.sort(ArrayList.java:1464) at java.util.Collections.sort(Collections.java:175) at play.mvc.ActionInvoker.handleAfters(ActionInvoker.java:335) at play.mvc.ActionInvoker.invoke(ActionInvoker.java:210) ... 26 more

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2>Play framework</h2>

Play makes it easier to build Web applications with Java. It is a clean alternative to bloated Enterprise Java stacks. It focuses on developer productivity and targets RESTful architectures. Learn more on the <a href="http://www.playframework.org">http://www.playframework.org</a> website.<br><br>

<h2>Source code is hosted on github</h2>Check out our repository at <a href="http://github.com/playframework/play">http://github.com/playframework/play</a><br><br>

<h2>Contributing, creating a patch</h2> Please read the <a href="http://play.lighthouseapp.com/projects/57987/contributor-guide">contributor guide</a><br><br>

<h2>Reporting Security Vulnerabilities</h2> Since all bug reports are public, please report any security vulnerability directly to <em>guillaume dot bort at gmail dot com</em>.<br><br>

<h2>Creating a bug report</h2> Bug reports are incredibly helpful, so take time to report bugs and request features in our ticket tracker. We’re always grateful for patches to Play’s code. Indeed, bug reports with attached patches will get fixed far quickly than those without any.<br><br>

Please include as much relevant information as possible including the exact framework version you're using and a code snippet that reproduces the problem.<br><br>

Don't have too much expectations. Unless the bug is really a serious "everything is broken" thing, you're creating a ticket to start a discussion. Having a patch (or a branch on Github we can pull from) is better, but then again we'll only pull high quality branches that make sense to be in the core of Play.

Pages