Alexander Belyak created IGNITE-18409:
-----------------------------------------

             Summary: Threads left after connection refused
                 Key: IGNITE-18409
                 URL: https://issues.apache.org/jira/browse/IGNITE-18409
             Project: Ignite
          Issue Type: Bug
          Components: clients
    Affects Versions: 3.0.0-beta1
            Reporter: Alexander Belyak


Simple test
{code:java}
public static void main(String[] args) {
    try (IgniteClient client = 
IgniteClient.builder().addresses("127.0.0.1:10800").build()) {
        System.out.println("WORK");
    } catch (Exception e) {
        throw new RuntimeException(e);
    }
    System.out.println("DONE");
}{code}
left JVM running because if a few nio thread still running:
{noformat}
Full thread dump"nioEventLoopGroup-2-1" #14 prio=10 os_prio=0 cpu=13,72ms 
elapsed=62,20s tid=0x00007f7870a8b800 nid=0xb4834 runnable  [0x00007f783d0ee000]
   java.lang.Thread.State: RUNNABLE
    at sun.nio.ch.EPoll.wait(java.base@11.0.17/Native Method)
    at 
sun.nio.ch.EPollSelectorImpl.doSelect(java.base@11.0.17/EPollSelectorImpl.java:120)
    at 
sun.nio.ch.SelectorImpl.lockAndDoSelect(java.base@11.0.17/SelectorImpl.java:124)
    - locked <0x00000006a4cfecc8> (a 
io.netty.channel.nio.SelectedSelectionKeySet)
    - locked <0x00000006a4cd00d8> (a sun.nio.ch.EPollSelectorImpl)
    at sun.nio.ch.SelectorImpl.select(java.base@11.0.17/SelectorImpl.java:141)
    at 
io.netty.channel.nio.SelectedSelectionKeySetSelector.select(SelectedSelectionKeySetSelector.java:68)
    at io.netty.channel.nio.NioEventLoop.select(NioEventLoop.java:813)
    at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:460)
    at 
io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:995)
    at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
    at 
io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
    at java.lang.Thread.run(java.base@11.0.17/Thread.java:829)
"nioEventLoopGroup-2-2" #15 prio=10 os_prio=0 cpu=0,89ms elapsed=62,14s 
tid=0x00007f7870ace000 nid=0xb4835 runnable  [0x00007f783cfee000]
   java.lang.Thread.State: RUNNABLE
    at sun.nio.ch.EPoll.wait(java.base@11.0.17/Native Method)
    at 
sun.nio.ch.EPollSelectorImpl.doSelect(java.base@11.0.17/EPollSelectorImpl.java:120)
    at 
sun.nio.ch.SelectorImpl.lockAndDoSelect(java.base@11.0.17/SelectorImpl.java:124)
    - locked <0x00000006a4b31f90> (a 
io.netty.channel.nio.SelectedSelectionKeySet)
    - locked <0x00000006a4b31d68> (a sun.nio.ch.EPollSelectorImpl)
    at sun.nio.ch.SelectorImpl.select(java.base@11.0.17/SelectorImpl.java:141)
    at 
io.netty.channel.nio.SelectedSelectionKeySetSelector.select(SelectedSelectionKeySetSelector.java:68)
    at io.netty.channel.nio.NioEventLoop.select(NioEventLoop.java:813)
    at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:460)
    at 
io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:995)
    at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
    at 
io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
    at java.lang.Thread.run(java.base@11.0.17/Thread.java:829)
"nioEventLoopGroup-2-3" #16 prio=10 os_prio=0 cpu=0,59ms elapsed=62,13s 
tid=0x00007f7870acf000 nid=0xb4836 runnable  [0x00007f783ceee000]
   java.lang.Thread.State: RUNNABLE
    at sun.nio.ch.EPoll.wait(java.base@11.0.17/Native Method)
    at 
sun.nio.ch.EPollSelectorImpl.doSelect(java.base@11.0.17/EPollSelectorImpl.java:120)
    at 
sun.nio.ch.SelectorImpl.lockAndDoSelect(java.base@11.0.17/SelectorImpl.java:124)
    - locked <0x00000006a4b358f0> (a 
io.netty.channel.nio.SelectedSelectionKeySet)
    - locked <0x00000006a4b356c8> (a sun.nio.ch.EPollSelectorImpl)
    at sun.nio.ch.SelectorImpl.select(java.base@11.0.17/SelectorImpl.java:141)
    at 
io.netty.channel.nio.SelectedSelectionKeySetSelector.select(SelectedSelectionKeySetSelector.java:68)
    at io.netty.channel.nio.NioEventLoop.select(NioEventLoop.java:813)
    at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:460)
    at 
io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:995)
    at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
    at 
io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
    at java.lang.Thread.run(java.base@11.0.17/Thread.java:829)
"Common-Cleaner" #11 daemon prio=8 os_prio=0 cpu=0,34ms elapsed=62,62s 
tid=0x00007f7870340800 nid=0xb4828 in Object.wait()  [0x00007f783dcfe000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
    at java.lang.Object.wait(java.base@11.0.17/Native Method)
    - waiting on <0x00000006a37048f8> (a java.lang.ref.ReferenceQueue$Lock)
    at 
java.lang.ref.ReferenceQueue.remove(java.base@11.0.17/ReferenceQueue.java:155)
    - waiting to re-lock in wait() <0x00000006a37048f8> (a 
java.lang.ref.ReferenceQueue$Lock)
    at jdk.internal.ref.CleanerImpl.run(java.base@11.0.17/CleanerImpl.java:148)
    at java.lang.Thread.run(java.base@11.0.17/Thread.java:829)
    at 
jdk.internal.misc.InnocuousThread.run(java.base@11.0.17/InnocuousThread.java:161)
"Monitor Ctrl-Break" #12 daemon prio=5 os_prio=0 cpu=6,84ms elapsed=62,53s 
tid=0x00007f78707fa000 nid=0xb482a runnable  [0x00007f783dafe000]
   java.lang.Thread.State: RUNNABLE
    at java.net.SocketInputStream.socketRead0(java.base@11.0.17/Native Method)
    at 
java.net.SocketInputStream.socketRead(java.base@11.0.17/SocketInputStream.java:115)
    at 
java.net.SocketInputStream.read(java.base@11.0.17/SocketInputStream.java:168)
    at 
java.net.SocketInputStream.read(java.base@11.0.17/SocketInputStream.java:140)
    at 
sun.nio.cs.StreamDecoder.readBytes(java.base@11.0.17/StreamDecoder.java:284)
    at 
sun.nio.cs.StreamDecoder.implRead(java.base@11.0.17/StreamDecoder.java:326)
    at sun.nio.cs.StreamDecoder.read(java.base@11.0.17/StreamDecoder.java:178)
    - locked <0x00000006a3701680> (a java.io.InputStreamReader)
    at 
java.io.InputStreamReader.read(java.base@11.0.17/InputStreamReader.java:181)
    at java.io.BufferedReader.fill(java.base@11.0.17/BufferedReader.java:161)
    at 
java.io.BufferedReader.readLine(java.base@11.0.17/BufferedReader.java:326)
    - locked <0x00000006a3701680> (a java.io.InputStreamReader)
    at 
java.io.BufferedReader.readLine(java.base@11.0.17/BufferedReader.java:392)
    at com.intellij.rt.execution.application.AppMainV2$1.run(AppMainV2.java:49)
"Reference Handler" #2 daemon prio=10 os_prio=0 cpu=0,22ms elapsed=62,65s 
tid=0x00007f78702f1800 nid=0xb4821 waiting on condition  [0x00007f78449b9000]
   java.lang.Thread.State: RUNNABLE
    at 
java.lang.ref.Reference.waitForReferencePendingList(java.base@11.0.17/Native 
Method)
    at 
java.lang.ref.Reference.processPendingReferences(java.base@11.0.17/Reference.java:241)
    at 
java.lang.ref.Reference$ReferenceHandler.run(java.base@11.0.17/Reference.java:213)
"Finalizer" #3 daemon prio=8 os_prio=0 cpu=0,20ms elapsed=62,65s 
tid=0x00007f78702f3800 nid=0xb4822 in Object.wait()  [0x00007f78448b9000]
   java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(java.base@11.0.17/Native Method)
    - waiting on <0x00000006a3702178> (a java.lang.ref.ReferenceQueue$Lock)
    at 
java.lang.ref.ReferenceQueue.remove(java.base@11.0.17/ReferenceQueue.java:155)
    - waiting to re-lock in wait() <0x00000006a3702178> (a 
java.lang.ref.ReferenceQueue$Lock)
    at 
java.lang.ref.ReferenceQueue.remove(java.base@11.0.17/ReferenceQueue.java:176)
    at 
java.lang.ref.Finalizer$FinalizerThread.run(java.base@11.0.17/Finalizer.java:170)
"Signal Dispatcher" #4 daemon prio=9 os_prio=0 cpu=0,23ms elapsed=62,65s 
tid=0x00007f78702fa000 nid=0xb4823 runnable  [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE
"Service Thread" #5 daemon prio=9 os_prio=0 cpu=0,06ms elapsed=62,65s 
tid=0x00007f78702fc000 nid=0xb4824 runnable  [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE
"C2 CompilerThread0" #6 daemon prio=9 os_prio=0 cpu=317,01ms elapsed=62,65s 
tid=0x00007f78702fe800 nid=0xb4825 waiting on condition  [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE
   No compile task
"C1 CompilerThread0" #9 daemon prio=9 os_prio=0 cpu=280,95ms elapsed=62,65s 
tid=0x00007f7870300800 nid=0xb4826 waiting on condition  [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE
   No compile task
"Sweeper thread" #10 daemon prio=9 os_prio=0 cpu=0,03ms elapsed=62,65s 
tid=0x00007f7870302800 nid=0xb4827 runnable  [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE
"DestroyJavaVM" #17 prio=5 os_prio=0 cpu=506,85ms elapsed=62,13s 
tid=0x00007f787001a000 nid=0xb481a waiting on condition  [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE
"Attach Listener" #18 daemon prio=9 os_prio=0 cpu=27,24ms elapsed=61,66s 
tid=0x00007f781c001000 nid=0xb4842 waiting on condition  [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE
"VM Thread" os_prio=0 cpu=5,56ms elapsed=62,66s tid=0x00007f78702ee800 
nid=0xb4820 runnable  
"GC Thread#0" os_prio=0 cpu=8,44ms elapsed=62,66s tid=0x00007f7870033800 
nid=0xb481b runnable  
"GC Thread#1" os_prio=0 cpu=8,46ms elapsed=62,37s tid=0x00007f7830001000 
nid=0xb482c runnable  
"GC Thread#2" os_prio=0 cpu=6,08ms elapsed=62,37s tid=0x00007f7830002800 
nid=0xb482d runnable  
"GC Thread#3" os_prio=0 cpu=2,76ms elapsed=62,37s tid=0x00007f7830004000 
nid=0xb482e runnable  
"GC Thread#4" os_prio=0 cpu=8,55ms elapsed=62,37s tid=0x00007f7830006000 
nid=0xb482f runnable  
"GC Thread#5" os_prio=0 cpu=8,64ms elapsed=62,37s tid=0x00007f7830008000 
nid=0xb4830 runnable  
"GC Thread#6" os_prio=0 cpu=5,70ms elapsed=62,37s tid=0x00007f7830009800 
nid=0xb4831 runnable  
"GC Thread#7" os_prio=0 cpu=0,36ms elapsed=62,37s tid=0x00007f783000b800 
nid=0xb4832 runnable  
"G1 Main Marker" os_prio=0 cpu=0,14ms elapsed=62,66s tid=0x00007f78700bd000 
nid=0xb481c runnable  
"G1 Conc#0" os_prio=0 cpu=0,03ms elapsed=62,66s tid=0x00007f78700bf000 
nid=0xb481d runnable  
"G1 Refine#0" os_prio=0 cpu=0,13ms elapsed=62,66s tid=0x00007f7870240000 
nid=0xb481e runnable  
"G1 Young RemSet Sampling" os_prio=0 cpu=13,73ms elapsed=62,66s 
tid=0x00007f7870242000 nid=0xb481f runnable  
"VM Periodic Task Thread" os_prio=0 cpu=40,39ms elapsed=62,53s 
tid=0x00007f78707fc800 nid=0xb482b waiting on condition  
JNI global refs: 18, weak refs: 0
{noformat}



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

Reply via email to