RFR: 8273608: Deadlock when jcmd of OnError attaches to itself [v4]
Xin Liu
xliu at openjdk.java.net
Wed Oct 6 02:02:07 UTC 2021
On Tue, 5 Oct 2021 18:42:05 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
> However, if we do this for normal crashes+OnError too, I'd like to see a test for that (you can simply reuse your test, add a second `@run` section and just start the VM with `-XX:ErrorHandlerTest=14 -XX:OnError=... -version`). Of course, that one would require `vm.debug`.
Actually, `-XX:+ErrorHandlerTest=14` is my first attempt. it turns out difficult to build a testcase which reliably reproduces this bug on all different platforms. I don't want to increase the burden of long-term operations.
In this case, ErrorHandleTest triggers `VMError::controlled_crash` early. I have seen that it's earlier than AttachListener. As a result, jcmd can't surely attach HotSpot.
For normal crashes+OnError scenario, I think `runtime/ErrorHandling/TestOnError.java` has covered it.
-------------
PR: https://git.openjdk.java.net/jdk/pull/5590
More information about the hotspot-dev
mailing list