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
Somehow StopTracingAgent is called in SignalExit() however the tracking file is not properly flushed. I don't understand why, I think it might have some something to do with how SIGINT (by Ctrl+C) affects the process group.
The issue is not that easy to reproduce. However, I can do it consistently with the following steps:
run node test.js
in another terminal curl http://localhost:3000
hit Ctrl+C for on the node test.js process
test.js
consthttp=require('http')const{ spawn }=require('child_process')constscript=`const http = require('http')const server = http.createServer(function (req, res) { for (let i = 0; i < 100; i++) { process.nextTick(function () { res.write('a') }) } setImmediate(function () { res.end() })})server.listen(3000, 'localhost')`// run program, but inject the samplerconstproc=spawn(process.execPath,['-e',script],{stdio: 'inherit',env: Object.assign({},process.env,{NODE_OPTIONS: ['--trace-events-enabled','--trace-event-categories','node.async_hooks'].join(' ')})})process.on('SIGINT',()=>proc.kill('SIGINT'))
Somehow
StopTracingAgent
is called inSignalExit()
however the tracking file is not properly flushed. I don't understand why, I think it might have some something to do with howSIGINT
(by Ctrl+C) affects the process group.The issue is not that easy to reproduce. However, I can do it consistently with the following steps:
node test.js
curl http://localhost:3000
node test.js
processtest.js
/cc @ofrobots
The text was updated successfully, but these errors were encountered: