https://bz.apache.org/bugzilla/show_bug.cgi?id=58319
Bug ID: 58319 Summary: Data race inside the non-thread-safe ArrayList org.apache.catalina.valves.TesterAccessLogValve.entrie s Product: Tomcat 8 Version: trunk Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P2 Component: Catalina Assignee: dev@tomcat.apache.org Reporter: yilong...@runtimeverification.com Reported by RV-Predict (a dynamic race detector) when running the test suite: Data race on field java.util.ArrayList.$state: {{{ Concurrent write in thread T98 (locks held: {Monitor@5e5cc762}) ----> at org.apache.catalina.valves.TesterAccessLogValve.log(TesterAccessLogValve.java:48) at org.apache.catalina.core.AccessLogAdapter.log(AccessLogAdapter.java:51) at org.apache.catalina.core.ContainerBase.logAccess(ContainerBase.java:1042) at org.apache.catalina.connector.CoyoteAdapter.event(CoyoteAdapter.java:245) at org.apache.coyote.http11.Http11NioProcessor.event(Http11NioProcessor.java:106) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:661) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1527) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1484) - locked Monitor@5e5cc762 at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1483) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) T98 is created by T90 at java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:1010) Concurrent read in thread T1 (locks held: {}) ----> at org.apache.catalina.valves.TesterAccessLogValve.validateAccessLog(TesterAccessLogValve.java:79) at org.apache.catalina.comet.TestCometProcessor.doSimpleCometTest(TestCometProcessor.java:347) at org.apache.catalina.comet.TestCometProcessor.testSimpleCometClientEndFail(TestCometProcessor.java:261) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55) at org.junit.rules.RunRules.evaluate(RunRules.java:20) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) at org.junit.runners.ParentRunner.run(ParentRunner.java:309) at junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:38) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:532) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:1165) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:1016) T1 is the main thread }}} Looks like TesterAccessLogValve.entries is accessed from multiple threads without proper synchronization. -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org