Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34.3k
src: print backtrace on fatal error#6734
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: print backtrace on fatal error #6734
Uh oh!
There was an error while loading. Please reload this page.
Conversation
bnoordhuis commented May 13, 2016 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
src/backtrace.cc Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#include "src/base/logging.h" works too, at least locally for me. Any particular reason for including the source file itself?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And CI is failing on smartos with ld: fatal: symbol 'v8::base::DumpBacktrace()' is multiply-defined: https://ci.nodejs.org/job/node-test-commit-smartos/2478/nodes=smartos14-32/console
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I included the .cc so it works with shared V8 builds (think Fedora, Debian, Ubuntu, etc.,or linking against a .so.)
I'll ifdef out smartos. That user base is a rounding error compared to the aforementioned distros.
bnoordhuis commented May 13, 2016
addaleax commented May 13, 2016
LGTM if CI is green |
Fishrock123 commented May 13, 2016
Oh my gosh, +1000 |
Fishrock123 commented May 13, 2016
Looks like plinux doesn't like it. |
cjihrig commented May 13, 2016
LGTM, but yea, was just about to say what @Fishrock123 did. |
MylesBorins commented May 13, 2016
/cc @mhdawson re plinux error |
887c8cb to 9c63535Comparebnoordhuis commented May 13, 2016
Different approach that should work on all platforms: https://ci.nodejs.org/job/node-test-pull-request/2637/ |
Fishrock123 commented May 13, 2016
@bnoordhuis Looks like that failed on |
bnoordhuis commented May 13, 2016
God, smartos is like a time machine back to the '90s. Okay, loosened the const-ness. CI: https://ci.nodejs.org/job/node-test-pull-request/2638/ |
Fishrock123 commented May 13, 2016
@bnoordhuis smartos still 🚒 |
bnoordhuis commented May 13, 2016
Looks like something went wrong. Again: https://ci.nodejs.org/job/node-test-pull-request/2639/ |
bnoordhuis commented May 13, 2016
Finally, green except for flaky |
cjihrig commented May 16, 2016
Works on my machine. This might be a silly question, but does the CI actually exercise this at all? |
bnoordhuis commented May 16, 2016
Not intentionally, I don't think. I thought about adding a test but it would be rather anti-social when core dumps are enabled. |
cjihrig commented May 16, 2016
@bnoordhuis I added a minimal test in cjihrig@3ce55fa. The |
4ab11e0 to f15eb7bComparebnoordhuis commented May 19, 2016
@cjihrig Thanks, added to the PR. Anyone wants to take one more quick look? |
addaleax commented May 19, 2016
I guess the test should be skipped on Windows? Other than that still LGTM. |
test/abort/test-abort-backtrace.js Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Eh, the RE should probably start with ^\s* and end with $, otherwise the optional parts here are pointless
f15eb7b to e52e6d2Comparebnoordhuis commented May 23, 2016
Updated the test, PTAL. CI: https://ci.nodejs.org/job/node-test-pull-request/2741/ |
addaleax commented May 23, 2016
LGTM if CI is green |
cjihrig commented May 23, 2016
LGTM. Seems to be an issue with the CI though. |
cjihrig commented May 31, 2016
`python tools/test.py abort` won't work without one. PR-URL: #6734 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
The --abort-on-uncaught-exception can terminate the process with either a SIGABRT or a SIGILL signal but the test only expected SIGABRT. PR-URL: #6734 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
There is no real need and it causes endless grief on Windows with some of the upcoming changes. PR-URL: #6734 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
Print a C backtrace on fatal errors to make it easier to debug issues like #6727. PR-URL: #6734 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
Print a C backtrace on fatal errors to make it easier to debug issues. PR-URL: #6734 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
This commit adds a test that validates backtraces which are printed on fatal errors. PR-URL: #6734 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
Don't inline calls to node::DumpBacktrace() and fflush(), it makes the generated code bigger. A secondary benefit of moving it to a function is that it gives you something to put a breakpoint on. PR-URL: #6734 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
Print a C backtrace on fatal errors to make it easier to debug issues. PR-URL: #6734 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
MylesBorins commented Jul 11, 2016
@bnoordhuis should this be backported? |
bnoordhuis commented Jul 11, 2016
Ideally, yes. |
MylesBorins commented Jul 14, 2016
due to the AIX + compiler failures I'm going to hold off on this change for the v4.5.0 release @bnoordhuis would you be willing to backport this PR along with #7508, #7544, and any other potential commits that need to land with this? |
MylesBorins commented Aug 30, 2016
ping @bnoordhuis sorry about the other message. Would you be willing to backport a working version of this as mentioned above |
There is no real need and it causes endless grief on Windows with some of the upcoming changes. PR-URL: nodejs#6734 Backport-PR-URL: nodejs#16550 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
There is no real need and it causes endless grief on Windows with some of the upcoming changes. PR-URL: #6734 Backport-PR-URL: #16550 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
There is no real need and it causes endless grief on Windows with some of the upcoming changes. PR-URL: #6734 Backport-PR-URL: #16550 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
There is no real need and it causes endless grief on Windows with some of the upcoming changes. PR-URL: #6734 Backport-PR-URL: #16550 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
There is no real need and it causes endless grief on Windows with some of the upcoming changes. PR-URL: #6734 Backport-PR-URL: #16550 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
There is no real need and it causes endless grief on Windows with some of the upcoming changes. PR-URL: #6734 Backport-PR-URL: #16550 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
Print a C backtrace on fatal errors to make it easier to debug issues
like #6727.
CI: https://ci.nodejs.org/job/node-test-pull-request/2629/