RFR: 8259008: ArithmeticException was thrown at "Monitor Cache Dump" on HSDB [v6]

David Holmes david.holmes at oracle.com
Wed Jan 27 06:37:45 UTC 2021


On 27/01/2021 3:44 pm, Yasumasa Suenaga wrote:
> On Wed, 27 Jan 2021 04:51:04 GMT, David Holmes <dholmes at openjdk.org> wrote:
> 
>> I thought the comments regarding the test were to use an if statement to check iter.hasNext() and return after seeing one Monitor, rather than keeping the while-loop and reporting every single Monitor found. The latter seems a waste of timer as we don't know how many Monitors to expect, so it adds no value to report them all.
> 
> I thought we should test whether we can get ObjectMonitor via SA at first - in other words, the test would pass when we get 1 ObjectMonitor at least.
> However all of information of ObjectMonitors might be useful for diagnostic purposes as @dcubed-ojdk said. In this test, we use LingeredAppWithLock for debugee, so it will not waste time to iterate. (we might estimate num of locks we will observe: we can see 3 ObjectMonitors now)

As long as the number is small that is okay, but I don't see how this 
aids any diagnosis as nothing is going to fail in relation to the number 
of monitors seen.

Thanks,
David

> -------------
> 
> PR: https://git.openjdk.java.net/jdk/pull/1910
> 


More information about the serviceability-dev mailing list