Skip to content
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

the "java_pidXX" problem #813

Closed
godtroop-github opened this issue Sep 12, 2023 · 2 comments
Closed

the "java_pidXX" problem #813

godtroop-github opened this issue Sep 12, 2023 · 2 comments
Labels

Comments

@godtroop-github
Copy link

hey, I' m using async-profiler when [/tmp/.java_pidXX] file is missing, that doesn't work obviously. And I found that message from stack overflow:

"/tmp/.java_pid socket is used by HotSpot [Dynamic Attach](http://openjdk.java.net/groups/hotspot/docs/Serviceability.html#battach) mechanism. It is the way how jstack and other utilities communicate with JVM.

You cannot change the path - it is hardcoded in JVM source code. Neither you can force JVM to regenerate it, because the Attach Listener is initialized only once in HotSpot lifetime."1

https://stackoverflow.com/questions/32198820/why-jstack-not-working-when-the-tmp-java-pidnum-socket-file-has-been-deleted

So I'm thinking is there any possible way(may be a tricky/geek way) that we can recover or regenerate this file to use attach tools again. As we know, to keep the problematic jvm alive, usually It's very helpful to shoot the real trouble in time.

Thanks for any reply : )

@apangin
Copy link
Collaborator

apangin commented Sep 12, 2023

As a result of the fix for JDK-8225690, JVM now automatically re-creates .java_pid attach socket if has been deleted.

Please update your JDK version. The fix is available starting from JDK 14 / JDK 11.0.13 / JDK 8u332

@godtroop-github
Copy link
Author

Nice,that would be great!Thanks.

@apangin apangin closed this as completed Sep 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants