Uploaded image for project: 'Karaf'
  1. Karaf
  2. KARAF-5181

NPE while running "threads --tree" command from console

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 4.1.1
    • 4.1.2, 4.2.0.M1
    • karaf
    • None
    • cat /etc/system-release
      CentOS Linux release 7.3.1611 (Core)

      java -version
      openjdk version "1.8.0_131"
      OpenJDK Runtime Environment (build 1.8.0_131-b12)
      OpenJDK 64-Bit Server VM (build 25.131-b12, mixed mode)

    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) [?:?]
      

      Attachments

        Activity

          People

            jbonofre Jean-Baptiste Onofré
            rkosegi Richard Kosegi
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: