Uploaded image for project: 'Apache Cassandra'
  1. Apache Cassandra
  2. CASSANDRA-20119

Some benchmark tests leak LocalLog-related thread

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Triage Needed
    • Normal
    • Resolution: Unresolved
    • None
    • None
    • None
    • All
    • None

    Description

      I am running a benchmark, like CacheLoaderBench and there are these messages when iteration is over

      <JMH had finished, but forked VM did not exit, are there stray running threads? Waiting 9 seconds more...>
      
      Non-finished threads:
      
      Thread[GlobalLogFollower,5,system]
        at java.base@11.0.12/jdk.internal.misc.Unsafe.park(Native Method)
        at java.base@11.0.12/java.util.concurrent.locks.LockSupport.park(LockSupport.java:323)
        at app//org.apache.cassandra.utils.concurrent.WaitQueue$Standard$AbstractSignal.await(WaitQueue.java:290)
        at app//org.apache.cassandra.utils.concurrent.WaitQueue$Standard$AbstractSignal.await(WaitQueue.java:283)
        at app//org.apache.cassandra.tcm.log.LocalLog$Async$AsyncRunnable.run(LocalLog.java:816)
        at app//org.apache.cassandra.concurrent.InfiniteLoopExecutor.loop(InfiniteLoopExecutor.java:121)
        at app//org.apache.cassandra.concurrent.InfiniteLoopExecutor$$Lambda$233/0x0000000800393840.run(Unknown Source)
        at app//io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
        at java.base@11.0.12/java.lang.Thread.run(Thread.java:829)
      Thread[DestroyJavaVM,5,main]
      

      I noticed this is its teardown

          @TearDown(Level.Trial)
          public void teardown()
          {
              CQLTester.tearDownClass();
              CommitLog.instance.stopUnsafe(true);
              CQLTester.cleanup();
          }
      

      when I do this it will be OK

         @TearDown(Level.Trial)
          public void teardown()
          {
              CQLTester.tearDownClass();
              CommitLog.instance.stopUnsafe(true);
              ClusterMetadataService.instance().log().close();
              CQLTester.cleanup();
          }
      

      Worth to say that benchark eventually finishes. It is not stuck, JMH just waits and checks for 30 seconds and then it seems to "kill it".

      Attachments

        Activity

          People

            Unassigned Unassigned
            smiklosovic Stefan Miklosovic
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: