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
tools/test.py-j92--repeat920test/async-hooks/test-tlswrap.js===releasetest-tlswrap===Path: async-hooks/test-tlswrapassert.js:43thrownewerrors.AssertionError({^AssertionError[ERR_ASSERTION]: Checkinginvocationsatstage"client: when client destroyed":
Called"before"2time(s),butexpected3invocation(s).atcheckHook(/Users/trott/io.js/test/async-hooks/hook-checks.js:51:14)atArray.forEach(<anonymous>)
at checkInvocations (/Users/trott/io.js/test/async-hooks/hook-checks.js:28:44)
at tick1 (/Users/trott/io.js/test/async-hooks/test-tlswrap.js:93:5)
at Immediate.ontick (/Users/trott/io.js/test/async-hooks/tick.js:7:37)
at runCallback (timers.js:781:20)
at tryOnImmediate (timers.js:743:5)
at processImmediate [as _immediateCallback] (timers.js:714:5)
Command: out/Release/node /Users/trott/io.js/test/async-hooks/test-tlswrap.js
I managed to replicate this locally on macOS. Did it by running 96 simultaneous copies of the test. Definitely strengthens the case that this is a race condition...
$ tools/test.py -j 96 --repeat 192 async-hooks/test-tlswrap=== release test-tlswrap === Path: async-hooks/test-tlswrapassert.js:45 throw new errors.AssertionError({ ^AssertionError [ERR_ASSERTION]: Checking invocations at stage "client: when client destroyed": Called "before" 2 time(s), but expected 3 invocation(s). at checkHook (/Users/trott/io.js/test/async-hooks/hook-checks.js:51:14) at Array.forEach (<anonymous>) at checkInvocations (/Users/trott/io.js/test/async-hooks/hook-checks.js:28:44) at tick1 (/Users/trott/io.js/test/async-hooks/test-tlswrap.js:94:5) at Immediate.ontick [as _onImmediate] (/Users/trott/io.js/test/async-hooks/tick.js:7:37) at runCallback (timers.js:798:20) at tryOnImmediate (timers.js:760:5) at processImmediate [as _immediateCallback] (timers.js:731:5)Command: out/Release/node /Users/trott/io.js/test/async-hooks/test-tlswrap.js[00:19|% 100|+ 191|- 1]: Done
$
Hmmm....I see this test uses common.PORT but asynch-hooks tests are run in parallel, so that's a bug (because another test using port 0 could result in a port collision).
Activity
Trott commentedon Jul 20, 2017
Probably race condition. The comment around before line 93 (where the test fails) kind of suggests that too:
mcollina commentedon Jul 20, 2017
I've tested it on 8.2.0 as well, same error.
targos commentedon Sep 11, 2017
Windows is also affected: https://ci.nodejs.org/job/node-test-binary-windows/11046/RUN_SUBSET=2,VS_VERSION=vs2015-x86,label=win2008r2/console
BridgeAR commentedon Sep 24, 2017
FreeBSD is also affected https://ci.nodejs.org/job/node-test-commit-freebsd/11775/nodes=freebsd10-64/console
I guess it is system independent.
BridgeAR commentedon Sep 28, 2017
@nodejs/async_hooks it would be great if this could be looked at.
Having a green CI for the next Code & Learn would be really neat.
Trott commentedon Oct 2, 2017
I managed to replicate this locally on macOS. Did it by running 96 simultaneous copies of the test. Definitely strengthens the case that this is a race condition...
Trott commentedon Oct 2, 2017
Hmmm....I see this test uses
common.PORTbutasynch-hookstests are run in parallel, so that's a bug (because another test using port0could result in a port collision).Trott commentedon Oct 2, 2017
PR to fix the
common.PORTthing in #15742 but unsurprisingly that change doesn't fix this issue.test: remove `common.PORT` from test-tlswrap
test: fix flaky async-hooks/test-tlswrap
Trott commentedon Oct 2, 2017
Proposed fix for this issue: #15744
refack commentedon Oct 2, 2017
@Trott did you manage to repro on CI?
Trott commentedon Oct 3, 2017
@refack Yes. https://ci.nodejs.org/job/node-stress-single-test/1436/nodes=osx1010/console
test: remove `common.PORT` from test-tlswrap
test: fix flaky async-hooks/test-tlswrap
test: remove `common.PORT` from test-tlswrap
test: fix flaky async-hooks/test-tlswrap
test: remove `common.PORT` from test-tlswrap
test: fix flaky async-hooks/test-tlswrap
test: remove `common.PORT` from test-tlswrap
test: fix flaky async-hooks/test-tlswrap