-
Notifications
You must be signed in to change notification settings - Fork 29.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Investigate flaky async-hooks/test-statwatcher #21425
Comments
@nodejs/async_hooks @thlorenz |
Again on the same platform: 16:00:10 not ok 12 async-hooks/test-statwatcher
16:00:10 ---
16:00:10 duration_ms: 0.452
16:00:10 severity: fail
16:00:10 exitcode: 1
16:00:10 stack: |-
16:00:10 assert.js:80
16:00:10 throw new AssertionError(obj);
16:00:10 ^
16:00:10
16:00:10 AssertionError [ERR_ASSERTION]: Checking invocations at stage "watcher1: when unwatched second file":
16:00:10 Called "before" 2 time(s), but expected 1 invocation(s).
16:00:10 at checkHook (c:\workspace\node-test-binary-windows\test\async-hooks\hook-checks.js:51:14)
16:00:10 at Array.forEach (<anonymous>)
16:00:10 at checkInvocations (c:\workspace\node-test-binary-windows\test\async-hooks\hook-checks.js:28:62)
16:00:10 at Immediate.setImmediate (c:\workspace\node-test-binary-windows\test\async-hooks\test-statwatcher.js:65:9)
16:00:10 at runCallback (timers.js:664:18)
16:00:10 at tryOnImmediate (timers.js:635:5)
16:00:10 at processImmediate (timers.js:617:5)
16:00:10 ... @nodejs/testing |
So it seems like this happens only on the |
win2016 yet again... 00:41:05 not ok 12 async-hooks/test-statwatcher
00:41:05 ---
00:41:05 duration_ms: 0.468
00:41:05 severity: fail
00:41:05 exitcode: 1
00:41:05 stack: |-
00:41:05 assert.js:84
00:41:05 throw new AssertionError(obj);
00:41:05 ^
00:41:05
00:41:05 AssertionError [ERR_ASSERTION]: Checking invocations at stage "watcher1: when unwatched second file":
00:41:05 Called "before" 2 time(s), but expected 1 invocation(s).
00:41:05 at checkHook (c:\workspace\node-test-binary-windows\test\async-hooks\hook-checks.js:51:14)
00:41:05 at Array.forEach (<anonymous>)
00:41:05 at checkInvocations (c:\workspace\node-test-binary-windows\test\async-hooks\hook-checks.js:28:62)
00:41:05 at Immediate.setImmediate (c:\workspace\node-test-binary-windows\test\async-hooks\test-statwatcher.js:65:9)
00:41:05 at runCallback (timers.js:661:18)
00:41:05 at tryOnImmediate (timers.js:632:5)
00:41:05 at processImmediate (timers.js:614:5)
00:41:05 ... @nodejs/platform-windows |
03:44:05 not ok 12 async-hooks/test-statwatcher
03:44:05 ---
03:44:05 duration_ms: 0.473
03:44:05 severity: fail
03:44:05 exitcode: 1
03:44:05 stack: |-
03:44:05 assert.js:84
03:44:05 throw new AssertionError(obj);
03:44:05 ^
03:44:05
03:44:05 AssertionError [ERR_ASSERTION]: Checking invocations at stage "watcher1: when unwatched second file":
03:44:05 Called "before" 2 time(s), but expected 1 invocation(s).
03:44:05 at checkHook (c:\workspace\node-test-binary-windows\test\async-hooks\hook-checks.js:51:14)
03:44:05 at Array.forEach (<anonymous>)
03:44:05 at checkInvocations (c:\workspace\node-test-binary-windows\test\async-hooks\hook-checks.js:28:62)
03:44:05 at Immediate.setImmediate (c:\workspace\node-test-binary-windows\test\async-hooks\test-statwatcher.js:65:9)
03:44:05 at runCallback (timers.js:661:18)
03:44:05 at tryOnImmediate (timers.js:632:5)
03:44:05 at processImmediate (timers.js:614:5)
03:44:05 ... |
@nodejs/testing |
Looks like it's not windows-only. Refs: nodejs/reliability#12
|
Any ideas of how/where to even start with figuring out what's going on here? 03:43:07 not ok 12 async-hooks/test-statwatcher # TODO : Fix flaky test
03:43:07 ---
03:43:07 duration_ms: 0.464
03:43:07 severity: flaky
03:43:07 exitcode: 1
03:43:07 stack: |-
03:43:07 assert.js:84
03:43:07 throw new AssertionError(obj);
03:43:07 ^
03:43:07
03:43:07 AssertionError [ERR_ASSERTION]: Checking invocations at stage "watcher1: when unwatched second file":
03:43:07 Called "before" 2 time(s), but expected 1 invocation(s).
03:43:07 at checkHook (c:\workspace\node-test-binary-windows\test\async-hooks\hook-checks.js:51:14)
03:43:07 at Array.forEach (<anonymous>)
03:43:07 at checkInvocations (c:\workspace\node-test-binary-windows\test\async-hooks\hook-checks.js:28:62)
03:43:07 at Immediate.setImmediate (c:\workspace\node-test-binary-windows\test\async-hooks\test-statwatcher.js:65:9)
03:43:07 at runCallback (timers.js:661:18)
03:43:07 at tryOnImmediate (timers.js:632:5)
03:43:07 at processImmediate (timers.js:614:5)
03:43:07 ... |
The |
Failure on 00:57:13 not ok 12 async-hooks/test-statwatcher # TODO : Fix flaky test
00:57:13 ---
00:57:13 duration_ms: 0.479
00:57:13 severity: flaky
00:57:13 exitcode: 1
00:57:13 stack: |-
00:57:13 assert.js:84
00:57:13 throw new AssertionError(obj);
00:57:13 ^
00:57:13
00:57:13 AssertionError [ERR_ASSERTION]: Checking invocations at stage "watcher1: when unwatched second file":
00:57:13 Called "before" 2 time(s), but expected 1 invocation(s).
00:57:13 at checkHook (c:\workspace\node-test-binary-windows\test\async-hooks\hook-checks.js:51:14)
00:57:13 at Array.forEach (<anonymous>)
00:57:13 at checkInvocations (c:\workspace\node-test-binary-windows\test\async-hooks\hook-checks.js:28:62)
00:57:13 at Immediate.setImmediate (c:\workspace\node-test-binary-windows\test\async-hooks\test-statwatcher.js:65:9)
00:57:13 at runCallback (timers.js:661:18)
00:57:13 at tryOnImmediate (timers.js:632:5)
00:57:13 at processImmediate (timers.js:614:5)
00:57:13 ... |
|
Host: test-azure_msft-win2016-x64-3 00:54:52 not ok 12 async-hooks/test-statwatcher # TODO : Fix flaky test
00:54:52 ---
00:54:52 duration_ms: 0.468
00:54:52 severity: flaky
00:54:52 exitcode: 1
00:54:52 stack: |-
00:54:52 assert.js:86
00:54:52 throw new AssertionError(obj);
00:54:52 ^
00:54:52
00:54:52 AssertionError [ERR_ASSERTION]: Checking invocations at stage "watcher1: when unwatched second file":
00:54:52 Called "before" 2 time(s), but expected 1 invocation(s).
00:54:52 at checkHook (c:\workspace\node-test-binary-windows\test\async-hooks\hook-checks.js:51:14)
00:54:52 at Array.forEach (<anonymous>)
00:54:52 at checkInvocations (c:\workspace\node-test-binary-windows\test\async-hooks\hook-checks.js:28:62)
00:54:52 at Immediate.setImmediate (c:\workspace\node-test-binary-windows\test\async-hooks\test-statwatcher.js:65:9)
00:54:52 at processImmediate (timers.js:632:19)
00:54:52 ... |
https://ci.nodejs.org/job/node-test-binary-windows/21022/COMPILED_BY=vs2017,RUNNER=win2016,RUN_SUBSET=0/console on test-azure_msft-win2016-x64-3 00:56:47 not ok 12 async-hooks/test-statwatcher # TODO : Fix flaky test
00:56:47 ---
00:56:47 duration_ms: 0.524
00:56:47 severity: flaky
00:56:47 exitcode: 1
00:56:47 stack: |-
00:56:47 assert.js:86
00:56:47 throw new AssertionError(obj);
00:56:47 ^
00:56:47
00:56:47 AssertionError [ERR_ASSERTION]: Checking invocations at stage "watcher1: when unwatched second file":
00:56:47 Called "before" 2 time(s), but expected 1 invocation(s).
00:56:47 at checkHook (c:\workspace\node-test-binary-windows\test\async-hooks\hook-checks.js:51:14)
00:56:47 at Array.forEach (<anonymous>)
00:56:47 at checkInvocations (c:\workspace\node-test-binary-windows\test\async-hooks\hook-checks.js:28:62)
00:56:47 at Immediate.setImmediate (c:\workspace\node-test-binary-windows\test\async-hooks\test-statwatcher.js:65:9)
00:56:47 at processImmediate (timers.js:632:19)
00:56:47 ... Kind of hoping the timer queue regression fix will fix this but that seems...unlikely... |
https://ci.nodejs.org/job/node-test-binary-windows/21050/COMPILED_BY=vs2017,RUNNER=win2016,RUN_SUBSET=1/console on test-azure_msft-win2016-x64-2 23:53:58 not ok 12 async-hooks/test-statwatcher # TODO : Fix flaky test
23:53:58 ---
23:53:58 duration_ms: 0.463
23:53:58 severity: flaky
23:53:58 exitcode: 1
23:53:58 stack: |-
23:53:58 assert.js:86
23:53:58 throw new AssertionError(obj);
23:53:58 ^
23:53:58
23:53:58 AssertionError [ERR_ASSERTION]: Checking invocations at stage "watcher1: when unwatched second file":
23:53:58 Called "before" 2 time(s), but expected 1 invocation(s).
23:53:58 at checkHook (c:\workspace\node-test-binary-windows\test\async-hooks\hook-checks.js:51:14)
23:53:58 at Array.forEach (<anonymous>)
23:53:58 at checkInvocations (c:\workspace\node-test-binary-windows\test\async-hooks\hook-checks.js:28:62)
23:53:58 at Immediate.setImmediate (c:\workspace\node-test-binary-windows\test\async-hooks\test-statwatcher.js:65:9)
23:53:58 at processImmediate (timers.js:632:19)
23:53:58 ... |
test-azure_msft-win2016-x64-4 00:52:43 not ok 12 async-hooks/test-statwatcher # TODO : Fix flaky test
00:52:43 ---
00:52:43 duration_ms: 0.478
00:52:43 severity: flaky
00:52:43 exitcode: 1
00:52:43 stack: |-
00:52:43 assert.js:86
00:52:43 throw new AssertionError(obj);
00:52:43 ^
00:52:43
00:52:43 AssertionError [ERR_ASSERTION]: Checking invocations at stage "watcher1: when unwatched second file":
00:52:43 Called "before" 2 time(s), but expected 1 invocation(s).
00:52:43 at checkHook (c:\workspace\node-test-binary-windows\test\async-hooks\hook-checks.js:51:14)
00:52:43 at Array.forEach (<anonymous>)
00:52:43 at checkInvocations (c:\workspace\node-test-binary-windows\test\async-hooks\hook-checks.js:28:62)
00:52:43 at Immediate.setImmediate (c:\workspace\node-test-binary-windows\test\async-hooks\test-statwatcher.js:65:9)
00:52:43 at processImmediate (timers.js:632:19)
00:52:43 ... |
It's still flaky. I've seen it fail twice on CI in the last week. |
test-joyent-ubuntu1604_sharedlibs_container-x64-2 20:59:17 not ok 2463 async-hooks/test-statwatcher
20:59:17 ---
20:59:17 duration_ms: 0.463
20:59:17 severity: fail
20:59:17 exitcode: 1
20:59:17 stack: |-
20:59:17 Watcher: w1
20:59:17 current stat data: Stats {
20:59:17 dev: 64784,
20:59:17 mode: 33188,
20:59:17 nlink: 1,
20:59:17 uid: 1001,
20:59:17 gid: 1001,
20:59:17 rdev: 0,
20:59:17 blksize: 4096,
20:59:17 ino: 6826981,
20:59:17 size: 0,
20:59:17 blocks: 8,
20:59:17 atimeMs: 1567915157406.2651,
20:59:17 mtimeMs: 1567915157406.2651,
20:59:17 ctimeMs: 1567915157406.2651,
20:59:17 birthtimeMs: 1567915157406.2651,
20:59:17 atime: 2019-09-08T03:59:17.406Z,
20:59:17 mtime: 2019-09-08T03:59:17.406Z,
20:59:17 ctime: 2019-09-08T03:59:17.406Z,
20:59:17 birthtime: 2019-09-08T03:59:17.406Z
20:59:17 }
20:59:17 previous stat data: Stats {
20:59:17 dev: 64784,
20:59:17 mode: 33188,
20:59:17 nlink: 1,
20:59:17 uid: 1001,
20:59:17 gid: 1001,
20:59:17 rdev: 0,
20:59:17 blksize: 4096,
20:59:17 ino: 6826981,
20:59:17 size: 3,
20:59:17 blocks: 8,
20:59:17 atimeMs: 1567915157406.2651,
20:59:17 mtimeMs: 1567915157406.2651,
20:59:17 ctimeMs: 1567915157406.2651,
20:59:17 birthtimeMs: 1567915157406.2651,
20:59:17 atime: 2019-09-08T03:59:17.406Z,
20:59:17 mtime: 2019-09-08T03:59:17.406Z,
20:59:17 ctime: 2019-09-08T03:59:17.406Z,
20:59:17 birthtime: 2019-09-08T03:59:17.406Z
20:59:17 }
20:59:17 w1 change Stats {
20:59:17 dev: 64784,
20:59:17 mode: 33188,
20:59:17 nlink: 1,
20:59:17 uid: 1001,
20:59:17 gid: 1001,
20:59:17 rdev: 0,
20:59:17 blksize: 4096,
20:59:17 ino: 6826981,
20:59:17 size: 0,
20:59:17 blocks: 8,
20:59:17 atimeMs: 1567915157406.2651,
20:59:17 mtimeMs: 1567915157406.2651,
20:59:17 ctimeMs: 1567915157406.2651,
20:59:17 birthtimeMs: 1567915157406.2651,
20:59:17 atime: 2019-09-08T03:59:17.406Z,
20:59:17 mtime: 2019-09-08T03:59:17.406Z,
20:59:17 ctime: 2019-09-08T03:59:17.406Z,
20:59:17 birthtime: 2019-09-08T03:59:17.406Z
20:59:17 } Stats {
20:59:17 dev: 64784,
20:59:17 mode: 33188,
20:59:17 nlink: 1,
20:59:17 uid: 1001,
20:59:17 gid: 1001,
20:59:17 rdev: 0,
20:59:17 blksize: 4096,
20:59:17 ino: 6826981,
20:59:17 size: 3,
20:59:17 blocks: 8,
20:59:17 atimeMs: 1567915157406.2651,
20:59:17 mtimeMs: 1567915157406.2651,
20:59:17 ctimeMs: 1567915157406.2651,
20:59:17 birthtimeMs: 1567915157406.2651,
20:59:17 atime: 2019-09-08T03:59:17.406Z,
20:59:17 mtime: 2019-09-08T03:59:17.406Z,
20:59:17 ctime: 2019-09-08T03:59:17.406Z,
20:59:17 birthtime: 2019-09-08T03:59:17.406Z
20:59:17 }
20:59:17 Watcher: w1
20:59:17 current stat data: Stats {
20:59:17 dev: 64784,
20:59:17 mode: 33188,
20:59:17 nlink: 1,
20:59:17 uid: 1001,
20:59:17 gid: 1001,
20:59:17 rdev: 0,
20:59:17 blksize: 4096,
20:59:17 ino: 6826981,
20:59:17 size: 5,
20:59:17 blocks: 8,
20:59:17 atimeMs: 1567915157406.2651,
20:59:17 mtimeMs: 1567915157514.2625,
20:59:17 ctimeMs: 1567915157514.2625,
20:59:17 birthtimeMs: 1567915157514.2625,
20:59:17 atime: 2019-09-08T03:59:17.406Z,
20:59:17 mtime: 2019-09-08T03:59:17.514Z,
20:59:17 ctime: 2019-09-08T03:59:17.514Z,
20:59:17 birthtime: 2019-09-08T03:59:17.514Z
20:59:17 }
20:59:17 previous stat data: Stats {
20:59:17 dev: 64784,
20:59:17 mode: 33188,
20:59:17 nlink: 1,
20:59:17 uid: 1001,
20:59:17 gid: 1001,
20:59:17 rdev: 0,
20:59:17 blksize: 4096,
20:59:17 ino: 6826981,
20:59:17 size: 0,
20:59:17 blocks: 8,
20:59:17 atimeMs: 1567915157406.2651,
20:59:17 mtimeMs: 1567915157406.2651,
20:59:17 ctimeMs: 1567915157406.2651,
20:59:17 birthtimeMs: 1567915157406.2651,
20:59:17 atime: 2019-09-08T03:59:17.406Z,
20:59:17 mtime: 2019-09-08T03:59:17.406Z,
20:59:17 ctime: 2019-09-08T03:59:17.406Z,
20:59:17 birthtime: 2019-09-08T03:59:17.406Z
20:59:17 }
20:59:17 Watcher: w2
20:59:17 current stat data: Stats {
20:59:17 dev: 64784,
20:59:17 mode: 33188,
20:59:17 nlink: 1,
20:59:17 uid: 1001,
20:59:17 gid: 1001,
20:59:17 rdev: 0,
20:59:17 blksize: 4096,
20:59:17 ino: 6827007,
20:59:17 size: 5,
20:59:17 blocks: 8,
20:59:17 atimeMs: 1567915157406.2651,
20:59:17 mtimeMs: 1567915157626.2598,
20:59:17 ctimeMs: 1567915157626.2598,
20:59:17 birthtimeMs: 1567915157626.2598,
20:59:17 atime: 2019-09-08T03:59:17.406Z,
20:59:17 mtime: 2019-09-08T03:59:17.626Z,
20:59:17 ctime: 2019-09-08T03:59:17.626Z,
20:59:17 birthtime: 2019-09-08T03:59:17.626Z
20:59:17 }
20:59:17 previous stat data: Stats {
20:59:17 dev: 64784,
20:59:17 mode: 33188,
20:59:17 nlink: 1,
20:59:17 uid: 1001,
20:59:17 gid: 1001,
20:59:17 rdev: 0,
20:59:17 blksize: 4096,
20:59:17 ino: 6827007,
20:59:17 size: 3,
20:59:17 blocks: 8,
20:59:17 atimeMs: 1567915157406.2651,
20:59:17 mtimeMs: 1567915157406.2651,
20:59:17 ctimeMs: 1567915157406.2651,
20:59:17 birthtimeMs: 1567915157406.2651,
20:59:17 atime: 2019-09-08T03:59:17.406Z,
20:59:17 mtime: 2019-09-08T03:59:17.406Z,
20:59:17 ctime: 2019-09-08T03:59:17.406Z,
20:59:17 birthtime: 2019-09-08T03:59:17.406Z
20:59:17 }
20:59:17 w2 change Stats {
20:59:17 dev: 64784,
20:59:17 mode: 33188,
20:59:17 nlink: 1,
20:59:17 uid: 1001,
20:59:17 gid: 1001,
20:59:17 rdev: 0,
20:59:17 blksize: 4096,
20:59:17 ino: 6827007,
20:59:17 size: 5,
20:59:17 blocks: 8,
20:59:17 atimeMs: 1567915157406.2651,
20:59:17 mtimeMs: 1567915157626.2598,
20:59:17 ctimeMs: 1567915157626.2598,
20:59:17 birthtimeMs: 1567915157626.2598,
20:59:17 atime: 2019-09-08T03:59:17.406Z,
20:59:17 mtime: 2019-09-08T03:59:17.626Z,
20:59:17 ctime: 2019-09-08T03:59:17.626Z,
20:59:17 birthtime: 2019-09-08T03:59:17.626Z
20:59:17 } Stats {
20:59:17 dev: 64784,
20:59:17 mode: 33188,
20:59:17 nlink: 1,
20:59:17 uid: 1001,
20:59:17 gid: 1001,
20:59:17 rdev: 0,
20:59:17 blksize: 4096,
20:59:17 ino: 6827007,
20:59:17 size: 3,
20:59:17 blocks: 8,
20:59:17 atimeMs: 1567915157406.2651,
20:59:17 mtimeMs: 1567915157406.2651,
20:59:17 ctimeMs: 1567915157406.2651,
20:59:17 birthtimeMs: 1567915157406.2651,
20:59:17 atime: 2019-09-08T03:59:17.406Z,
20:59:17 mtime: 2019-09-08T03:59:17.406Z,
20:59:17 ctime: 2019-09-08T03:59:17.406Z,
20:59:17 birthtime: 2019-09-08T03:59:17.406Z
20:59:17 }
20:59:17 assert.js:89
20:59:17 throw new AssertionError(obj);
20:59:17 ^
20:59:17
20:59:17 AssertionError [ERR_ASSERTION]: Checking invocations at stage "watcher1: when unwatched second file":
20:59:17 Called "before" 2 time(s), but expected 1 invocation(s).
20:59:17 at checkHook (/home/iojs/build/workspace/node-test-commit-linux-containered/test/async-hooks/hook-checks.js:51:14)
20:59:17 at Array.forEach (<anonymous>)
20:59:17 at checkInvocations (/home/iojs/build/workspace/node-test-commit-linux-containered/test/async-hooks/hook-checks.js:28:62)
20:59:17 at Immediate._onImmediate (/home/iojs/build/workspace/node-test-commit-linux-containered/test/async-hooks/test-statwatcher.js:77:9)
20:59:17 at processImmediate (internal/timers.js:439:21) {
20:59:17 generatedMessage: false,
20:59:17 code: 'ERR_ASSERTION',
20:59:17 actual: 2,
20:59:17 expected: 1,
20:59:17 operator: 'strictEqual'
20:59:17 }
20:59:17 ... |
test-statwatcher does not appear to be failing anymore in CI. Remove "flaky" status for the test. Closes: #21425 PR-URL: #29392 Fixes: #21425 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com>
seen again today:
|
I've seen this twice in master runs this week. Output
On: https://ci.nodejs.org/computer/test-azure_msft-win2016_vs2017-x64-3/ |
Under high load 2 types of issues arise with this test. * filesystem calls gets queued even when the 'sync' is used which leads to async_hooks being called with the events of tmpdir clean or initial file write after clean. This is solved by counting all 'change' calls while making sure there is no dependency of StatWatcher's on one another and the expected changes are waited for. * some events are getting lost with the current clean->write->write_and_watch strategy. Specifically I observed the file size going from 0 to 5 entirely skipping 3 even though the write call was there (this happened reliably on -j128). So I've changed the strategy to avoid additional write considering this still tests the hooks correctly. This may indicate some sort of bug in async_hooks though I'm not sure. Closes: nodejs#21425
Under high load 2 types of issues arise with this test. * filesystem calls gets queued even when the 'sync' is used which leads to async_hooks being called with the events of tmpdir clean or initial file write after clean. This is solved by counting all 'change' calls while making sure there is no dependency of StatWatcher's on one another and the expected changes are waited for. * some events are getting lost with the current clean->write->write_and_watch strategy. Specifically I observed the file size going from 0 to 5 entirely skipping 3 even though the write call was there (this happened reliably on -j128). So I've changed the strategy to avoid additional write considering this still tests the hooks correctly. This may indicate some sort of bug in async_hooks though I'm not sure. Closes: #21425 PR-URL: #30362 Fixes: #21425 Reviewed-By: Stephen Belanger <admin@stephenbelanger.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com>
Under high load 2 types of issues arise with this test. * filesystem calls gets queued even when the 'sync' is used which leads to async_hooks being called with the events of tmpdir clean or initial file write after clean. This is solved by counting all 'change' calls while making sure there is no dependency of StatWatcher's on one another and the expected changes are waited for. * some events are getting lost with the current clean->write->write_and_watch strategy. Specifically I observed the file size going from 0 to 5 entirely skipping 3 even though the write call was there (this happened reliably on -j128). So I've changed the strategy to avoid additional write considering this still tests the hooks correctly. This may indicate some sort of bug in async_hooks though I'm not sure. Closes: #21425 PR-URL: #30362 Fixes: #21425 Reviewed-By: Stephen Belanger <admin@stephenbelanger.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com>
Under high load 2 types of issues arise with this test. * filesystem calls gets queued even when the 'sync' is used which leads to async_hooks being called with the events of tmpdir clean or initial file write after clean. This is solved by counting all 'change' calls while making sure there is no dependency of StatWatcher's on one another and the expected changes are waited for. * some events are getting lost with the current clean->write->write_and_watch strategy. Specifically I observed the file size going from 0 to 5 entirely skipping 3 even though the write call was there (this happened reliably on -j128). So I've changed the strategy to avoid additional write considering this still tests the hooks correctly. This may indicate some sort of bug in async_hooks though I'm not sure. Closes: #21425 PR-URL: #30362 Fixes: #21425 Reviewed-By: Stephen Belanger <admin@stephenbelanger.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com>
Looks like this is still an issue.
|
This looks like |
@nodejs/async_hooks |
test-azure_msft-win2016_vs2017-x64-4
|
On Windows 2016 under high load further change events can be emitted after writing the 5 bytes is reported. Updating the mtime of the file can be reported as a separate change. This will increase the "before" count, but not the "w1HookCount" since we removed the listener. This makes the test keep the listeners until the end of the test. Fixes: nodejs#21425
On Windows 2016 under high load further change events can be emitted after writing the 5 bytes is reported. Updating the mtime of the file can be reported as a separate change. This will increase the "before" count, but not the "w1HookCount" since we removed the listener. This makes the test keep the listeners until the end of the test. Fixes: #21425 PR-URL: #32484 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
On Windows 2016 under high load further change events can be emitted after writing the 5 bytes is reported. Updating the mtime of the file can be reported as a separate change. This will increase the "before" count, but not the "w1HookCount" since we removed the listener. This makes the test keep the listeners until the end of the test. Fixes: #21425 PR-URL: #32484 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
https://ci.nodejs.org/job/node-test-binary-windows/18119/COMPILED_BY=vs2017,RUNNER=win2016,RUN_SUBSET=0/console
The text was updated successfully, but these errors were encountered: