Hi Daniil,

It looks good - great analysis.
Thank you for taking care about these failures!

I guess, the tests could fail not only with the Graal.
Hopefully, they became more stable now.

Thanks,
Serguei


On 6/22/18 19:13, Daniil Titov wrote:
Please review the changes that fix 15 tests failures when running with Graal.

The main problem here is that the tests assume that no garbage collection 
happens before the tests complete their checks. The other problem is that the 
tests could not strictly distinguish the objects created by the debuggee on the 
request from the test from the objects of the same class created by the 
debuggee VM on its own.  In case when java.lang.String or arrays of primitives 
are used in the tests the number of objects the test operates could 
significantly exceeds the number of the objects the test actually created and 
iterating over all of them results in the timeout.

The fix ensures that the object references created in the tests are protected 
from garbage collection or modifies the test to expect an 
ObjectCollectedException where necessary. In some cases, the fix ensures that 
only the main thread of the debuggee is running to prevent the garbage 
collector thread to create objects of the same class the test is working with 
and avoid timeouts.

Webrev: http://cr.openjdk.java.net/~dtitov/8203174/webrev.01
Bug: https://bugs.openjdk.java.net/browse/JDK-8203174

Thanks,
Daniil



Reply via email to