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

Thread dump issues

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P3 P3
    • tbd
    • None
    • core-svc
    • None

      jcmd Thread.dump_to_file requires a file to be specified. Some users may want the output generated to stdout, possible by specifying the file as "-" but it limits the output to about 16k so will appear truncated when there are huge number of threads. Should this be re-visited to default to stdout if a file is not specified? Could an OutputStream could be created that is backed by the pipe connection to the tool so that the output doesn't need to be buffered off-heap?

      jcmd Thread.dump_to_file triggers the Attach Listener thread in the target VM to generate the thread dump. The Attach Listener is a daemon thread so does not prevent the VM from exiting. Should this command prevent the VM from exiting? The issue dates back to JDK 6 but may not have been noticed because other Java commands executed by the Attach Listener are short lived.

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

              Created:
              Updated: