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
Thanks, that is a huge help. If the issue is easily reproducible, could you add the following code such it runs before anything else? That should output a stack trace that I would like to see.
For @nodejs/async_hooks: This is fascinating, it appears that the triggerAsyncId is undefined when calling the internal process.nextTick. I don't know why that would happen.
@AndreasMadsen this is the stacktrace you are looking for:
async_hooks.js:326
throw new RangeError('triggerAsyncId must be an unsigned integer');
^
RangeError: triggerAsyncId must be an unsigned integer
at emitInitScript (async_hooks.js:326:11)
at internalNextTick (internal/process/next_tick.js:305:7)
at Response._writeRaw (_http_outgoing.js:280:9)
at Response._send (_http_outgoing.js:256:15)
at Response.end (_http_outgoing.js:780:16)
at Response.end (/Users/matteo/Repositories/fastify/node_modules/shot/lib/response.js:64:15)
at Immediate.wrapReplyEnd [as _onImmediate] (/Users/matteo/Repositories/fastify/lib/reply.js:146:13)
at runCallback (timers.js:785:20)
at tryOnImmediate (timers.js:743:5)
at processImmediate [as _immediateCallback] (timers.js:714:5)
@mcollina there are so many different causes for this error, it is rarely the same issue. Could you open a new issue and also show the backtrace for the coredump.
@crespowang I would still like to see the stack trace.
For @nodejs/async_hooks: I'm suspecting the 0fd4c73 fix is showing some issues that were previously hidden.
Hey @AndreasMadsen, did you want me to add the code in the test? If yes, then this is the output
init { asyncId: 1271, type: 'Immediate', triggerAsyncId: 0 }
Error: bad async id
at AsyncHook.init (/Users/crespowang/Projects/project-x/server/routes/account-verification.test.js:15:13)
at emitInitNative (async_hooks.js:420:43)
at emitInitScript (async_hooks.js:328:3)
at new Immediate (timers.js:808:5)
at createImmediate (timers.js:848:19)
at setImmediate (timers.js:835:10)
at Async._schedule (/Users/crespowang/Projects/project-x/server/node_modules/objection/node_modules/bluebird/js/release/schedule.js:12:53)
at Async._queueTick (/Users/crespowang/Projects/project-x/server/node_modules/objection/node_modules/bluebird/js/release/async.js:152:14)
at AsyncInvoke [as invoke] (/Users/crespowang/Projects/project-x/server/node_modules/objection/node_modules/bluebird/js/release/async.js:83:10)
at Promise._then (/Users/crespowang/Projects/project-x/server/node_modules/objection/node_modules/bluebird/js/release/promise.js:261:15)
at Promise.then (/Users/crespowang/Projects/project-x/server/node_modules/objection/node_modules/bluebird/js/release/promise.js:125:17)
at eval (eval at createHookCaller (/Users/crespowang/Projects/project-x/server/node_modules/objection/lib/queryBuilder/QueryBuilder.js:1163:18), <anonymous>:5:22)
at /Users/crespowang/Projects/project-x/server/node_modules/objection/lib/queryBuilder/QueryBuilder.js:1175:17
at QueryBuilder.execute (/Users/crespowang/Projects/project-x/server/node_modules/objection/lib/queryBuilder/QueryBuilder.js:563:15)
at QueryBuilder.then (/Users/crespowang/Projects/project-x/server/node_modules/objection/lib/queryBuilder/QueryBuilder.js:398:24)
@crespowang Thanks. Looks like this revealed another (less significant issue). Given the number of issues regarding _write and _writeRaw I think we are just going to assume that it is the same issue. If that doesn't fix it, then we can look into this again.
@crespowang if you happen to have a testcase that consistently fails (independent of any npm modules), or alternatively, know of a public npm module whose tests fail, please post here, so we can add it to our regression tests.
thanks for fixing this so quickly, v8.2.1 fixed the problem, as a node newbie can I ask how long does it take for a new version to appear in docker hub?
Activity
AndreasMadsen commentedon Jul 20, 2017
Fascinating, we rolled out a lot of fixes for this issue in 8.2.0. Did you get a core dump that you can share with us?
If you don't like to share it, could you run the following and show us the output:
I hope I got that correct, see https://github.com/nodejs/llnode for more info. Also, it assumes that you have xCode installed.
AndreasMadsen commentedon Jul 20, 2017
/cc @nodejs/async_hooks
crespowang commentedon Jul 20, 2017
I have two files under /cores
and
AndreasMadsen commentedon Jul 20, 2017
Thanks, that is a huge help. If the issue is easily reproducible, could you add the following code such it runs before anything else? That should output a stack trace that I would like to see.
For @nodejs/async_hooks: This is fascinating, it appears that the
triggerAsyncIdis undefined when calling the internalprocess.nextTick. I don't know why that would happen.mcollina commentedon Jul 20, 2017
Confirmed, same here:
The error comes from https://www.npmjs.com/package/shot, just running
npm testcan help reproduce that. That library uses some internals.mcollina commentedon Jul 20, 2017
@AndreasMadsen this is the stacktrace you are looking for:
AndreasMadsen commentedon Jul 20, 2017
@mcollina there are so many different causes for this error, it is rarely the same issue. Could you open a new issue and also show the backtrace for the coredump.
@crespowang I would still like to see the stack trace.
For @nodejs/async_hooks: I'm suspecting the 0fd4c73 fix is showing some issues that were previously hidden.
akanass commentedon Jul 20, 2017
@AndreasMadsen same problem for me
Node installed with
Homebrewtoday.crespowang commentedon Jul 20, 2017
Hey @AndreasMadsen, did you want me to add the code in the test? If yes, then this is the output
http: set async_id_symbol to any socket set
process: triggerAsyncId can be undefined
AndreasMadsen commentedon Jul 20, 2017
@crespowang Thanks. Looks like this revealed another (less significant issue). Given the number of issues regarding
_writeand_writeRawI think we are just going to assume that it is the same issue. If that doesn't fix it, then we can look into this again.refack commentedon Jul 20, 2017
@crespowang if you happen to have a testcase that consistently fails (independent of any
npmmodules), or alternatively, know of a publicnpmmodule whose tests fail, please post here, so we can add it to our regression tests.process: triggerAsyncId can be undefined
crespowang commentedon Jul 21, 2017
thanks for fixing this so quickly, v8.2.1 fixed the problem, as a node newbie can I ask how long does it take for a new version to appear in docker hub?
mcollina commentedon Jul 21, 2017
See nodejs/docker-node#470
process: triggerAsyncId can be undefined
process: triggerAsyncId can be undefined