-
Notifications
You must be signed in to change notification settings - Fork 29.9k
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
test: unflake async hooks statwatcher test #30362
Conversation
Could someone help with node-stress-single-test, what would be the correct GIT_REMOTE_REF for this PR? ( |
Thank you for this!!!!
|
Well, looks like it was successful. |
@nodejs/testing @nodejs/async_hooks This could use some reviews. |
ping @nodejs/testing @nodejs/async_hooks |
@nodejs/collaborators |
If this unflakes the test shouldn’t it be removed from |
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
a4e124f
to
33b8300
Compare
@richardlau done. I had to rebase (and force push) as this change wasn't present at the time. |
Landed in ea6a457 |
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 <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Vladimir de Turckheim <[email protected]>
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 <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Vladimir de Turckheim <[email protected]>
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 <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Vladimir de Turckheim <[email protected]>
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 <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Vladimir de Turckheim <[email protected]>
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 (
empty
) to 5 ('foo++'
) entirely skipping 3 ('foo'
) even though the writecall 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.Not the async hooks but the fs watcher as it was missing an event.
With these changes, this test reliably passes with
-j128 --repeat 4000
on my machine. Time to test this on CI.Closes: #21425
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes