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 auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) v8.19.0 :Core/Infra/Entitlements Entitlements infrastructure labels Mar 19, 2025
@elasticsearchmachine elasticsearchmachine merged commit f495171 into elastic:8.x Mar 19, 2025
15 checks passed
@ldematte ldematte deleted the backport/8.x/entitlements/instrumentation-verify branch March 19, 2025 15:52
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.19.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants