Repository navigation
Segmentation fault: 11 when debug Promise #4577
Description
Activity
"node - latest 4 and 5" Can you be more specific about the exact versions you tried? 5.4.0 was just released the other day. Did you also try with the latest master branch?
I just tried the latest master branch -- can confirm segfault.
Ah, sorry, the line
.exec('node --debug -e "setInterval(console.log, 10, new Promise(() => {}))"')ran my globalnodewhich is behind master. Does not segfault when I replace thatnodewith./node, so I think this duplicates #4261.I was able to duplicate it on OS X 10.10 with node v5.3.0, but not with v5.4.0.
Can you confirm @davidvgalbraith @3y3 ?
I'm seeing the same thing @mscdex
Ok, sorry, I miss release of 5.4. I can't confirm segfault on 5.4, but code doesn't work correctly:
I add console.log for response from app. I expect two messages:
connection infoType: connect V8-Version: 4.6.85.31 Protocol-Version: 1 Embedding-Host: node v5.4.0 Content-Length: 0and evaluation result, but I receive only connection info.
var app = require('child_process') .exec('node --debug -e "setInterval(console.log, 10, Promise.all())"') .on('exit', () => console.log(app, app.signalCode !== 'SIGSEGV', 'Segmentation fault')); app.stderr.on('data', () => setTimeout(() => require('net').connect('5858', function() { var data = JSON.stringify({ "seq": 1, "type": "request", "command": "evaluate", "arguments": { "global": true, "expression": "global" /* global is accessible in global scope */ } }); this.on('data', (data) => console.log('' + data)); this.write(`Content-Length: ${Buffer.byteLength(data, 'utf8')}\r\n\r\n${data}`); }), 300 /* small delay to initialize debugger in app */));
@davidvgalbraith, @mscdex, is there any changes in debugger protocol in 5.4?
Is it possible to backport segfault fix in v4?
I also see the difference in
debuggerstatement behavior (difference between 0.10 and latest versions)
In latest versionsdebuggerpauses program if it was started with--debugflag. In 0.10 this happens only in there exists connected debugger.
Is it expected behavior @indutny ?Ok, I'm ready to close this issue and open one other about stalled debugger #4577 (comment)
Or I can rename this issue.@3y3 I would probably open a new issue and close this one.
Ready #4597
Segfault happens when I try to use
evaluatecommand in non stopped process, which logs Promise to console.node - latest 4 and 5
os - darwin x64
app.js
pseudo debugger:
All works fine if process is paused or I don't try to log Promise:
Encapsulated test: