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

-XX:+HeapDumpOnCtrlBreak function added in 1.5.0_14 does not work

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P2 P2
    • None
    • 5.0u14
    • core-svc
    • sparc
    • solaris_9

      FULL JDK VERSION(S):
      java version "1.5.0_14"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_14-b03)
      Java HotSpot(TM) Server VM (build 1.5.0_14-b03, mixed mode)

      DESCRIPTION:
      The HeapDumpOnCtrlBreak option was added to Java 1.5.0_14 under CR 6454676. However, the implementation does not work, apparently due to the dump's filename being badly formed by the heapdumping code. The problem does not exist in 1.4.2_16.

      To reproduce, start the VM with the -XX:+HeapDumpOnCtrlBreak option on Solaris, and try to obtain a heapdump by sending the process a SIGQUIT (kill -3). You will see output like this:

          ...
          "VM Thread" prio=10 tid=0x000fa9c8 nid=0x4 runnable

          "VM Periodic Task Thread" prio=10 tid=0x0010c340 nid=0xa runnable

      --> Dumping heap to java_pid8549.hprof.m30.10/05/07M49 ...
      --> Unable to create java_pid8549.hprof.m30.10/05/07M49: No such file or directory
          ...

      The problem seems to be caused by this line in the SIGQUIT handling code (os.cpp, line 109):

          ...
          time_t current_time = time(0);
          today = localtime(&current_time);
      --> time_length = strftime(time_string, buffer_size, "m%d.10/05/07M%S", today);
          ...

      The equivalent code in 1.4.2_16 is much simpler and does not exhibit this problem.

            Unassigned Unassigned
            elarsen Erik Larsen (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: