puniverse / comsat

Fibers and actors for web development
docs.paralleluniverse.co/comsat
Other
598 stars 103 forks source link

servlet forward fails sometimes on tomcat #10

Open eitan101 opened 10 years ago

eitan101 commented 10 years ago

Failed in the 3331th iteration due to NPE:

Jun 06, 2014 8:03:35 AM org.apache.coyote.http11.Http11NioProtocol init
INFO: Initializing ProtocolHandler ["http-nio-8080"]
Jun 06, 2014 8:03:35 AM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
INFO: Using a shared selector for servlet write/read
Jun 06, 2014 8:03:35 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Tomcat
Jun 06, 2014 8:03:35 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/8.0.8
Jun 06, 2014 8:03:35 AM org.apache.coyote.http11.Http11NioProtocol start
INFO: Starting ProtocolHandler ["http-nio-8080"]
Jun 06, 2014 8:03:36 AM org.apache.coyote.http11.Http11NioProtocol pause
INFO: Pausing ProtocolHandler ["http-nio-8080"]
Jun 06, 2014 8:03:36 AM org.apache.catalina.core.StandardService stopInternal
INFO: Stopping service Tomcat
Jun 06, 2014 8:03:36 AM org.apache.coyote.http11.Http11NioProtocol stop
INFO: Stopping ProtocolHandler ["http-nio-8080"]
Jun 06, 2014 8:03:36 AM org.apache.coyote.http11.Http11NioProtocol destroy
INFO: Destroying ProtocolHandler ["http-nio-8080"]
Jun 06, 2014 8:03:36 AM org.apache.coyote.http11.Http11NioProtocol init
INFO: Initializing ProtocolHandler ["http-nio-8080"]
Jun 06, 2014 8:03:36 AM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
INFO: Using a shared selector for servlet write/read
Jun 06, 2014 8:03:36 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Tomcat
Jun 06, 2014 8:03:36 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/8.0.8
Jun 06, 2014 8:03:36 AM org.apache.coyote.http11.Http11NioProtocol start
INFO: Starting ProtocolHandler ["http-nio-8080"]
Jun 06, 2014 8:03:36 AM org.apache.coyote.http11.Http11NioProtocol pause
INFO: Pausing ProtocolHandler ["http-nio-8080"]
Jun 06, 2014 8:03:36 AM org.apache.catalina.core.StandardService stopInternal
INFO: Stopping service Tomcat
Jun 06, 2014 8:03:36 AM org.apache.coyote.http11.Http11NioProtocol stop
INFO: Stopping ProtocolHandler ["http-nio-8080"]
Jun 06, 2014 8:03:36 AM org.apache.coyote.http11.Http11NioProtocol destroy
INFO: Destroying ProtocolHandler ["http-nio-8080"]
Jun 06, 2014 8:03:36 AM org.apache.coyote.http11.Http11NioProtocol init
INFO: Initializing ProtocolHandler ["http-nio-8080"]
Jun 06, 2014 8:03:36 AM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
INFO: Using a shared selector for servlet write/read
Jun 06, 2014 8:03:36 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Tomcat
Jun 06, 2014 8:03:36 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/8.0.8
Jun 06, 2014 8:03:36 AM org.apache.coyote.http11.Http11NioProtocol start
INFO: Starting ProtocolHandler ["http-nio-8080"]
Jun 06, 2014 8:03:56 AM org.apache.coyote.http11.Http11NioProtocol pause
INFO: Pausing ProtocolHandler ["http-nio-8080"]
Jun 06, 2014 8:03:56 AM org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/] log
SEVERE: test: Exception in fiber servlet
java.lang.NullPointerException
    at org.apache.coyote.http11.InternalNioOutputBuffer.flushBuffer(InternalNioOutputBuffer.java:234)
    at org.apache.coyote.http11.InternalNioOutputBuffer.addToBB(InternalNioOutputBuffer.java:189)
    at org.apache.coyote.http11.InternalNioOutputBuffer.commit(InternalNioOutputBuffer.java:177)
    at org.apache.coyote.http11.AbstractHttp11Processor.action(AbstractHttp11Processor.java:739)
    at org.apache.coyote.Response.action(Response.java:180)
    at org.apache.coyote.Response.sendHeaders(Response.java:368)
    at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:335)
    at org.apache.catalina.connector.OutputBuffer.close(OutputBuffer.java:292)
    at org.apache.catalina.connector.CoyoteWriter.close(CoyoteWriter.java:112)
    at co.paralleluniverse.fibers.servlet.FiberHttpServletTest$FiberTestServlet.doGet(FiberHttpServletTest.java:115)
    at co.paralleluniverse.fibers.servlet.FiberHttpServlet.service(FiberHttpServlet.java:630)
    at co.paralleluniverse.fibers.servlet.FiberHttpServlet.suspendableService(FiberHttpServlet.java:737)
    at co.paralleluniverse.fibers.servlet.FiberGenericServlet$1.run(FiberGenericServlet.java:96)
    at co.paralleluniverse.strands.SuspendableUtils$VoidSuspendableCallable.run(SuspendableUtils.java:42)
    at co.paralleluniverse.strands.SuspendableUtils$VoidSuspendableCallable.run(SuspendableUtils.java:30)
    at co.paralleluniverse.fibers.Fiber.run(Fiber.java:938)
    at co.paralleluniverse.fibers.Fiber.run1(Fiber.java:933)
    at co.paralleluniverse.fibers.Fiber.exec1(Fiber.java:677)
    at co.paralleluniverse.fibers.FiberForkJoinScheduler$FiberForkJoinTask.exec1(FiberForkJoinScheduler.java:248)
    at co.paralleluniverse.concurrent.forkjoin.ParkableForkJoinTask.doExec(ParkableForkJoinTask.java:110)
    at co.paralleluniverse.concurrent.forkjoin.ParkableForkJoinTask.exec(ParkableForkJoinTask.java:72)
    at jsr166e.ForkJoinTask.doExec(ForkJoinTask.java:261)
    at jsr166e.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:988)
    at jsr166e.ForkJoinPool.runWorker(ForkJoinPool.java:1628)
    at jsr166e.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)

Jun 06, 2014 8:03:56 AM org.apache.catalina.core.StandardService stopInternal
INFO: Stopping service Tomcat
Jun 06, 2014 8:03:56 AM org.apache.coyote.http11.Http11NioProtocol stop
INFO: Stopping ProtocolHandler ["http-nio-8080"]
Jun 06, 2014 8:03:56 AM org.apache.coyote.http11.Http11NioProtocol destroy
INFO: Destroying ProtocolHandler ["http-nio-8080"]
org.junit.ComparisonFailure: TomcatServer faild on iteration 3331 expected:<[testGet]> but was:<[]>
    at org.junit.Assert.assertEquals(Assert.java:115)
    at co.paralleluniverse.fibers.servlet.FiberHttpServletTest.testForward(FiberHttpServletTest.java:85)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:483)
    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.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.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
    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 org.junit.runners.Suite.runChild(Suite.java:127)
    at org.junit.runners.Suite.runChild(Suite.java:26)
    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 org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecuter.runTestClass(JUnitTestClassExecuter.java:80)
    at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecuter.execute(JUnitTestClassExecuter.java:47)
    at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassProcessor.processTestClass(JUnitTestClassProcessor.java:69)
    at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.processTestClass(SuiteTestClassProcessor.java:49)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:483)
    at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
    at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
    at org.gradle.messaging.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:32)
    at org.gradle.messaging.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93)
    at com.sun.proxy.$Proxy2.processTestClass(Unknown Source)
    at org.gradle.api.internal.tasks.testing.worker.TestWorker.processTestClass(TestWorker.java:103)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:483)
    at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
    at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
    at org.gradle.messaging.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:355)
    at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:66)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:744)