-
Notifications
You must be signed in to change notification settings - Fork 333
Fix deadlock in dd-task-scheduler #10096
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
306201e
6bdc537
501bb1b
68f4a31
d9bb39f
3e11771
46a956d
5510b08
e5ac639
d44266e
076a11c
99ec036
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -27,6 +27,14 @@ public class SmapEntryFactory { | |
| private static final SmapEntryCache SMAP_ENTRY_CACHE = new SmapEntryCache(Duration.ofMillis(500)); | ||
|
|
||
| static { | ||
| // Load JFR Handlers class early, if present (it has been moved and renamed in JDK23+). | ||
| // This prevents a deadlock. See PROF-13025. | ||
| try { | ||
| Class.forName("jdk.jfr.events.Handlers"); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We are touching this class only when we have JFR available, so loading the
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This seems to be slighly more complex. The smap event is registered in datadog.trace.bootstrap.Agent and there we probably don't have easy access to PROFILING_SMAP_COLLECTION_ENABLED (not sure), and it might also affect other events. I filed PROF-13213 for a deeper investigation. I would merge this PR as-is. Is that ok?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. LGTM! |
||
| } catch (Exception e) { | ||
| // Ignore when the class is not found or anything else goes wrong. | ||
| } | ||
|
|
||
| if (!JavaVirtualMachine.isJ9() && !JavaVirtualMachine.isOracleJDK8()) { | ||
| SMAP_ENTRY_EVENT_TYPE = EventType.getEventType(SmapEntryEvent.class); | ||
| AGGREGATED_SMAP_ENTRY_EVENT_TYPE = EventType.getEventType(AggregatedSmapEntryEvent.class); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: Is there a JDK bug id as well to drop here ?