On 12/17/2013 3:57 AM, Daniel Fuchs wrote:
Hi,

Please find below a fix for what I believe is a test bug.
I plan to push this in JDK 9 dev.

https://bugs.openjdk.java.net/browse/JDK-8030187

This seems to be a very intermittent failure.
It looks as if a logger held in a local variable can be
arbitrarily garbage collected if that variable is no longer
used.
To prevent arbitrary garbage collection of such loggers, the fix
makes sure to use the variable again at the end of the test.


Looks like running the test in -Xcomp and also with jtreg creates pressure to the young gen and more object allocation failure and so unreachable objects get collected in the middle of a small method body (like in this case).

You added code to reference the local variables referencing the loggers. Would it be simpler to have this test just to hold a strong reference to the logger?

Mandy



In the event that my analysis were wrong, I have also added
some debug traces that should help if this test fails again in
similar situations.

http://cr.openjdk.java.net/~dfuchs/webrev_8030187/webrev.00/

best regards,

-- daniel

Reply via email to