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

doc: guide - using valgrind to debug memory leaks #31501

Closed
wants to merge 73 commits into from

Conversation

mhdawson
Copy link
Member

Add doc for using valgrind to debug native
memory leaks.

Started writing this up as part of an effort
in the Diagnostic WG but think it's better
to have it in the core guides and then be referenced
by the docs in the Diagnostic WG repo.

For more details on the Diagnostic WG effort see
nodejs/diagnostics#254 (comment)
This guide is related to /step3 - using_native_tools.md

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • documentation is changed or added
  • commit message follows commit guidelines

Add doc for using valgrind to debug native
memory leaks.

Started writing this up as part of an effort
in the Diagnostic WG but think it's better
to have it in the core guides and then be referenced
by the docs in the Diagnostic WG repo.

For more details on the Diagnostic WG effort see
nodejs/diagnostics#254 (comment)
This guide is related to `/step3 - using_native_tools.md`
@nodejs-github-bot nodejs-github-bot added the doc Issues and PRs related to the documentations. label Jan 24, 2020
@mhdawson
Copy link
Member Author

@gireeshpunathil, @pmarton FYI

@mhdawson
Copy link
Member Author

@mscdex, @addaleax. @Trott, @cjihrig, @gireeshpunathil thanks for the review and all the suggestions. Updated to incorporate them.

A Node.js process may run out of memory due to excessive consumption of
native memory. Native Memory is memory which is not managed by the
V8 Garbage collector and is allocated either by the Node.js runtime, its
dependencies or native [addons](://nodejs.org/docs/latest/api/n-api.html).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this link right? It's missing the protocol

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching that

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@XhmikosR fixed

doc/guides/investigating_native_memory_leak.md Outdated Show resolved Hide resolved
doc/guides/investigating_native_memory_leak.md Outdated Show resolved Hide resolved
doc/guides/investigating_native_memory_leak.md Outdated Show resolved Hide resolved
doc/guides/investigating_native_memory_leak.md Outdated Show resolved Hide resolved
doc/guides/investigating_native_memory_leak.md Outdated Show resolved Hide resolved
mhdawson and others added 5 commits January 31, 2020 16:37
Co-Authored-By: Denys Otrishko <9109612+lundibundi@users.noreply.github.com>
Co-Authored-By: Denys Otrishko <9109612+lundibundi@users.noreply.github.com>
Co-Authored-By: Denys Otrishko <9109612+lundibundi@users.noreply.github.com>
Co-Authored-By: Denys Otrishko <9109612+lundibundi@users.noreply.github.com>
@mhdawson
Copy link
Member Author

@mscdex, @addaleax. @Trott, @cjihrig any change you could take another look and approve if it looks ok?

Co-Authored-By: Denys Otrishko <shishugi@gmail.com>
dependencies or native [addons](https://nodejs.org/docs/latest/api/n-api.html).

This guide provides information on how to use valgrind to investigate these
issues.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May be worthwhile stressing the point that this is Linux only

mhdawson added a commit that referenced this pull request Feb 14, 2020
Add doc for using valgrind to debug native
memory leaks.

Started writing this up as part of an effort
in the Diagnostic WG but think it's better
to have it in the core guides and then be referenced
by the docs in the Diagnostic WG repo.

For more details on the Diagnostic WG effort see
nodejs/diagnostics#254 (comment)
This guide is related to `/step3 - using_native_tools.md`

PR-URL: #31501
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@mhdawson
Copy link
Member Author

mhdawson commented Feb 14, 2020

Landed in 89c1aa3

@mhdawson mhdawson closed this Feb 14, 2020
codebytere pushed a commit that referenced this pull request Feb 27, 2020
Add doc for using valgrind to debug native
memory leaks.

Started writing this up as part of an effort
in the Diagnostic WG but think it's better
to have it in the core guides and then be referenced
by the docs in the Diagnostic WG repo.

For more details on the Diagnostic WG effort see
nodejs/diagnostics#254 (comment)
This guide is related to `/step3 - using_native_tools.md`

PR-URL: #31501
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@codebytere codebytere mentioned this pull request Feb 29, 2020
codebytere pushed a commit that referenced this pull request Mar 15, 2020
Add doc for using valgrind to debug native
memory leaks.

Started writing this up as part of an effort
in the Diagnostic WG but think it's better
to have it in the core guides and then be referenced
by the docs in the Diagnostic WG repo.

For more details on the Diagnostic WG effort see
nodejs/diagnostics#254 (comment)
This guide is related to `/step3 - using_native_tools.md`

PR-URL: #31501
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
codebytere pushed a commit that referenced this pull request Mar 17, 2020
Add doc for using valgrind to debug native
memory leaks.

Started writing this up as part of an effort
in the Diagnostic WG but think it's better
to have it in the core guides and then be referenced
by the docs in the Diagnostic WG repo.

For more details on the Diagnostic WG effort see
nodejs/diagnostics#254 (comment)
This guide is related to `/step3 - using_native_tools.md`

PR-URL: #31501
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@codebytere codebytere mentioned this pull request Mar 17, 2020
codebytere pushed a commit that referenced this pull request Mar 30, 2020
Add doc for using valgrind to debug native
memory leaks.

Started writing this up as part of an effort
in the Diagnostic WG but think it's better
to have it in the core guides and then be referenced
by the docs in the Diagnostic WG repo.

For more details on the Diagnostic WG effort see
nodejs/diagnostics#254 (comment)
This guide is related to `/step3 - using_native_tools.md`

PR-URL: #31501
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@mhdawson mhdawson deleted the valgrind branch September 14, 2020 21:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Issues and PRs related to the documentations.
Projects
None yet
Development

Successfully merging this pull request may close these issues.