Bug 1214835 - [regression] HPROF: output truncated when using doe=n option
Summary: [regression] HPROF: output truncated when using doe=n option
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: java-1.7.0-openjdk
Version: 6.6
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Andrew John Hughes
QA Contact: Lukas Zachar
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-04-23 15:51 UTC by Ondřej Komárek
Modified: 2018-07-26 10:07 UTC (History)
7 users (show)

Fixed In Version: java-1.7.0-openjdk-1.7.0.79-2.5.5.4.el6
Doc Type: Bug Fix
Doc Text:
Due to a regression, the Java Heap/CPU Profiling Tool (HPROF) produced truncated output when used with the "doe=n" argument. Consequently, the output file contained only the header, the data was missing. A patch has been applied, and the output of HPROF is now correct when using "doe=n".
Clone Of:
Environment:
Last Closed: 2015-07-22 05:54:43 UTC


Attachments (Terms of Use)
patch containing fix to the issue. (551 bytes, patch)
2015-04-23 15:51 UTC, Ondřej Komárek
no flags Details | Diff


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2015:1245 normal SHIPPED_LIVE java-1.7.0-openjdk bug fix and enhancement update 2015-07-21 14:15:13 UTC

Description Ondřej Komárek 2015-04-23 15:51:37 UTC
Created attachment 1018052 [details]
patch containing fix to the issue.

Description of problem:
----------------------

Output of java profiling tool hprof is being truncated when used with argument "doe=n". This argument should define wheter output should be written over time or at end of java program.


Version-Release number of selected component (if applicable):
------------------------------------------------------------

This issue is probably present in all versions of Java starting from May 2007 when Sun released most of its Java source code as free software. 

I used jdk1.7.0_51 and jdk1.6.0_31

How reproducible:
----------------
100%


Steps to Reproduce:
------------------
There are more ways how to run hproftool, I will describe just one:

1. Set hprof argument "doe" to "n", eg.: export JAVA_TOOL_OPTIONS="-Xrunhprof:thread=y,force=n,doe=n,file=/home/my_user/my-hprof-output.txt"
2. Run some java job, eg.: java example
3. collect output, compare it to one runned with "doe=y"

Actual results:
--------------

Output file is truncated when using argument "doe=n". Output file contains just header, relevant data is missing. File is much smaller.


Expected results:
----------------

HPROF tool should produce same output regardless "doe" argument setting.


Additional info:
---------------

This issue has been reported and fixed in 2003, but fix was somehow lost. Please see original bug report: http://bugs.java.com/bugdatabase/view_bug.do?bug_id=4890063

Check for description of hprof: http://docs.oracle.com/javase/7/docs/technotes/samples/hprof.html

There is a patch for this issue in attachment.

affected file should be in: src/share/demo/jvmti/hprof/hprof_init.c

Comment 9 errata-xmlrpc 2015-07-22 05:54:43 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHEA-2015-1245.html


Note You need to log in before you can comment on or make changes to this bug.