United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: 7170449 Management is completely broken at least on Solaris 11 X86
7170449 : Management is completely broken at least on Solaris 11 X86

Details
Type:
Bug
Submit Date:
2012-05-21
Status:
Resolved
Updated Date:
2012-06-12
Project Name:
JDK
Resolved Date:
2012-06-12
Component:
infrastructure
OS:
solaris_11
Sub-Component:
build
CPU:
x86
Priority:
P2
Resolution:
Fixed
Affected Versions:
hs24,7u6
Fixed Versions:
8

Related Reports
Backport:
Duplicate:
Relates:
Relates:

Sub Tasks

Description
The issue was found during PIT for HS24 b11 into JDK8 b40.

Any app which uses HotSpotDiagnosticMXBean fail with 
"/export/local/common/jdk/baseline/solaris-i586/jre/lib/i386/libmanagement.so: 
ld.so.1: java: fatal: 
/export/local/common/jdk/baseline/solaris-i586/jre/lib/i386/libmanagement.so: 
unknown capability: -18446744069468207248"

Here is the link to one of such failures:
http://aurora-ds.ru.oracle.com:9500/runs/64047.JAVASE.PIT.VM-560/results/ResultDir/lp30yp0rp0mr30st300/lp30yp0rp0mr30st300.log

The short example (from Mikael G.) also fails with same exception.

public static void main(String... args) {
		HotSpotDiagnosticMXBean hsd = 
ManagementFactory.getPlatformMXBean(HotSpotDiagnosticMXBean.class);
		List<VMOption> l = hsd.getDiagnosticOptions();
		for (VMOption v : l) {
			System.out.println(v.getName() + " is " + v.getValue());
		}
	}


This fails on hsdev-mwm-2.us and works on intelsdv01.us (both solaris-x86)

hsdev-mwm-2 is Solaris 11, and intelsdv01 is Solaris 10.

This together with the error message of
"/export/local/common/jdk/baseline/solaris-i586/jre/lib/i386/libmanagement.so: 
ld.so.1: java: fatal: 
/export/local/common/jdk/baseline/solaris-i586/jre/lib/i386/libmanagement.so: 
unknown capability: -18446744069468207248"
leads me to think this is some sort of build issue on Solaris at least.

                                    

Comments
EVALUATION

http://hg.openjdk.java.net/jdk7u/jdk7u-dev/jdk/rev/6432464ffec2
                                     
2012-05-26
EVALUATION

http://hg.openjdk.java.net/jdk8/tl/jdk/rev/82134992123c
                                     
2012-05-25
EVALUATION

I ported the add_gnu_debuglink and fix_empty_sec_hdr_flags
work arounds from the hotspot repo to the jdk repo. Of course,
the Makefiles for the temporary tools and the Makefile logic
changes to use the temporary tools needed tweaking.

The fix_empty_sec_hdr_flags tool is used before
"$(OBJCOPY) --only-keep-debug" is called to create the
object's .debuginfo file. The fix_empty_sec_hdr_flags
work around prevents $(OBJCOPY) from blowing up on
empty section headers which has been only seen on
Solaris X64. However, fix_empty_sec_hdr_flags is called
on all Solaris platforms just because I've gotten paranoid
about $(OBJCOPY).

The add_gnu_debuglink tool is used instead of
"$(OBJCOPY) --add-gnu-debuglink=..." and it only adds
the .gnu_debuglink section and makes the minimal changes
necessary to add a new section (counter and offset updates).

I built a test JPRT job and ran the test program on
test machine hsdev-mwm-2.us. The test program worked.
I replaced libmanagement.so from my JPRT job with the
libmanagement.so from the latest JDK8 bits and the
test program failed. I restored the libmanagement.so
from the JPRT job and the test program worked again.

I think these experiments confirm that there is yet
another gobjcopy problem. Dean's theory is that the
SUNW_cap section is critical to libmanagement.so and
that got trashed by $(OBJCOPY) --add-gnu-debuglink=..."
                                     
2012-05-23
SUGGESTED FIX

See attached 7170449-webrev-cr0.tgz for the proposed fix.
                                     
2012-05-23



Hardware and Software, Engineered to Work Together