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

NEWHPROF: Basher hprof_io.c is wrongfully terminated (Ctrl-\ problem)

XMLWordPrintable

    • b48
    • generic, sparc
    • solaris, solaris_8

      Consider the following test scenario.

      Terminal 1: User started a purely listening server which defaults to port 4900
      Terminal 2: user started any standard tiger Demo with hprof agent as follows
      /import/java/jdk1.5.0/solaris-sparc/bin/java -agentlib:hprof=net=localhost:4900,heap=dump,cpu=times,interval=20 -jar
      /import/java/jdk1.5.0/solaris-sparc/demo/jfc/Java2D/Java2Demo.jar -runs=1 -delay=5

      Hprof agent , while starting the application in Terminal 2, dumps the standard header in the Terminal 1 listening window. After the Java2D application starts, user sends a "Ctrl-\" signal in the Terminal 2 to generate hprof heap dump.

      While dumping the heap, HPROF terminates the process due to error in hprof_io.c

      Listening Server code atatched:

      HEAP dump at the time of termination is as follows

       java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:132)
              at sun.java2d.Disposer.run(Disposer.java:107)
              at java.lang.Thread.run(Thread.java:570)

      "Low Memory Detector" daemon prio=10 tid=0x001abd98 nid=0xa runnable [0x00000000..0x00000000]

      "CompilerThread0" daemon prio=10 tid=0x001aad90 nid=0x9 waiting on condition [0x00000000..0xfab7ffc0]

      "Signal Dispatcher" daemon prio=10 tid=0x001aa000 nid=0x8 waiting on condition [0x00000000..0x00000000]

      "HPROF listener thread" daemon prio=10 tid=0x0018aea0 nid=0x7 runnable [0x00000000..0x00000000]

      "Finalizer" daemon prio=10 tid=0x0016f720 nid=0x6 in Object.wait() [0xfb781000..0xfb781960]
              at java.lang.Object.wait(Native Method)
              - waiting on <0xf0b6f8f8> (a java.lang.ref.ReferenceQueue$Lock)
              at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116)
              - locked <0xf0b6f8f8> (a java.lang.ref.ReferenceQueue$Lock)
              at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:132)
              at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159)

      "Reference Handler" daemon prio=10 tid=0x00157998 nid=0x5 in Object.wait() [0xfde81000..0xfde819e0]
              at java.lang.Object.wait(Native Method)
              - waiting on <0xf0b6f668> (a java.lang.ref.Reference$Lock)
              at java.lang.Object.wait(Object.java:474)
              at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:117)
              - locked <0xf0b6f668> (a java.lang.ref.Reference$Lock)

      "VM Thread" prio=10 tid=0x0015c7d8 nid=0x4 runnable

      "VM Periodic Task Thread" prio=10 tid=0x001ad868 nid=0xb waiting on condition

      Dumping Java heap ...HPROF ERROR: ERROR [../../../src/share/tools/newhprof/hprof_io.c:2247]: CHECK_FOR_ERROR((trace_serial_num) >= gdata->trace_serial_number_start && (trace_serial_num) < gdata->trace_serial_number_counter) [../../../src/share/tools/newhprof/hprof_io.c:2247]
      HPROF TERMINATED PROCESS

            ohair Kelly Ohair (Inactive)
            mnandigasunw Murali Nandigama (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: