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

src: fix nullptr dereference for signal during startup #20637

Closed
wants to merge 1 commit into from

Conversation

addaleax
Copy link
Member

@addaleax addaleax commented May 9, 2018

This fixes a test failure when running
test/parallel/test-child-process-spawnsync-kill-signal.js
under load. What would happen is that SignalExit() tries
to shutdown the tracing agent, which might not have been set
up by the point that Node.js receives the signal.

Example failure: https://ci.nodejs.org/job/node-test-commit-linux-containered/4300/nodes=ubuntu1604_sharedlibs_zlib_x64/consoleFull

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

This fixes a test failure when running
`test/parallel/test-child-process-spawnsync-kill-signal.js`
under load. What would happen is that `SignalExit()` tries
to shutdown the tracing agent, which might not have been set
up by the point that Node.js receives the signal.
@nodejs-github-bot nodejs-github-bot added the c++ Issues and PRs that require attention from people who are familiar with C++. label May 9, 2018
@addaleax addaleax added the fast-track PRs that do not need to wait for 48 hours to land. label May 9, 2018
@addaleax
Copy link
Member Author

addaleax commented May 9, 2018

Please 👍 this comment to approve fast-tracking this PR.

@gireeshpunathil
Copy link
Member

ref: #11052 and #20414 as those are affected by the underlying issue too.

@addaleax - while your nullcheck will solve the current issues, @bnoordhuis has challenged calling signal unsafe functions from signal handlers through #14802 , fyi.

Copy link
Member

@bnoordhuis bnoordhuis left a comment

Choose a reason for hiding this comment

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

@gireeshpunathil This PR doesn't fix the signal safety issue but it also doesn't make it worse.

@addaleax
Copy link
Member Author

Landed in 5e6ca89

@addaleax addaleax closed this May 10, 2018
@addaleax addaleax deleted the tracing-early-crash branch May 10, 2018 12:05
addaleax added a commit that referenced this pull request May 10, 2018
This fixes a test failure when running
`test/parallel/test-child-process-spawnsync-kill-signal.js`
under load. What would happen is that `SignalExit()` tries
to shutdown the tracing agent, which might not have been set
up by the point that Node.js receives the signal.

PR-URL: #20637
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
targos pushed a commit that referenced this pull request May 12, 2018
This fixes a test failure when running
`test/parallel/test-child-process-spawnsync-kill-signal.js`
under load. What would happen is that `SignalExit()` tries
to shutdown the tracing agent, which might not have been set
up by the point that Node.js receives the signal.

PR-URL: #20637
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
@addaleax addaleax mentioned this pull request May 14, 2018
addaleax added a commit that referenced this pull request Jun 29, 2018
This fixes a test failure when running
`test/parallel/test-child-process-spawnsync-kill-signal.js`
under load. What would happen is that `SignalExit()` tries
to shutdown the tracing agent, which might not have been set
up by the point that Node.js receives the signal.

PR-URL: #20637
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
@MylesBorins MylesBorins mentioned this pull request Jul 9, 2018
rvagg pushed a commit that referenced this pull request Aug 16, 2018
This fixes a test failure when running
`test/parallel/test-child-process-spawnsync-kill-signal.js`
under load. What would happen is that `SignalExit()` tries
to shutdown the tracing agent, which might not have been set
up by the point that Node.js receives the signal.

PR-URL: #20637
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Sign up for free to 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++. fast-track PRs that do not need to wait for 48 hours to land.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants