Skip to content

Conversation

@eyalkoren
Copy link
Contributor

@eyalkoren eyalkoren commented Dec 22, 2021

What does this PR do?

Tries to invoke as much as possible instrumentation-related code paths, including the instrumentation logic and the invokedynamic runtime linkage path, on the agent-attaching thread before registering theClassFileTransformer to the JVM-global java.lang.instrument.Instrumentation.
This ensures that most Byte Buddy and agent types related to these processes are loaded and initialized on a single thread, thus reducing the chances for deadlock.
We will start with having warmup on by default, but with a hidden config flag that enables disabling it.

Checklist

  • This is an enhancement of existing features, or a new feature in existing plugins
    • I have updated CHANGELOG.asciidoc
    • I have added tests that prove my fix is effective or that my feature works

@ghost
Copy link

ghost commented Dec 22, 2021

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2022-01-18T16:26:33.512+0000

  • Duration: 46 min 40 sec

  • Commit: ec7dfa3

Test stats 🧪

Test Results
Failed 0
Passed 2444
Skipped 16
Total 2460

💚 Flaky test report

Tests succeeded.

🤖 GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

  • run benchmark tests : Run the benchmark test.

  • run compatibility tests : Run the JDK Compatibility test.

  • run integration tests : Run the APM-ITs.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@eyalkoren eyalkoren requested a review from felixbarny January 17, 2022 09:27
@eyalkoren
Copy link
Contributor Author

eyalkoren commented Jan 17, 2022

I upgraded to Byte Buddy 1.12.7 so to utilize its new API that allows us to load and invoke the instrumented bytecode created during warmup

@AlexanderWert AlexanderWert added this to the 8.1 milestone Jan 17, 2022
@eyalkoren eyalkoren enabled auto-merge (squash) January 18, 2022 16:27
@eyalkoren eyalkoren merged commit e4f3eae into elastic:master Jan 18, 2022
@eyalkoren eyalkoren deleted the deadlock-system-properties branch January 19, 2022 03:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants