RFR: 8335836: serviceability/jvmti/StartPhase/AllowedFunctions/AllowedFunctions.java fails with unexpected exit code: 112

Serguei Spitsyn sspitsyn at openjdk.org
Tue Jul 30 23:21:31 UTC 2024


On Tue, 30 Jul 2024 23:13:23 GMT, Serguei Spitsyn <sspitsyn at openjdk.org> wrote:

> The test has been fixed to:
>  - add a guard against JVMTI_ERROR_WRONG_PHASE
>  - replace `exit(err)` with `abort()` in the `check_jvmti_error()`
>  
> The JVMTI `VMDeath` event is enabled and a `RawMonitor` is introduced to prevent JVMTI_ERROR_WRONG_PHASE in the `ClassPrepare` events.
> 
> Testing:
>  - run the test AllowedFunctions.java locally
>  - TBD: submit a mach5 run for fixed test

Converting the native agent to C++ would simplify the test and allow to use utility functions from the `jvmti_common.hpp`.
But I wanted to make the WRONG_PHASE related fix to be clear for reviewers.
So, this conversion can be done as a separate step or as a part of a separate effort covered by an enhancement.

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

PR Comment: https://git.openjdk.org/jdk/pull/20397#issuecomment-2259356963


More information about the serviceability-dev mailing list