Keshava Bhat created KARAF-5232:
-----------------------------------

             Summary: Give meaningful names to threads
                 Key: KARAF-5232
                 URL: https://issues.apache.org/jira/browse/KARAF-5232
             Project: Karaf
          Issue Type: Improvement
          Components: karaf-core
    Affects Versions: 4.0.4
         Environment: Karaf 4.0.4
            Reporter: Keshava Bhat


We are using karaf 4.0.4 and after the application starts up and we deployed 
few components, we see a lot of threads named very vaguely/generically.
Examples for such stack traces are below

"Thread-161@17444" daemon prio=5 tid=0x31a nid=NA waiting
  java.lang.Thread.State: WAITING
          at sun.misc.Unsafe.park(Unsafe.java:-1)
          at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
          at 
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
          at 
java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)
          at 
java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1067)
          at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127)
          at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
          at java.lang.Thread.run(Thread.java:745)

"Thread-160@17443" daemon prio=5 tid=0x319 nid=NA waiting
  java.lang.Thread.State: WAITING
          at sun.misc.Unsafe.park(Unsafe.java:-1)
          at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
          at 
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
          at 
java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)
          at 
java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1067)
          at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127)
          at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
          at java.lang.Thread.run(Thread.java:745)

"Thread-157@17162" daemon prio=5 tid=0x2fd nid=NA waiting
  java.lang.Thread.State: WAITING
          at sun.misc.Unsafe.park(Unsafe.java:-1)
          at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
          at 
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
          at 
java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)
          at 
java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1067)
          at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127)
          at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
          at java.lang.Thread.run(Thread.java:745)

i believe these are created by config admin 
https://github.com/apache/karaf/blob/master/services/eventadmin/src/main/java/org/apache/felix/eventadmin/impl/Configuration.java
  
and they never go away which makes debugging a problem with a jstack very hard.

Could these threads be given meaningful names?



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to