Perfect your code
With built-in code review tools, GitHub makes it easy to raise the quality bar before you ship. Join the 31 million developers who've merged over 200 million pull requests.
Sign up for free See pricing for teams and enterprisesworker,etw: only enable ETW on the main thread #25907
Conversation
This comment has been minimized.
This comment has been minimized.
nodejs-github-bot
added
the
C++
label
Feb 3, 2019
addaleax
added
windows
worker
labels
Feb 3, 2019
addaleax
requested a review
from
gireeshpunathil
Feb 3, 2019
This comment has been minimized.
This comment has been minimized.
cjihrig
approved these changes
Feb 3, 2019
bnoordhuis
approved these changes
Feb 3, 2019
richardlau
approved these changes
Feb 3, 2019
addaleax
added
the
author ready
label
Feb 3, 2019
This comment has been minimized.
This comment has been minimized.
|
@addaleax - if the events are registered only by main thread (though this change) then the |
This comment has been minimized.
This comment has been minimized.
|
@gireeshpunathil I am unfamiliar with this code; however: node/src/node_win32_etw_provider.cc Lines 121 to 125 in 5506dcd (To add context: That comment was written in 2012. I would definitely take it with a grain of salt – if calling V8 APIs from a different thread is what’s happening, it’s likely to not be allowed by V8.) |
gireeshpunathil
approved these changes
Feb 5, 2019
jasnell
approved these changes
Feb 5, 2019
This comment has been minimized.
This comment has been minimized.
|
Landed in 63ab542 |
addaleax commentedFeb 3, 2019
The Windows ETW code is not written to be compatible with multi-threading,
and in particular it relies on global state like a single static
uv_async_t. Adding that to multiple threads would corrupt thecorresponding loops' handle queues.
This addresses the flakiness of at least
test-worker-exit-codeandvery likely other flaky tests that relate to Worker threads on Windows as well.
(I've marked the less-easy-to-reproduce flaky tests as likely fixed -- we can still re-open the issues if it turns they are still problematic.)
Fixes: #25847
Fixes: #25702 (likely)
Fixes: #24005 (likely)
Fixes: #23873 (likely)
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes (probably)