Skip to content

Conversation

@ldematte
Copy link
Contributor

Backport of #124404

…instrumentation (elastic#124404)

Using ASM CheckClassAdapter was key to diagnose the issue we had with incorrect signatures for some check methods.
In this PR I polished up the code I used to pinpoint the issue, and made it available via a system property so it can be turned on if we need it (and it's always on for Entitlements IT tests too).

It is also turned on in case we get VerifyErrors during retransformClasses early in the Entitlement agent bootstrap: retransformClasses runs in the native part of the JVM, so the VerifyError it produces is not so readable (e.g. it lacks a full stack trace and a description); in case this happens, we re-apply the transformation with verification turned on to get a meaningful error before dying.
@ldematte ldematte added backport v8.18.1 :Core/Infra/Entitlements Entitlements infrastructure auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) labels Mar 19, 2025
@ldematte ldematte merged commit e2ae238 into elastic:8.18 Mar 21, 2025
15 checks passed
@ldematte
Copy link
Contributor Author

auto-merge did not work, bypassing rules

@ldematte ldematte deleted the backport/8.18/entitlements/instrumentation-verify branch March 21, 2025 08:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport :Core/Infra/Entitlements Entitlements infrastructure v8.18.1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant