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

NPE when executing threads --tree shell command

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 3.0.5
    • None
    • karaf
    • None
    • CentOS 7 x86_64, OracleJDK 1.8.0_101-b13

    Description

      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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            rkosegi Richard Kosegi
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: