Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1214835

Summary: [regression] HPROF: output truncated when using doe=n option
Product: Red Hat Enterprise Linux 6 Reporter: Ondřej Komárek <okomarek>
Component: java-1.7.0-openjdkAssignee: Andrew John Hughes <ahughes>
Status: CLOSED ERRATA QA Contact: Lukáš Zachar <lzachar>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.6CC: ahughes, dbhole, dkutalek, esammons, mbukatov, sbaiduzh, sgehwolf
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
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".
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-07-22 05:54:43 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
patch containing fix to the issue. none

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