{"id":20474296,"url":"https://github.com/marschall/jfr-crasher","last_synced_at":"2026-06-06T19:31:53.950Z","repository":{"id":138921858,"uuid":"221749112","full_name":"marschall/jfr-crasher","owner":"marschall","description":"A reproducer for crashing JFR","archived":false,"fork":false,"pushed_at":"2019-12-20T10:49:40.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-07T23:02:53.198Z","etag":null,"topics":["bug","crash","java","java-flight-recorder"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/marschall.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-11-14T17:12:49.000Z","updated_at":"2019-12-20T10:49:42.000Z","dependencies_parsed_at":"2023-04-29T14:17:16.043Z","dependency_job_id":null,"html_url":"https://github.com/marschall/jfr-crasher","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/marschall/jfr-crasher","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marschall%2Fjfr-crasher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marschall%2Fjfr-crasher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marschall%2Fjfr-crasher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marschall%2Fjfr-crasher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marschall","download_url":"https://codeload.github.com/marschall/jfr-crasher/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marschall%2Fjfr-crasher/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33997732,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-06T02:00:07.033Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bug","crash","java","java-flight-recorder"],"created_at":"2024-11-15T14:28:57.434Z","updated_at":"2026-06-06T19:31:53.929Z","avatar_url":"https://github.com/marschall.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"JFR Crasher\n===========\n\nA reproducer for a crashing JFR bug.\n\nJFR has a crashing bug when multiple threads call `#defineClass` at the same time for the same class on the same classloader. This can happen with a [parallel capable](https://docs.oracle.com/javase/7/docs/technotes/guides/lang/cl-mt.html) such as [JBoss Modules](http://jboss-modules.github.io/jboss-modules/manual/).\n\nIf you are using a class loader similar to this one an using multiple threads you may be affected.\n\nThis bug is [JDK-8232997](https://bugs.openjdk.java.net/browse/JDK-8232997) and has been fixed in Java 14. Running with `-XX:-FlightRecorder` does not help.\n\n```java\npublic class CustomClassLoader extends ClassLoader {\n\n  static {\n    registerAsParallelCapable();\n  }\n\n  @Override\n  protected Class\u003c?\u003e loadClass(String className, boolean resolve) throws ClassNotFoundException {\n    Class\u003c?\u003e loadedClass = findLoadedClass(className);\n    if (loadedClass != null) {\n      if (resolve) {\n        resolveClass(loadedClass);\n      }\n      return loadedClass;\n    }\n\n    Class\u003c?\u003e clazz;\n    try {\n      clazz = defineClass(className, byteCode, 0, byteCode.length);\n    } catch (LinkageError e) {\n      // we lost the race, somebody else loaded the class\n      clazz = findLoadedClass(className);\n    }\n    if (resolve) {\n      resolveClass(clazz);\n    }\n    return clazz;\n  }\n\n}\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarschall%2Fjfr-crasher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarschall%2Fjfr-crasher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarschall%2Fjfr-crasher/lists"}