-
Notifications
You must be signed in to change notification settings - Fork 738
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
OpenJ9 Attach API Diagnostic extension #2543 #2621
Conversation
Thanks for opening this PR, @d0k1! Have you signed the Eclipse Contributor Agreement? As an Eclipse project, all contributors need to sign the ECA and have their commits pass the Can you confirm you've signed the ECA and update the commit message to include the correct Signed-off by: tag? Also, is there an existing issue that describes the approach taken to adding these extensions? If there is, can you link to it from this item? Any additional description of the design will help when reviewing the PR. Thanks again! |
3c3726c
to
99cb580
Compare
@pdbain-ibm Can you take a look at the highlevel approach taken here and comment on how well it integrates into the existing attach api code? |
Dan Will do. @d0k1 As you can appreciate, security is an issue with the JVM and particularly attachAPI. Would you kindly indicate what steps you have taken to avoid compromising security. Thank you. |
@pdbain-ibm What benefit does this bring? |
a) it keeps the OpenJ9VirtualMachine API congruent with the com.sun implementation, which has been a design goal from the start of the attach API project. |
API Extension to implement command line diagnostic utilities like jstack / jmap / etc eclipse-openj9#2543 Fixes eclipse-openj9#2543 Signed-off-by: Denis Kirpichenkov <denis.kirpichenkov@gmail.com>
@pdbain-ibm You asked about steps I took to avoid compromising security. Honestly, I did nothing. This PR is just a prototype of extended Attach API. |
Jenkins line endings check |
@d0k1 why close this pull request? Have you decided not to pursue this? |
@pshipton Unfortunately adaptation of OpenJ9 has been stopped in project I'm involved in. I had no time to continue working on this issue, so I decided to close this pull request to keep repository clean of this unfinished work |
@d0k1 if you are able to share any details of why you decided to stop using OpenJ9, can you please let me know, either here or by direct email. I'm wondering if there are any specific areas we should be focusing on to improve OpenJ9. |
Very sad to not have that included in OpenJ9 - we would need to use the same (e.g. using jmap in order to get a heapdump from a running JVM). |
@d0k1 Thanks for creating this pull request. If you have no objections, we'd like to reopen this PR with goal of getting it merged. If you're interested in helping with that, great! If not, we'll take on the work required to get this through reviews and into OpenJ9. |
This will also need test cases. |
@pdbain-ibm - does this require any user documentation please? If so, please add the doc:externals label and open an issue at the docs repo: https://github.com/eclipse/openj9-docs/issues/new?template=new-documentation-change.md |
Not sure we'll be merging this particular PR as-is, but I've added a depends:doc tag for tracking anyway. |
@DanHeidinga Thanks for interest in this PR. Of course you can use it freely, I have no objections at all. I'd say that it's great to continue working on this PR, but I don't know where to start at the moment. |
Thanks @d0k1. Re: @pdbain-ibm's concerns, they can be handled in review - validating that appropriate security concerns have been identified and mitigated. |
As this is being implemented by other PRs, closing this one. |
To implement command line diagnostic utilities like jstack / jmap / etc I decided to use Attact API just as jstack does. Attach API extension contains 8 new commands. Among them, there are commands to get javadump/systemdump/heapdump/snapdump and to get Information about memory, about loaded/unloaded classes about JIT compilation time. There is one command to get a thread dump through com.ibm.lang.management.internal.ExtendedThreadMXBeanImpl. The communication between JVM and Attach API client is going through IPC mechanism. Some commands have to send back some data to a client so they use java serialization to serialize a response and send it. Besides there are some new methods in com.ibm.tools.attach.attacher.OpenJ9VirtualMachine that uses the extension. #2543
Fixes #2543
Signed-off-by: Denis Kirpichenkov denis.kirpichenkov@gmail.com