United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-6683213 : CounterMonitor's derived Gauge badly initialized

Details
Type:
Bug
Submit Date:
2008-04-02
Status:
Closed
Updated Date:
2012-03-22
Project Name:
JDK
Resolved Date:
2009-01-16
Component:
core-svc
OS:
generic
Sub-Component:
javax.management
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
6
Fixed Versions:
6u12 (b02)

Related Reports
Backport:
Backport:

Sub Tasks

Description
In the JMX 1.4 Specification, PDF document, paragraph 9.3, we read:
"The derived gauge value (V[t]) for the counter difference is calculated at time t
using the following algorithm, where GP is the granularity period:
    While t is less than StartDate+2GP, V[t] = (Integer)0"

The issue is that the derived Gauge value is null when is less than StartDate+2GP with JDK 6.
Because of that, a CounterNotification is potentially not emitted as it should.
This is a regression compared to JDK 5.
Attached output of a test run once over JDK 6 U5 b13 and once over JDK 5 U15 b08.
That test uses a threshold set to 2, a modulus set to 7, uses difference mode. We set the observed object to 0, 1, 2, 7. Granularity period is 500 ms and setAttribute calls are done every second.
The correct set of JCK tests hit by this defect is MonitorTest tests numbered 4, 5, 6, 13 and 20.
The tests numbered 1, 3, 32 and 33 do not use the difference mode then they've no chance to be hit by a wrong derived gauge computation.

                                    

Comments
EVALUATION

The spec is right and the implementation needs to be changed to follow the spec.
                                     
2008-05-21



Hardware and Software, Engineered to Work Together