Felix Marx
Felix Marx
Milestone should most likely be **1.14.15** as **1.12.14** is already released. I did reach out to the J9 developers and will keep you updated.
I had some discussion with the J9 developers and the handling is comparable to Hotspot based JVMs. On Java versions up to including 1.9, the attacher requires the same user...
Thanks, I will give this a try in our smoke-test environment https://github.com/raphw/byte-buddy/commit/f04d254b61e4f05fd647fbcbcb61de32fea1d652 https://github.com/raphw/byte-buddy/commit/01ed75b4b53bc43b54d8b7814c158cf310393c68
I noticed that you are not forwarding the `ignoreUser` as part of the `public static VirtualMachine attach(String processId, boolean ignoreUser)` method https://github.com/raphw/byte-buddy/commit/01ed75b4b53bc43b54d8b7814c158cf310393c68#diff-f796555defc948cb31030ac3933918deee757e89f8788700db985f035dcfa212R1674-R1678
At least for us the current version won't work as we typically just call `public static VirtualMachine attach(String processId)` via reflection, so the `ignoreUser` flag would still be `false`.
When testing this, there is a timeout ``` Attaching using net.bytebuddy.agent.VirtualMachine$ForOpenJ9 Attach using net.bytebuddy.agent.VirtualMachine$ForOpenJ9 trying to look into /proc/2235675/root/tmp/.com_ibm_tools_attach/2235675 java.net.SocketTimeoutException: Accept timed out at java.base/java.net.PlainSocketImpl.socketAccept(Native Method) at java.base/java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:474) at java.base/java.net.ServerSocket.implAccept(ServerSocket.java:565)...
Okay, on J9, the check for isFileOwnedByUid excludes userid 0 https://github.com/eclipse-openj9/openj9/blob/master/jcl/src/java.base/share/classes/openj9/internal/tools/attach/target/CommonDirectory.java#L424-L426 ``` /** * Check if the file is owned by the UID. Note that UID 0 "owns" all files....
I created #1631 to solve the problem. In our smoke test, the attachment from an agent running as root (and Hotspot) against a Semeru Java 11 running as user now...
@raphw would be great if you can do another release of byte-buddy and then we can close this issue :pleading_face:
We can close this issue. Our smoke tests pass with the 1.14.15 release. Thank you very much for the quick release.