Details
Description
I just hit NPE while running threads --tree command from shell console.
Consecutive invocation of same command didn't reproduce issue, so I think there is probably race condition in threads command handler.
2017-06-06 22:16:45,959 | ERROR | nsole user karaf | ShellUtil | 234 - org.apache.karaf.shell.core - 4.1.1 | Exception caught while executing command java.lang.NullPointerException at org.apache.karaf.shell.commands.impl.ThreadsAction$ThreadData.isInteresting(ThreadsAction.java:242) [232:org.apache.karaf.shell.commands:4.1.1] at org.apache.karaf.shell.commands.impl.ThreadsAction$ThreadGroupData.printTree(ThreadsAction.java:180) [232:org.apache.karaf.shell.commands:4.1.1] at org.apache.karaf.shell.commands.impl.ThreadsAction$ThreadGroupData.printTree(ThreadsAction.java:177) [232:org.apache.karaf.shell.commands:4.1.1] at org.apache.karaf.shell.commands.impl.ThreadsAction$ThreadGroupData.printTree(ThreadsAction.java:177) [232:org.apache.karaf.shell.commands:4.1.1] at org.apache.karaf.shell.commands.impl.ThreadsAction$ThreadGroupData.print(ThreadsAction.java:167) [232:org.apache.karaf.shell.commands:4.1.1] at org.apache.karaf.shell.commands.impl.ThreadsAction.execute(ThreadsAction.java:119) [232:org.apache.karaf.shell.commands:4.1.1] at org.apache.karaf.shell.impl.action.command.ActionCommand.execute(ActionCommand.java:84) [234:org.apache.karaf.shell.core:4.1.1] at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:68) [234:org.apache.karaf.shell.core:4.1.1] at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:86) [234:org.apache.karaf.shell.core:4.1.1] at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:560) [234:org.apache.karaf.shell.core:4.1.1] at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:486) [234:org.apache.karaf.shell.core:4.1.1] at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:375) [234:org.apache.karaf.shell.core:4.1.1] at org.apache.felix.gogo.runtime.Pipe.doCall(Pipe.java:417) [234:org.apache.karaf.shell.core:4.1.1] at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:229) [234:org.apache.karaf.shell.core:4.1.1] at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:59) [234:org.apache.karaf.shell.core:4.1.1] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:?] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:?] at java.lang.Thread.run(Thread.java:748) [?:?]