Hi Ivan,
Thank you for filing the shadow bug and fixing this issue!
I've targeted the bug to 14 (please, fix me if it is wrong).
The fix looks good to me.
Do you have any plans to backport it to the earlier releases?
Thanks,
Serguei
On 9/9/19 20:41, Ivan Gerasimov wrote:
Hello!
jdb utility has a command 'monitor <command>', which allows to execute
the specified command every time the debuggee stops.
If the <command> modifies the list of installed monitors (the simplest
example is 'monitor unmonitor 1'), then jdb hits a
ConcurrentModificationException, and hangs the debuggee.
While it is questionable, if modifying the monitor list has to be
implemented in some specific way, it seems sensible to at least
prevent a hard failure.
The simplest fix appears to be to use CopyOnWriteArrayList, so that an
immutable snapshot of the list will be traversed.
Even if the list is modified, it wouldn't affect any iterator that
might exist at that moment of time.
BUGURL: https://bugs.openjdk.java.net/browse/JDK-8230303
WEBREV: http://cr.openjdk.java.net/~igerasim/8230303/00/webrev/
Mach5 control build was successfully run with hs-tier7-rt, which
includes the new test and other jdb related tests.
Would you please help review?
Thanks in advance!