Skip to content

src: handle report options on fatalerror - #32497

Closed
sam-github wants to merge 1 commit into
nodejs:masterfrom
sam-github:fix-report-options
Closed

src: handle report options on fatalerror#32497
sam-github wants to merge 1 commit into
nodejs:masterfrom
sam-github:fix-report-options

Conversation

@sam-github

@sam-githubsam-github commented Mar 26, 2020

Copy link
Copy Markdown
Contributor

Follow on to #32207, 3 other options
are also not respected under situations that the isolate is not
available.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • testcases 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 26, 2020
@sam-github

Copy link
Copy Markdown
ContributorAuthor

Running C++ linter...
File "src/node_report.cc" does not use "PerIsolateOptions"

Which is kindof the point... I'll look into suppressing that.

And it seems the markdown linter has dozens of complaints about the collaborator and cpp style guides.

@gireeshpunathil

Copy link
Copy Markdown
Member

@sam-github - do you have a test case / story from users that reproduce the issue you are solving here?

@richardlau

Copy link
Copy Markdown
Member

Running C++ linter...
File "src/node_report.cc" does not use "PerIsolateOptions"

Which is kindof the point... I'll look into suppressing that.

Getting rid of the using statement should suffice:
https://github.com/nodejs/node/blob/cca1bae91ffc0cf9739cb4ea336eaa524f8bfba6/src/node_report.cc#L35

And it seems the markdown linter has dozens of complaints about the collaborator and cpp style guides.

Where are you seeing those?

@sam-github

Copy link
Copy Markdown
ContributorAuthor

@gireeshpunathil Its the same case as previous, the previous fix was to make it posible to check the value of --report-on-fatalerror. Now that is checked, and the value of report-on-fatalerror is respected. But actually triggering the report requires access to 3 other cli report values (filename, dirname, compact). Those aren't reachable under the same conditions that report-on-fatalerror did not used to be reachable.

I'll extend the tests to show this.

@sam-github

Copy link
Copy Markdown
ContributorAuthor

@gireeshpunathil I expanded the test suite, run with a version of node predating this and you can see what used to fail.

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@sam-github

Copy link
Copy Markdown
ContributorAuthor

@nodejs/diagnostics PTAL

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@sam-github

Copy link
Copy Markdown
ContributorAuthor

Recurring failure is unrelated: #32510

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@addaleaxaddaleax left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

As @cjihrig pointed out in #32535 (review), this is missing guards to protect against race conditions.

Follow on to nodejs#32207, 3 other options
are also not respected under situations that the isolate is not
available.
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@sam-github

Copy link
Copy Markdown
ContributorAuthor

@addaleax I have implemented the locking, PTAL

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>
@sam-github

Copy link
Copy Markdown
ContributorAuthor

@addaleax thank you.

Landed in 867ff41

@sam-github
sam-github deleted the fix-report-options branch March 31, 2020 19:00
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>
@targostargos mentioned this pull request Apr 13, 2020
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 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>
@targostargos mentioned this pull request May 2, 2020
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.

7 participants

@sam-github@gireeshpunathil@richardlau@nodejs-github-bot@addaleax@Flarna@targos