[ 
https://issues.apache.org/jira/browse/CASSANDRA-20119?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Stefan Miklosovic updated CASSANDRA-20119:
------------------------------------------
    Description: 
I am running a benchmark, like CacheLoaderBench and there are these messages 
when iteration is over

{code}
<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 [email protected]/jdk.internal.misc.Unsafe.park(Native Method)
  at 
[email protected]/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 [email protected]/java.lang.Thread.run(Thread.java:829)
Thread[DestroyJavaVM,5,main]
{code}

I noticed this is its teardown

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

when I do this it will be OK

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

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".

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

{code}
<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 [email protected]/jdk.internal.misc.Unsafe.park(Native Method)
  at 
[email protected]/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 [email protected]/java.lang.Thread.run(Thread.java:829)
Thread[DestroyJavaVM,5,main]
{code}

I noticed this is its teardown

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

when I do this it will be OK

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

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


> Some benchmark tests leak LocalLog-related thread
> -------------------------------------------------
>
>                 Key: CASSANDRA-20119
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-20119
>             Project: Apache Cassandra
>          Issue Type: Bug
>            Reporter: Stefan Miklosovic
>            Priority: Normal
>
> I am running a benchmark, like CacheLoaderBench and there are these messages 
> when iteration is over
> {code}
> <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 [email protected]/jdk.internal.misc.Unsafe.park(Native Method)
>   at 
> [email protected]/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 [email protected]/java.lang.Thread.run(Thread.java:829)
> Thread[DestroyJavaVM,5,main]
> {code}
> I noticed this is its teardown
> {code}
>     @TearDown(Level.Trial)
>     public void teardown()
>     {
>         CQLTester.tearDownClass();
>         CommitLog.instance.stopUnsafe(true);
>         CQLTester.cleanup();
>     }
> {code}
> when I do this it will be OK
> {code}
>    @TearDown(Level.Trial)
>     public void teardown()
>     {
>         CQLTester.tearDownClass();
>         CommitLog.instance.stopUnsafe(true);
>         ClusterMetadataService.instance().log().close();
>         CQLTester.cleanup();
>     }
> {code}
> 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".



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to