Uploaded image for project: 'JGroups'
  1. JGroups
  2. JGRP-571

all threads are daemon

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 2.5.1, 2.6
    • 2.5
    • None

      Create and join a channel, then LockSupport.park() in main.
      Dump out all Threads (ctrl-break) and they are all daemon.

      Thread Pool threads get marked daemon because they are created from the IO threads (which are daemon).

      Recommend searching for setDaemon(true) and determining if all uses are correct.

      Caused my program (which is event/message driven) to immediately exit.

      "Incoming Thread,137.161.130.87:1956" daemon prio=10 tid=0x033ad400 nid=0x2378 waiting on condition [0x040cf000..0x040cfc94]
      java.lang.Thread.State: WAITING (parking)
      at sun.misc.Unsafe.park(Native Method)

      • parking to wait for <0x24107308> (a java.util.concurrent.SynchronousQueue$TransferStack)
        at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
        at java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill(SynchronousQueue.java:422)
        at java.util.concurrent.SynchronousQueue$TransferStack.transfer(SynchronousQueue.java:323)
        at java.util.concurrent.SynchronousQueue.take(SynchronousQueue.java:857)
        at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:946)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:906)
        at java.lang.Thread.run(Thread.java:619)

      "MERGE2.FindSubgroups thread (channel=iewtpt, local_addr=137.161.130.87:1956)" daemon prio=6 tid=0x033a9800 nid=0xe70 waiting on condition [0x0407f000..0x0407fd14]
      java.lang.Thread.State: TIMED_WAITING (sleeping)
      at java.lang.Thread.sleep(Native Method)
      at org.jgroups.util.Util.sleep(Util.java:851)
      at org.jgroups.protocols.MERGE2$FindSubgroups.run(MERGE2.java:265)
      at java.lang.Thread.run(Thread.java:619)

      "OOB Thread,137.161.130.87:1956" daemon prio=10 tid=0x0337b400 nid=0x24bc waiting on condition [0x0411f000..0x0411fd94]
      java.lang.Thread.State: WAITING (parking)
      at sun.misc.Unsafe.park(Native Method)

      • parking to wait for <0x241000f0> (a java.util.concurrent.SynchronousQueue$TransferStack)
        at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
        at java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill(SynchronousQueue.java:422)
        at java.util.concurrent.SynchronousQueue$TransferStack.transfer(SynchronousQueue.java:323)
        at java.util.concurrent.SynchronousQueue.take(SynchronousQueue.java:857)
        at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:946)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:906)
        at java.lang.Thread.run(Thread.java:619)

      "ServerSocket acceptor thread (channel=iewtpt)" daemon prio=6 tid=0x033a8800 nid=0x1e38 runnable [0x0402f000..0x0402fb14]
      java.lang.Thread.State: RUNNABLE
      at java.net.PlainSocketImpl.socketAccept(Native Method)
      at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:384)

      • locked <0x24100258> (a java.net.SocksSocketImpl)
        at java.net.ServerSocket.implAccept(ServerSocket.java:450)
        at java.net.ServerSocket.accept(ServerSocket.java:421)
        at org.jgroups.protocols.FD_SOCK$ServerSocketHandler.run(FD_SOCK.java:1073)
        at java.lang.Thread.run(Thread.java:619)

      "UDP mcast receiver,137.161.130.87:1956" daemon prio=10 tid=0x0303ec00 nid=0x2170 runnable [0x03fdf000..0x03fdfc14]
      java.lang.Thread.State: RUNNABLE
      at java.net.PlainDatagramSocketImpl.receive0(Native Method)

      • locked <0x24100418> (a java.net.PlainDatagramSocketImpl)
        at java.net.PlainDatagramSocketImpl.receive(PlainDatagramSocketImpl.java:136)
      • locked <0x24100418> (a java.net.PlainDatagramSocketImpl)
        at java.net.DatagramSocket.receive(DatagramSocket.java:712)
      • locked <0x24100458> (a java.net.DatagramPacket)
      • locked <0x24100478> (a java.net.MulticastSocket)
        at org.jgroups.protocols.UDP.run(UDP.java:247)
        at java.lang.Thread.run(Thread.java:619)

      "UDP ucast receiver,137.161.130.87:1956" daemon prio=6 tid=0x02ff3000 nid=0x2734 runnable [0x03f8f000..0x03f8fb94]
      java.lang.Thread.State: RUNNABLE
      at java.net.PlainDatagramSocketImpl.receive0(Native Method)

      • locked <0x24100680> (a java.net.PlainDatagramSocketImpl)
        at java.net.PlainDatagramSocketImpl.receive(PlainDatagramSocketImpl.java:136)
      • locked <0x24100680> (a java.net.PlainDatagramSocketImpl)
        at java.net.DatagramSocket.receive(DatagramSocket.java:712)
      • locked <0x241006c0> (a java.net.DatagramPacket)
      • locked <0x241006e0> (a java.net.DatagramSocket)
        at org.jgroups.protocols.UDP$UcastReceiver.run(UDP.java:916)
        at java.lang.Thread.run(Thread.java:619)

      "main" prio=6 tid=0x001ca000 nid=0x208 waiting on condition [0x002af000..0x002afe54]
      java.lang.Thread.State: WAITING (parking)
      at sun.misc.Unsafe.park(Native Method)
      at java.util.concurrent.locks.LockSupport.park(LockSupport.java:283)
      at HostNode.main(HostNode.java:607)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)

              rhn-engineering-bban Bela Ban
              mnewcomb_jira Michael Newcomb (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: