Skip to content

report: handle on-fatalerror better - #32207

Closed
HarshithaKP wants to merge 4 commits into
nodejs:masterfrom
HarshithaKP:diagnostic_report_fatal_error
Closed

report: handle on-fatalerror better#32207
HarshithaKP wants to merge 4 commits into
nodejs:masterfrom
HarshithaKP:diagnostic_report_fatal_error

Conversation

@HarshithaKP

Copy link
Copy Markdown
Member

--report-on-fatalerror was not honored properly, as there was no
way to check the value which was stored in the Environment pointer
which can be inaccessible under certain fatal error situations.

Move the flag out of Environment pointer so that this is doable.

Co-authored-by: Shobhit Chittora schittora@paypal.com

Fixes: #31576
Refs: #29881

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

@nodejs-github-botnodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs related to general changes in the lib or src directory. labels Mar 11, 2020
@HarshithaKPHarshithaKP changed the title report: handle on-fatalerror betterreport: handle on-fatalerror better[WIP]Mar 11, 2020
Comment threadsrc/node_report_module.cc Outdated
@HarshithaKP
HarshithaKPforce-pushed the diagnostic_report_fatal_error branch from ae976b0 to a0df730CompareMarch 12, 2020 08:39
Comment threadsrc/node_options.cc Outdated

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

This is one extra change I am doing than #29881, to fix the issue mentioned in #29881 (comment)

@HarshithaKPHarshithaKP changed the title report: handle on-fatalerror better[WIP]report: handle on-fatalerror betterMar 12, 2020
Comment threadsrc/node_options.cc Outdated
@gireeshpunathil

Copy link
Copy Markdown
Member

This PR complements #32242 (though there will be many conflicts to resolve) , to make it stable with the last known bug being addressed. Request reviews, so that it can land along side before v14 d-cut!

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Comment threadsrc/node_options.cc Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think we should omit this, as #32242 makes it unnecessary, as previously noted.

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

@cjihrig, removed this block. PTAL.

Comment threadsrc/node_options.cc Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Again, #32242 will make the #ifdef NODE_REPORT unnecessary.

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

Removed #ifdef NODE_REPORT.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

--experimental-report can be dropped due to #32242.

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

Removed --experimental-report from args list.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can you add a comment here. Something along the lines of // Verify that reports are not created on fatal error by default.

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

Added suggested comment in test case. PTAL.

@HarshithaKP
HarshithaKPforce-pushed the diagnostic_report_fatal_error branch 2 times, most recently from cc0c963 to 8d71449CompareMarch 16, 2020 06:28
@HarshithaKP

Copy link
Copy Markdown
MemberAuthor

In test/report/test-report-fatal-error.js, linter error saying common is assigned but not used, I couldn't find proper place to use it in test case.

@cjihrig

Copy link
Copy Markdown
Contributor

In test/report/test-report-fatal-error.js, linter error saying common is assigned but not used, I couldn't find proper place to use it in test case.

Instead of const common = require('../common');, you can just do require('../common'); since you aren't using it. You have to require() it though because it has some side effects, and our linting setup checks for its presence.

@HarshithaKP

Copy link
Copy Markdown
MemberAuthor

@cjihrig, thanks. Fixed the error with your suggestion.

@sam-githubsam-github left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks great to me.

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@sam-github

sam-github commented Mar 23, 2020

Copy link
Copy Markdown
Contributor

@HarshithaKP This looks pretty much ready to land, but it needs a trivial rebase before a final CI. Ping me when you've done it and I'll kick that off.

EDIT: Alternatively, give me permissions and I'll do it: https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/allowing-changes-to-a-pull-request-branch-created-from-a-fork#enabling-repository-maintainer-permissions-on-existing-pull-requests

--report-on-fatalerror was not honored properly, as there was no
way to check the value which was stored in the Environment pointer
which can be inaccessible under certain fatal error situations.
Move the flag out of Environment pointer so that this is doable.
Co-authored-by: Shobhit Chittora schittora@paypal.com
Fixes: nodejs#31576
Refs: nodejs#29881
@HarshithaKP
HarshithaKPforce-pushed the diagnostic_report_fatal_error branch from 5e9fdd9 to 7dbc5deCompareMarch 24, 2020 06:45
@HarshithaKP

Copy link
Copy Markdown
MemberAuthor

@sam-github, thanks. Rebased it. PTAL.

addaleax added a commit to addaleax/node that referenced this pull request Mar 28, 2020
sam-github added a commit to sam-github/node that referenced this pull request Mar 30, 2020
Follow on to nodejs#32207, 3 other options
are also not respected under situations that the isolate is not
available.
sam-github added a commit that referenced this pull request Mar 31, 2020
Follow on to #32207, 3 other options
are also not respected under situations that the isolate is not
available.
PR-URL: #32497
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
MylesBorins pushed a commit that referenced this pull request Mar 31, 2020
Follow on to #32207, 3 other options
are also not respected under situations that the isolate is not
available.
PR-URL: #32497
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
addaleax added a commit that referenced this pull request Apr 2, 2020
Overlooked in 2fa74e3.
Refs: #32207
PR-URL: #32535
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
BethGriggs pushed a commit that referenced this pull request Apr 7, 2020
Overlooked in 2fa74e3.
Refs: #32207
PR-URL: #32535
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
targos pushed a commit that referenced this pull request Apr 12, 2020
Overlooked in 2fa74e3.
Refs: #32207
PR-URL: #32535
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
targos pushed a commit to targos/node that referenced this pull request Apr 25, 2020
--report-on-fatalerror was not honored properly, as there was no
way to check the value which was stored in the Environment pointer
which can be inaccessible under certain fatal error situations.
Move the flag out of Environment pointer so that this is doable.
Co-authored-by: Shobhit Chittora schittora@paypal.com
PR-URL: nodejs#32207Fixes: nodejs#31576
Refs: nodejs#29881
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
targos pushed a commit to targos/node that referenced this pull request Apr 25, 2020
Follow on to nodejs#32207, 3 other options
are also not respected under situations that the isolate is not
available.
PR-URL: nodejs#32497
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
targos pushed a commit to targos/node that referenced this pull request Apr 25, 2020
Overlooked in 2fa74e3.
Refs: nodejs#32207
PR-URL: nodejs#32535
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
targos pushed a commit that referenced this pull request Apr 28, 2020
--report-on-fatalerror was not honored properly, as there was no
way to check the value which was stored in the Environment pointer
which can be inaccessible under certain fatal error situations.
Move the flag out of Environment pointer so that this is doable.
Co-authored-by: Shobhit Chittora schittora@paypal.com
PR-URL: #32207Fixes: #31576
Refs: #29881
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
targos pushed a commit that referenced this pull request Apr 28, 2020
Follow on to #32207, 3 other options
are also not respected under situations that the isolate is not
available.
PR-URL: #32497
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
targos pushed a commit that referenced this pull request Apr 28, 2020
Overlooked in 2fa74e3.
Refs: #32207
PR-URL: #32535
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
@targostargos mentioned this pull request May 2, 2020
gireeshpunathil added a commit to gireeshpunathil/node that referenced this pull request Oct 19, 2020
The property `process.report.reportOnFatalError`
was deemed experimental, as it was not honored
under certain scenarios (for example out of memory
conditions). The report configuration were previously
stored on the `environment` structure which was not
available on these types of fatal error cases.
The referenced PR has addressed this case (sometime
back), and the property is working as intended.
Refs: nodejs#32207
PR-URL: nodejs#35654
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Beth Griggs <bgriggs@redhat.com>
BethGriggs pushed a commit that referenced this pull request Dec 8, 2020
The property `process.report.reportOnFatalError`
was deemed experimental, as it was not honored
under certain scenarios (for example out of memory
conditions). The report configuration were previously
stored on the `environment` structure which was not
available on these types of fatal error cases.
The referenced PR has addressed this case (sometime
back), and the property is working as intended.
Refs: #32207
PR-URL: #35654
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Beth Griggs <bgriggs@redhat.com>
targos pushed a commit that referenced this pull request Mar 3, 2021
The property `process.report.reportOnFatalError`
was deemed experimental, as it was not honored
under certain scenarios (for example out of memory
conditions). The report configuration were previously
stored on the `environment` structure which was not
available on these types of fatal error cases.
The referenced PR has addressed this case (sometime
back), and the property is working as intended.
Refs: #32207
PR-URL: #35654
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Beth Griggs <bgriggs@redhat.com>
MylesBorins pushed a commit that referenced this pull request Apr 6, 2021
The property `process.report.reportOnFatalError`
was deemed experimental, as it was not honored
under certain scenarios (for example out of memory
conditions). The report configuration were previously
stored on the `environment` structure which was not
available on these types of fatal error cases.
The referenced PR has addressed this case (sometime
back), and the property is working as intended.
Refs: #32207
PR-URL: #35654
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Beth Griggs <bgriggs@redhat.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c++Issues and PRs that require attention from people who are familiar with C++.lib / srcIssues and PRs related to general changes in the lib or src directory.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Diagnostic report on fatal error does not respect settings

7 participants

@HarshithaKP@gireeshpunathil@nodejs-github-bot@cjihrig@sam-github@addaleax@targos