United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-7028172 SA needs to adapt to Solaris libproc change made in 6748307
JDK-7028172 : SA needs to adapt to Solaris libproc change made in 6748307

Details
Type:
Bug
Submit Date:
2011-03-16
Status:
Closed
Updated Date:
2011-07-29
Project Name:
JDK
Resolved Date:
2011-05-16
Component:
hotspot
OS:
solaris
Sub-Component:
svc
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
hs21
Fixed Versions:
hs21 (b12)

Related Reports
Backport:
Relates:
Relates:
Relates:

Sub Tasks

Description
The following bug is fixed in Solaris Nevada B159:

    6748307 3/3 pstack(1) prints the wrong signal number with a signal
                handler frame for a 64-bit SPARC process

This bug makes minor changes to the libproc API that SA uses.

Here is the ARC link for the original interface:

    http://sac.sfbay/PSARC/2004/029/contract-01

More details will be added as we flesh out the possible impacts
of this API tweak.

                                    

Comments
EVALUATION

The changes to the libproc Pstack_iter() API are pretty straight
forward. However, Java is a strange beast that is built on
different OS versions and expected to run on the build OS and
newer. So getting things to compile and run safely means jumping
through loops.

Here are the scenarios:

- built on Nevada-B159 and later:
  - code compiles using newer API with no hoops
    (for simplicity, I have newer API as a wrapper around
    the older API because Java doesn't use any of the new
    parameters)
  - runs on Nevada-B159 and later so calls the newer API
    with no hoops

- built on Nevada-B158 and earlier:
  - code compiles with newer API as a wrapper around the
    older API so both are available
  - checks the running OS and calls the newer API if
    running on Nevada-B159 or later. Calls the older API
    if running on Nevada-B158 or earlier

So we'll have Makefile changes to detect building on
Nevada-B159 and later which will cause

    -DSOLARIS_11_B159_OR_LATER

to be specified on the compile line.

We'll have a #ifdef SOLARIS_11_B159_OR_LATER check in
the libproc.h header file for the newer version of
proc_stack_f otherwise we'll define the older version
of proc_stack_f.

The client code that calls Pstack_iter() will have a
a #ifdef SOLARIS_11_B159_OR_LATER check that will call
Pstack_iter() with the newer version of proc_stack_f.
Otherwise, the client code will detect the running OS
and call Pstack_iter() with the newer version of proc_stack_f
when running on Nevada-B159 or later or it will call
Pstack_iter() with the older version of proc_stack_f
when running on Nevada-B158 or earlier.

The hoops we jump through for backward compatibility.
                                     
2011-04-30
SUGGESTED FIX

See attached 7028172-webrev-cr0.tgz for the proposed fix.
                                     
2011-05-02
EVALUATION

http://hg.openjdk.java.net/jdk7/hotspot-rt/hotspot/rev/405c634f4aaa
                                     
2011-05-02
EVALUATION

http://hg.openjdk.java.net/jdk7/hotspot/hotspot/rev/405c634f4aaa
                                     
2011-05-04



Hardware and Software, Engineered to Work Together