Uh oh!
There was an error while loading. Please reload this page.
src: trace threadpool event - #44458
Conversation
6f35dbf to
245ef10CompareUh oh!
There was an error while loading. Please reload this page.
b87e591 to
39bd5b5CompareUh oh!
There was an error while loading. Please reload this page.
39bd5b5 to
39f400bCompareUh oh!
There was an error while loading. Please reload this page.
39f400b to
ef94baaCompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
40c49ab to
672d9adCompareUh oh!
There was an error while loading. Please reload this page.
e077266 to
24d32ceCompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
theanarkh
commented
Sep 9, 2022
@legendecas@RaisinTen Hi, can we just trace the total time of work. the code is as follows. Or trace all the time by two different event type. |
legendecas
commented
Sep 14, 2022
I'd still find that tracing the synchronous event is important. So the latter alternative is LGTM. |
1703fd4 to
05cbb9cComparetheanarkh
commented
Sep 14, 2022
It seems we can not use |
a8b5f8f to
b1128a1Comparetheanarkh
commented
Oct 26, 2022
@legendecas Hi, it seems the |
b1128a1 to
1f402fcComparelegendecas
commented
Oct 26, 2022
@theanarkh The macros are declared to be thread-safe. If there is any problem related to thread safety, it should be fixed. I'd find the problem here is related to the incomplete shutdown -- e.g. the global state of the tracing controller is not reset after the platform is shut down https://github.com/nodejs/node/blob/main/src/tracing/trace_event.cc#L8. This global state is used in the macro expansion: https://github.com/nodejs/node/blob/main/src/tracing/trace_event.h#L474. We should properly shut down the platform with the tracing global state. |
Do you mean this test case |
legendecas
commented
Oct 26, 2022
@theanarkh yeah, IIUC that test case is exactly testing a premature exit while the async work is still in progress. |
nodejs-github-bot
commented
Oct 31, 2022
nodejs-github-bot
commented
Nov 1, 2022
Landed in 8fb282e |
When the process exits, there may be tasks in the thread pool that need to access data in the platform, such as trace agent. So make sure the thread pool exits first. see #44458 PR-URL: #45226 Refs: #44458 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
PR-URL: #44458 Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
When the process exits, there may be tasks in the thread pool that need to access data in the platform, such as trace agent. So make sure the thread pool exits first. see #44458 PR-URL: #45226 Refs: #44458 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
PR-URL: #44458 Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
When the process exits, there may be tasks in the thread pool that need to access data in the platform, such as trace agent. So make sure the thread pool exits first. see #44458 PR-URL: #45226 Refs: #44458 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
PR-URL: #44458 Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
When the process exits, there may be tasks in the thread pool that need to access data in the platform, such as trace agent. So make sure the thread pool exits first. see #44458 PR-URL: #45226 Refs: #44458 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
PR-URL: #44458 Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
trace threadpool events, such as APIs of
Blob,zlib,cryptoandnode_api.make -j4 test(UNIX), orvcbuild test(Windows) passes