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

JVM heap dump path documentation is incorrect #32873

Closed
bittusarkar opened this issue Aug 15, 2018 · 3 comments · Fixed by #32882
Closed

JVM heap dump path documentation is incorrect #32873

bittusarkar opened this issue Aug 15, 2018 · 3 comments · Fixed by #32882
Labels
:Delivery/Packaging RPM and deb packaging, tar and zip archives, shell and batch scripts >docs General docs changes Team:Delivery Meta label for Delivery team

Comments

@bittusarkar
Copy link

Elasticsearch version (bin/elasticsearch --version): Does not matter

Plugins installed: Does not matter

JVM version (java -version): 1.8

OS version (uname -a if on a Unix-like system): Windows 10

Description of the problem including expected versus actual behavior:
The documentation in https://www.elastic.co/guide/en/elasticsearch/reference/master/heap-dump-path.html says

If you specify a fixed filename instead of a directory, the JVM will repeatedly use the same file; this is one mechanism for preventing heap dumps from accumulating in the heap dump path.

This is not true. JVM fails to overwrite the heap file with following error (if say the JVM option -XX:HeapDumpPath=.\heapdump.hprof was used):

java.lang.OutOfMemoryError: Java heap space
Dumping heap to .\heapdump.hprof ...
Unable to create .\heapdump.hprof: File exists

As a result, only the first heap dump file will be created. No heap dump file will be created subsequently as the file would already exist. Can you please fix the documentation?

@jasontedor
Copy link
Member

The documentation is indeed incorrect. The relevant JDK source is when the heap dump writer is constructed, a flag is explicitly passed to not overwrite an existing file. Thanks for catching this @bittusarkar, we will get the documentation corrected!

@jasontedor jasontedor added :Delivery/Packaging RPM and deb packaging, tar and zip archives, shell and batch scripts :Docs labels Aug 15, 2018
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-docs

@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra

@jasontedor jasontedor added >docs General docs changes and removed :Docs labels Aug 15, 2018
@mark-vieira mark-vieira added the Team:Delivery Meta label for Delivery team label Nov 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Delivery/Packaging RPM and deb packaging, tar and zip archives, shell and batch scripts >docs General docs changes Team:Delivery Meta label for Delivery team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants