You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
SIGILL when using abort-on-uncaught-exception #14060
'use strict';constassert=require('assert');const{ spawnSync }=require('child_process');constchild=spawnSync(process.execPath,['--abort-on-uncaught-exception','-e','throw new Error();']);assert.strictEqual(child.signal,'SIGABRT');// bug, the return signal is SIGILLassert.strictEqual(child.code,null);
When using --abort-on-uncaught-exception and an error throws, the process should exit with SIGABRT instead it exists with SIGILL (illegal instruction). When using process.abort() directly the process exits with SIGABRT as it should.
This is the abort message:
Uncaught Error
FROM
[eval]:1:1
ContextifyScript.Script.runInThisContext (vm.js:1:1)
Object.runInThisContext (vm.js:1:1)
Object.<anonymous> ([eval]-wrapper:1:1)
Module._compile (module.js:1:1)
evalScript (bootstrap_node.js:1:1)
startup (bootstrap_node.js:1:1)
bootstrap_node.js:1:1
Received signal 4 <unknown> 000100c40b92
==== C stack trace ===============================
[0x000100c3f9c4]
[0x7fffc7388bba]
[0x7fff5fbfd7e0]
[0x00010092034b]
[0x3c3dde7043fd]
[0x3c3dde807c7a]
[0x3c3dde7bbe7c]
[end of stack trace]
Has this been fixed by #13985? It might still be nice if you could find out the root cause of the SIGILL, because it points to a bug in V8, but if #13985 fixes it then Node won’t have to worry.
Activity
addaleax commentedon Jul 3, 2017
Has this been fixed by #13985? It might still be nice if you could find out the root cause of the SIGILL, because it points to a bug in V8, but if #13985 fixes it then Node won’t have to worry.
AndreasMadsen commentedon Jul 3, 2017
I tested on 8b2c61c, that is after #13985 is applied. I just tested the very latest (fe730d3), same issue.
addaleax commentedon Jul 3, 2017
Ah, right. This isn’t a new thing then, is it? It seems V8 has aborted like this since at least Node 0.12.
AndreasMadsen commentedon Jul 3, 2017
I think so. I checked 200 commits back and it happened before that.
AndreasMadsen commentedon Jul 3, 2017
/cc @nodejs/v8
targos commentedon Jul 3, 2017
what happens if you run it with
--no-hard-abort?AndreasMadsen commentedon Jul 3, 2017
@targos then it exits with
SIGABRT.targos commentedon Jul 3, 2017
This is setup here:
node/deps/v8/src/v8.cc
Line 75 in bec3877
We can use
Isolate::SetAbortOnUncaughtExceptionCallbackto change the behavior.The default is here:
node/deps/v8/src/isolate.cc
Lines 1114 to 1121 in 2db2857
bnoordhuis commentedon Aug 3, 2017
Does anyone care enough about this issue to make the necessary changes or should we just close it out?
bnoordhuis commentedon Aug 8, 2017
Since no one replied I'll go ahead and close out the issue, reopen if that's a mistake. :-)
(But note that to reopen is to volunteer.)
addaleax commentedon Aug 8, 2017
Sorry, this has actually been fixed in #13985, I think