Please review: 7146552 LoggingMXBeanTest intermittent failure

Jim Gish jim.gish at
Sat Oct 13 03:54:05 UTC 2012

I was able to reproduce the failure rather easily although for some runs it took many thousands of iterations.  I reviewed all the logging tests in test/java/util/logging and it appears that only the two that I fixed have the problem.


----- Original Message -----
From: mandy.chung at
To: jim.gish at
Cc: core-libs-dev at
Sent: Friday, October 12, 2012 6:59:45 PM GMT -05:00 US/Canada Eastern
Subject: Re: Please review: 7146552 LoggingMXBeanTest intermittent failure

On 10/12/2012 9:55 AM, Jim Gish wrote:
> Please review 
> <> 
> The LoggingMXBeanTest has been intermittently failing because garbage 
> collection can cause the (weak) references to Logger instances to go 
> away.  LoggingMXBeanTest2 has the same issue, but no bug has (yet) 
> been filed against it.
> The fix is to simply make the Logger variables static so they don't 
> get gc'd.

Looks okay to me.   Like Alan said, you can use the same bug for both 
tests as it's the same issue.

I checked the nightly failure statistics and these 2 tests have been 
passing for some time.  Were you able to reproduce the intermittent 
failure (it may require to modify the test and force GC) and verify the 

I am not up to whether all logging tests have been audit if they may run 
into the same issue per the suggestion [2] ([1] was the thread reviewing 
a similar test bug fix).   It'd be good to look at all logging tests if 
you have the cycle.


More information about the core-libs-dev mailing list