On Fri, 2 Apr 2021 08:27:05 GMT, Yasumasa Suenaga <ysuen...@openjdk.org> wrote:

> LinuxDebuggerLocal has worker thread (LinuxDebuggerLocalWorkerThread) to call 
> ptrace(2) because it have to call from same thread.
> 
> LinuxDebuggerLocalWorkerThread does not have queue, so it depends on 
> synchronized statement as following:
> 
> https://github.com/openjdk/jdk/blob/66d9961cbd83dbfca20b0af3c20693438d4aff3f/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/linux/LinuxDebuggerLocal.java#L156-L192
> 
> If `execute()` is called in same time, `task` would be broken.
> Fortunately all of caller of `execute()` are guarded with `synchronized` now. 
> But task worker should be more robustness.
> 
> I used `Executors::newSingleThreadExecutor`, so we don't need to take care 
> task queue.
> 
> I tested this change with serviceability/sa jtreg tests on Linux x64.

My first reaction to these changes is that they are fairly extensive, will take 
a lot of reviewing time, and don't seem to actually fix something that in real 
life is an issue. So I'm unsure of your motivation for all the work put into 
this issue.

-------------

PR: https://git.openjdk.java.net/jdk/pull/3321

Reply via email to