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

jstack should be like a remote ctrl-break

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P3 P3
    • 6
    • 6
    • core-svc
    • None
    • b39
    • generic
    • generic


      jstack (being SA-based) is designed to attach to a core file or hung process. If you use it to get a stack trace of a running application then it requires suspending the target VM while the utility attaches. Furthermore, as the utility is working from a snapshot of the process there is no guarantee that it will see all stacks in a consistent state.

      As part of the VM attach mechanism (6173612) we will have the ability to send the output from the control-break handler (ctrl-\ or ctrl-break) back to the attaching tool.

      This RFE is submitted with a view to changing jstack so that "jstack <pid>" can be used to get a stack trace from the target VM without any interference. The result is that the output of the utilitiy would be identical to the output for the SIGUIT/ctrl-break case. It would also be immediate and it works on all platforms.

      Note that the SA code wouldn't be removed - rather a "-f" option could be used to "force" a stack trace when the process is hung. Also "jstack <core>" and "jstack -m <pid>" wouldn't be changed.
      ###@###.### 2005-04-22 15:52:50 GMT

            alanb Alan Bateman
            alanb Alan Bateman
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: