Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-12284

InfinispanRuleBasicTest thread leak

    Details

      Description

      The ISPN-12256 fix changed the default infinispan.cluster.stack to test-tcp in the testdriver parent POM, but only added a custom Infinispan configuration with a test-tcp stack in the junit5 module. So InfinispanRuleBasicTest is now failing:

      [2020-09-02T14:08:22.290Z] [0] STDOUT: 14:08:21,360 FATAL (main) [org.infinispan.SERVER] ISPN080028: Infinispan Server failed to start org.infinispan.commons.CacheConfigurationException: ISPN000540: No such JGroups stack 'test-tcp'
      [2020-09-02T14:09:08.806Z] 10:09:05.567 [ERROR] org.infinispan.server.test.junit4.InfinispanRuleBasicTest.null on org.infinispan.server.test.junit4.InfinispanRuleBasicTest  Time elapsed: 59.717 s  <<< FAILURE!
      [2020-09-02T14:09:08.806Z] java.lang.RuntimeException: java.util.concurrent.TimeoutException: After the await period 45 SECONDS the count down should be 0 and is 1
      [2020-09-02T14:09:08.806Z] 	at org.infinispan.commons.test.Exceptions.unchecked(Exceptions.java:262)
      [2020-09-02T14:09:08.806Z] 	at org.infinispan.server.test.core.ContainerInfinispanServerDriver.start(ContainerInfinispanServerDriver.java:241)
      

      In addition, the server driver does not stop its containers after a startup failure, assuming that the containers failed to start. This means the workaround for the docker-java thread leak doesn't run, and a thread leak is reported:

      [2020-09-02T14:09:08.806Z] [TestSuiteProgress] Test failed: org.infinispan.server.test.junit4.InfinispanRuleBasicTest.ThreadLeakChecker
      org.infinispan.commons.test.ThreadLeakChecker$LeakException: Leaked thread: tc-okhttp-stream-621325557 << testng-InfinispanRuleBasicTest << org.infinispan.server.test.junit4.InfinispanRuleBasicTest
      	at app//com.github.dockerjava.okhttp.UnixDomainSocket.recv(Native Method)
      	at app//com.github.dockerjava.okhttp.UnixDomainSocket$UnixSocketInputStream.read(UnixDomainSocket.java:250)
      	at java.base@11.0.7/java.io.FilterInputStream.read(FilterInputStream.java:133)
      	at app//com.github.dockerjava.okhttp.UnixSocketFactory$1$1.read(UnixSocketFactory.java:43)
      	at app//org.testcontainers.shaded.okio.Okio$2.read(Okio.java:140)
      	at app//org.testcontainers.shaded.okio.AsyncTimeout$2.read(AsyncTimeout.java:237)
      	at app//org.testcontainers.shaded.okio.RealBufferedSource.request(RealBufferedSource.java:72)
      	at app//org.testcontainers.shaded.okio.RealBufferedSource.require(RealBufferedSource.java:65)
      	at app//org.testcontainers.shaded.okio.RealBufferedSource.readHexadecimalUnsignedLong(RealBufferedSource.java:307)
      	at app//org.testcontainers.shaded.okhttp3.internal.http1.Http1ExchangeCodec$ChunkedSource.readChunkSize(Http1ExchangeCodec.java:492)
      	at app//org.testcontainers.shaded.okhttp3.internal.http1.Http1ExchangeCodec$ChunkedSource.read(Http1ExchangeCodec.java:471)
      	at app//org.testcontainers.shaded.okhttp3.internal.connection.Exchange$ResponseBodySource.read(Exchange.java:286)
      	at app//org.testcontainers.shaded.okio.RealBufferedSource.exhausted(RealBufferedSource.java:61)
      	at app//com.github.dockerjava.okhttp.FramedSink.accept(FramedSink.java:28)
      	at app//com.github.dockerjava.okhttp.FramedSink.accept(FramedSink.java:13)
      	at app//com.github.dockerjava.okhttp.OkHttpInvocationBuilder.lambda$executeAndStream$4(OkHttpInvocationBuilder.java:330)
      	at app//com.github.dockerjava.okhttp.OkHttpInvocationBuilder$$Lambda$162/0x00000008402f0840.run(Unknown Source)
      	at java.base@11.0.7/java.lang.Thread.run(Thread.java:834)
      Caused by: org.infinispan.commons.test.ThreadLeakChecker$LeakException: testng-InfinispanRuleBasicTest << org.infinispan.server.test.junit4.InfinispanRuleBasicTest
      	at org.infinispan.commons.test.ThreadLeakChecker$ThreadInfoLocal.childValue(ThreadLeakChecker.java:109)
      	at org.infinispan.commons.test.ThreadLeakChecker$ThreadInfoLocal.childValue(ThreadLeakChecker.java:106)
      	at java.base/java.lang.ThreadLocal$ThreadLocalMap.<init>(ThreadLocal.java:411)
      	at java.base/java.lang.ThreadLocal.createInheritedMap(ThreadLocal.java:276)
      	at java.base/java.lang.Thread.<init>(Thread.java:450)
      	at java.base/java.lang.Thread.<init>(Thread.java:709)
      	at java.base/java.lang.Thread.<init>(Thread.java:582)
      	at com.github.dockerjava.okhttp.OkHttpInvocationBuilder.executeAndStream(OkHttpInvocationBuilder.java:335)
      	at com.github.dockerjava.okhttp.OkHttpInvocationBuilder.executeAndStream(OkHttpInvocationBuilder.java:306)
      	at com.github.dockerjava.okhttp.OkHttpInvocationBuilder.get(OkHttpInvocationBuilder.java:80)
      	at com.github.dockerjava.core.exec.LogContainerCmdExec.execute0(LogContainerCmdExec.java:42)
      	at com.github.dockerjava.core.exec.LogContainerCmdExec.execute0(LogContainerCmdExec.java:12)
      	at com.github.dockerjava.core.exec.AbstrAsyncDockerCmdExec.execute(AbstrAsyncDockerCmdExec.java:56)
      	at com.github.dockerjava.core.exec.AbstrAsyncDockerCmdExec.exec(AbstrAsyncDockerCmdExec.java:21)
      	at com.github.dockerjava.core.exec.AbstrAsyncDockerCmdExec.exec(AbstrAsyncDockerCmdExec.java:12)
      	at com.github.dockerjava.core.command.AbstrAsyncDockerCmd.exec(AbstrAsyncDockerCmd.java:21)
      	at org.testcontainers.utility.ResourceReaper.start(ResourceReaper.java:106)
      	at org.testcontainers.DockerClientFactory.client(DockerClientFactory.java:168)
      	at org.infinispan.server.test.core.ContainerInfinispanServerDriver.getDockerBridgeAddress(ContainerInfinispanServerDriver.java:86)
      	at org.infinispan.server.test.core.ContainerInfinispanServerDriver.<init>(ContainerInfinispanServerDriver.java:79)
      	at org.infinispan.server.test.core.ServerRunMode$2.newDriver(ServerRunMode.java:17)
      	at org.infinispan.server.test.core.TestServer.initServerDriver(TestServer.java:139)
      	at org.infinispan.server.test.junit4.InfinispanServerRule$1.evaluate(InfinispanServerRule.java:67)
      	at org.junit.rules.RunRules.evaluate(RunRules.java:20)
      	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
      	at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
      	at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
      	at org.junit.runner.JUnitCore.run(JUnitCore.java:115)
      	at org.testng.junit.JUnit4TestRunner.start(JUnit4TestRunner.java:82)
      	at org.testng.junit.JUnit4TestRunner.run(JUnit4TestRunner.java:70)
      	at org.testng.TestRunner$1.run(TestRunner.java:570)
      	at org.testng.TestRunner.runJUnitWorkers(TestRunner.java:717)
      	at org.testng.TestRunner.privateRunJUnit(TestRunner.java:601)
      	at org.testng.TestRunner.run(TestRunner.java:502)
      	at org.testng.SuiteRunner.runTest(SuiteRunner.java:455)
      	at org.testng.SuiteRunner.access$000(SuiteRunner.java:40)
      	at org.testng.SuiteRunner$SuiteWorker.run(SuiteRunner.java:489)
      	at org.testng.internal.thread.ThreadUtil$1.call(ThreadUtil.java:52)
      	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
      	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
      	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
      	... 1 more
      Caused by: org.infinispan.commons.test.ThreadLeakChecker$LeakException: org.infinispan.server.test.junit4.InfinispanRuleBasicTest
      

      https://ci.infinispan.org/job/Infinispan/job/master/2299/consoleText

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  dan.berindei Dan Berindei
                  Reporter:
                  dan.berindei Dan Berindei
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: