[jdk21u-dev] RFR: 8310228: Improve error reporting for uncaught native exceptions on Windows

Rigner duke at openjdk.org
Thu May 2 16:27:56 UTC 2024


On Thu, 2 May 2024 12:51:35 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:

> If I modify the test code to throw an `EXCEPTION_ACCESS_VIOLATION` I still see an hs_err log being produced, just not containing the text "Internal Error". This matches what I remember from the debugging I did around the original fix as well.
> 
> The access violation in your log is expected, FWIW. It is always thrown at VM startup.

That makes sense since I was not able to debug that specific access violation.

I was able to pinpoint the cause of my crash, was because of some JNI `FindClass()` calls early in the startup, while some internal JDK classes were loaded (Calling `FindClass()` in agent `ClassFileLoadHook` hook to load a class as early as possible, works fine on JDK <= 17 but crashes on 18+ _(don't ask me why we're doing this, I know it's awful)_).

I'm not sure what signal / exception is actually being thrown but it's definitely triggering a stack overflow in the error reporting, so maybe one specific error isn't handled properly

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

PR Comment: https://git.openjdk.org/jdk21u-dev/pull/510#issuecomment-2090959476


More information about the jdk-updates-dev mailing list