Richard Kosegi created KARAF-4769:
-------------------------------------

             Summary: NPE when executing threads --tree shell command
                 Key: KARAF-4769
                 URL: https://issues.apache.org/jira/browse/KARAF-4769
             Project: Karaf
          Issue Type: Bug
          Components: karaf-shell
    Affects Versions: 3.0.5
         Environment: CentOS 7 x86_64, OracleJDK 1.8.0_101-b13
            Reporter: Richard Kosegi
            Priority: Minor


There is probably race condition in "thread" shell command (Karaf 3.0.5).
When command "threads --tree" is executed repeatedly and very often, following 
NPE is logged to console:

2016-10-15 09:34:46,712 | ERROR | l for user karaf | ShellUtil                  
      | 27 - org.apache.karaf.shell.console - 3.0.5 | Exception caught while 
executing command
java.lang.NullPointerException
        at 
org.apache.karaf.shell.commands.impl.ThreadsAction$ThreadData.isInteresting(ThreadsAction.java:241)
        at 
org.apache.karaf.shell.commands.impl.ThreadsAction$ThreadGroupData.printTree(ThreadsAction.java:179)
        at 
org.apache.karaf.shell.commands.impl.ThreadsAction$ThreadGroupData.printTree(ThreadsAction.java:176)
        at 
org.apache.karaf.shell.commands.impl.ThreadsAction$ThreadGroupData.print(ThreadsAction.java:166)
        at 
org.apache.karaf.shell.commands.impl.ThreadsAction.doExecute(ThreadsAction.java:117)
        at 
org.apache.karaf.shell.console.AbstractAction.execute(AbstractAction.java:33)[27:org.apache.karaf.shell.console:3.0.5]
        at 
org.apache.karaf.shell.commands.basic.AbstractCommand.execute(AbstractCommand.java:33)[27:org.apache.karaf.shell.console:3.0.5]
        at Proxy8fbde0d3_4461_4b6a_ace2_2b1a61886abd.execute(Unknown Source)[:]
        at Proxy8fbde0d3_4461_4b6a_ace2_2b1a61886abd.execute(Unknown Source)[:]
        at 
org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:78)[27:org.apache.karaf.shell.console:3.0.5]
        at 
org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:480)[27:org.apache.karaf.shell.console:3.0.5]
        at 
org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:406)[27:org.apache.karaf.shell.console:3.0.5]
        at 
org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[27:org.apache.karaf.shell.console:3.0.5]
        at 
org.apache.felix.gogo.runtime.Closure.execute(Closure.java:182)[27:org.apache.karaf.shell.console:3.0.5]
        at 
org.apache.felix.gogo.runtime.Closure.execute(Closure.java:119)[27:org.apache.karaf.shell.console:3.0.5]
        at 
org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:94)
        at 
org.apache.karaf.shell.console.impl.jline.ConsoleImpl.run(ConsoleImpl.java:210)
        at 
org.apache.karaf.shell.console.impl.jline.LocalConsoleManager$2$1$1.run(LocalConsoleManager.java:109)
        at java.security.AccessController.doPrivileged(Native 
Method)[:1.8.0_101]
        at 
org.apache.karaf.jaas.modules.JaasHelper.doAs(JaasHelper.java:57)[28:org.apache.karaf.jaas.modules:3.0.5]
        at 
org.apache.karaf.shell.console.impl.jline.LocalConsoleManager$2$1.run(LocalConsoleManager.java:102)[27:org.apache.karaf.shell.console:3.0.5]


This problem is not often reproducible.




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to