Hi Yasumasa,

On 9/08/2017 3:54 PM, Yasumasa Suenaga wrote:
Hi all,

I tried to check Monitor Cache Dump in HSDB, but it hangs and OOME occurred.

How to reproduce:

   1. Run JShell
   2. Attach HSDB to JShell
      $ jhsdb hsdb --pid <PID>
   3. Select "Monitor Cache Dump" in "Tools" menu.

ObjectSynchronizer$ObjectMonitorIterator switches monitor block list
when index == 0 at next(). However next() switches blockAddr only.
We should also switch "block".

I uloaded webrev for this issue. Could you review it?

   http://cr.openjdk.java.net/~ysuenaga/JDK-8186018/webrev.00/

The fix looks good. Can you please add a comment inserted at L112:

// advance to next block

Also update copyright year.

Not sure if we need to do anything explicit about calling next() when we've reached the end of the last block? Current code will throw NPE at L116, new code will either throw NPE at L116 or perhaps at L113 if ObjectMonitor constructor doesn't take null.

Thanks,
David

I cannot access JPRT. So I need a sponsor.


Thanks,

Yasumasa

Reply via email to