Withdrawn: 8264639: SA: Worker thread for ptrace on Linux should be more robustness

Yasumasa Suenaga ysuenaga at openjdk.java.net
Mon Apr 5 00:00:47 UTC 2021


On Fri, 2 Apr 2021 08:27:05 GMT, Yasumasa Suenaga <ysuenaga at 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.

This pull request has been closed without being integrated.

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

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


More information about the serviceability-dev mailing list