From anton.hagerstrand at gmail.com Sun Sep 20 20:46:20 2020 From: anton.hagerstrand at gmail.com (=?UTF-8?Q?anton_h=C3=A4gerstrand?=) Date: Sun, 20 Sep 2020 22:46:20 +0200 Subject: Dynamic attach fails on tomcat (v9) Message-ID: Hi! First and foremost, thanks for jol. It's an awesome tool. I recently migrated an app to tomcat, jol seems to fail to do dynamic attach. The error message/warning I get is "Dynamic Attach failed. You may add this JAR as -javaagent manually, or supply -Djdk.attach.allowAttachSelf", even though I have supplied -Djdk.attach.allowAttachSelf. I tried replicating the behavior a bit by creating my own version of the InstrumentationSupport class in jol, just to do a simple print-out of the actual errors that makes jol throw the dynamic attached failed exception. These are the relevant parts of the stacktrace from my modified class, I added a set of debug prints to the top but except for that it is the same as the original. java.lang.IllegalAccessException: class org.openjdk.jol.vm.InstrumentationSupportTest cannot access a member of class org.openjdk.jol.vm.InstrumentationSupportTest$Installer with modifiers "public static volatile" at java.base/jdk.internal.reflect.Reflection.newIllegalAccessException(Reflection.java:361) at java.base/java.lang.reflect.AccessibleObject.checkAccess(AccessibleObject.java:591) at java.base/java.lang.reflect.Field.checkAccess(Field.java:1075) at java.base/java.lang.reflect.Field.get(Field.java:416) at org.openjdk.jol.vm.InstrumentationSupportTest.tryDynamicAttach(InstrumentationSupportTest.java:80) at org.openjdk.jol.vm.InstrumentationSupportTest.instance(InstrumentationSupportTest.java:43) at org.openjdk.jol.vm.InstrumentationSupportTest.tryInstance(InstrumentationSupportTest.java:31) It seems to me like the issue is might be that jol is using the system classloader to access the Installer subclass, since I package jol as a part of my war-file, which would be using a different classloader? If that is the case, which classloader should be used? I don't have any particular knowledge about dynamic attach, does it require the system classloader? I my explanation makes sense. I run tomcat version 9 and java 11, with jol 0.13. Thanks Anton From duke at openjdk.java.net Mon Sep 28 14:10:19 2020 From: duke at openjdk.java.net (duke) Date: Mon, 28 Sep 2020 14:10:19 GMT Subject: git: openjdk/jol: Add .jcheck/conf (#1) Message-ID: <76aa2dc5-f865-4b6d-bdfe-48587d121116@openjdk.java.net> Changeset: c4e2143e Author: Erik Duveblad Committer: GitHub Date: 2020-09-28 16:09:41 +0000 URL: https://git.openjdk.java.net/jol/commit/c4e2143e Add .jcheck/conf (#1) + .jcheck/conf From shade at openjdk.java.net Mon Sep 28 18:04:25 2020 From: shade at openjdk.java.net (Aleksey Shipilev) Date: Mon, 28 Sep 2020 18:04:25 GMT Subject: RFR: Update JMH to 1.25.2 Message-ID: Update JMH dependency to 1.25.2. ------------- Commit messages: - Update JMH to 1.25.2 Changes: https://git.openjdk.java.net/jol/pull/2/files Webrev: https://webrevs.openjdk.java.net/?repo=jol&pr=2&range=00 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jol/pull/2.diff Fetch: git fetch https://git.openjdk.java.net/jol pull/2/head:pull/2 PR: https://git.openjdk.java.net/jol/pull/2 From duke at openjdk.java.net Tue Sep 29 08:34:05 2020 From: duke at openjdk.java.net (duke) Date: Tue, 29 Sep 2020 08:34:05 GMT Subject: git: openjdk/jol: Update JMH to 1.25.2 Message-ID: <327f54b0-15da-43aa-b0a1-5a3c0b64a95d@openjdk.java.net> Changeset: a549b741 Author: Aleksey Shipilev Committer: GitHub Date: 2020-09-29 10:32:53 +0000 URL: https://git.openjdk.java.net/jol/commit/a549b741 Update JMH to 1.25.2 ! jol-benchmarks/pom.xml From shade at openjdk.java.net Tue Sep 29 08:56:35 2020 From: shade at openjdk.java.net (Aleksey Shipilev) Date: Tue, 29 Sep 2020 08:56:35 GMT Subject: Withdrawn: Update JMH to 1.25.2 In-Reply-To: References: Message-ID: <_FgaqlzBDRSLHFCLlYya1ZS_DJQic4EGREbIMin1Y-g=.e4299d68-bf92-4da4-964d-a5a4a5375e69@github.com> On Mon, 28 Sep 2020 17:44:53 GMT, Aleksey Shipilev wrote: > Update JMH dependency to 1.25.2. This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.java.net/jol/pull/2 From duke at openjdk.java.net Wed Sep 30 08:38:08 2020 From: duke at openjdk.java.net (duke) Date: Wed, 30 Sep 2020 08:38:08 GMT Subject: git: openjdk/jol: Update README Message-ID: Changeset: 8cb6434b Author: Aleksey Shipilev Date: 2020-09-30 10:36:47 +0000 URL: https://git.openjdk.java.net/jol/commit/8cb6434b Update README - README + README.md From duke at openjdk.java.net Wed Sep 30 08:39:31 2020 From: duke at openjdk.java.net (duke) Date: Wed, 30 Sep 2020 08:39:31 GMT Subject: git: openjdk/jol: More updates to README Message-ID: Changeset: 1452f995 Author: Aleksey Shipilev Date: 2020-09-30 10:37:56 +0000 URL: https://git.openjdk.java.net/jol/commit/1452f995 More updates to README ! README.md From duke at openjdk.java.net Wed Sep 30 08:43:27 2020 From: duke at openjdk.java.net (duke) Date: Wed, 30 Sep 2020 08:43:27 GMT Subject: git: openjdk/jol: Even more README updates Message-ID: <8f8dc458-b317-419d-a26e-339a09512eb4@openjdk.java.net> Changeset: e36ab2cb Author: Aleksey Shipilev Date: 2020-09-30 10:42:45 +0000 URL: https://git.openjdk.java.net/jol/commit/e36ab2cb Even more README updates ! README.md From shade at redhat.com Wed Sep 30 08:50:41 2020 From: shade at redhat.com (Aleksey Shipilev) Date: Wed, 30 Sep 2020 10:50:41 +0200 Subject: [ANN] JOL development had been moved to GitHub Message-ID: <83817f90-b300-fef3-6753-dec778d80b6f@redhat.com> Hi, This is the organizational announcement. Starting today, JOL development is done at GitHub: https://github.com/openjdk/jol I have updated README with current guidelines there. -- Thanks, -Aleksey From duke at openjdk.java.net Wed Sep 30 08:51:13 2020 From: duke at openjdk.java.net (duke) Date: Wed, 30 Sep 2020 08:51:13 GMT Subject: git: openjdk/jol: Even more README updates Message-ID: Changeset: 21f7d0da Author: Aleksey Shipilev Date: 2020-09-30 10:49:47 +0000 URL: https://git.openjdk.java.net/jol/commit/21f7d0da Even more README updates ! README.md