Please review: 7146552 LoggingMXBeanTest intermittent failure

Jim Gish jim.gish at oracle.com
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.

Jim

----- Original Message -----
From: mandy.chung at oracle.com
To: jim.gish at oracle.com
Cc: core-libs-dev at openjdk.java.net
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 
> http://cr.openjdk.java.net/~jgish/Bug7146552-LoggingMXBeanTest-failure/ <http://cr.openjdk.java.net/%7Ejgish/Bug7146552-LoggingMXBeanTest-failure/> 
>
>
> 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 
fix?

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.

Thanks
Mandy
[1] 
http://mail.openjdk.java.net/pipermail/core-libs-dev/2011-November/008136.html
[2] 
http://mail.openjdk.java.net/pipermail/core-libs-dev/2011-November/008148.html



More information about the core-libs-dev mailing list