Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8145741

jstack throws NullPointerException

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P2 P2
    • None
    • 8u66, 11
    • hotspot
    • JDK 8u66, Win 8.1, 64 Bit

    • x86_64
    • windows_8

      Under uncertain conditions it can happen that jstack is throwing a NullPointerException:

      java.lang.NullPointerException
              at sun.jvm.hotspot.tools.StackTrace.run(StackTrace.java:88)
              at sun.jvm.hotspot.tools.StackTrace.run(StackTrace.java:45)
              at sun.jvm.hotspot.tools.JStack.run(JStack.java:66)
              at sun.jvm.hotspot.tools.Tool.startInternal(Tool.java:260)
              at sun.jvm.hotspot.tools.Tool.start(Tool.java:223)
              at sun.jvm.hotspot.tools.Tool.execute(Tool.java:118)
              at sun.jvm.hotspot.tools.JStack.main(JStack.java:92)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:497)
              at sun.tools.jstack.JStack.runJStackTool(JStack.java:140)
              at sun.tools.jstack.JStack.main(JStack.java:106)
       
      I discoveres this when I had running jstack in a bash-driven loop to produce a series of stack snapshots while trying to force a particular failure scenario in the observed VM.

      Unfortunately I cannot tell how a generic way to produce this could look like, so presumably it will be best to simply perform a "blind" code review using the above stack trace.

            Unassigned Unassigned
            mkarg Markus Karg
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: