Uh oh!
There was an error while loading. Please reload this page.
tracing: refactor tracing state ownership - #23781
Conversation
richardlau
commented
Oct 20, 2018
Does the second commit need tests? |
There was a problem hiding this comment.
A note about this limitation should be added in tracing.md also
refack
left a comment
There was a problem hiding this comment.
Left some comments and questions.
There was a problem hiding this comment.
| // callback is callback from whichever thread calls `StartTracing()` or | |
| // callback is called from whichever thread calls `StartTracing()` or |
or invoked or called back
There was a problem hiding this comment.
| trace_state_observer_.reset(newTrackingTraceStateObserver(this)); | |
| trace_state_observer_ = std::make_unique<TrackingTraceStateObserver>(this); |
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.
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.
As per the conversation in nodejs#22513, this is essentially global, and adding this on the Environment is generally just confusing. Refs: nodejs#22513Fixes: nodejs#22767
Forbid modifying tracing state from worker threads, either through the built-in module or inspector sessions, since the main thread owns all global state, and at least the `async_hooks` integration is definitely not thread safe in its current state.
cecac2b to
66094c3Compareaddaleax
commented
Oct 21, 2018
addaleax
commented
Oct 24, 2018
mmarchini
commented
Oct 24, 2018
Landed in d568b53...5d80ae3 |
As per the conversation in #22513, this is essentially global, and adding this on the Environment is generally just confusing. Refs: #22513Fixes: #22767 PR-URL: #23781 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Matheus Marchini <mat@mmarchini.me>
Forbid modifying tracing state from worker threads, either through the built-in module or inspector sessions, since the main thread owns all global state, and at least the `async_hooks` integration is definitely not thread safe in its current state. PR-URL: #23781Fixes: #22767 Refs: #22513 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Matheus Marchini <mat@mmarchini.me>
As per the conversation in #22513, this is essentially global, and adding this on the Environment is generally just confusing. Refs: #22513Fixes: #22767 PR-URL: #23781 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Matheus Marchini <mat@mmarchini.me>
Forbid modifying tracing state from worker threads, either through the built-in module or inspector sessions, since the main thread owns all global state, and at least the `async_hooks` integration is definitely not thread safe in its current state. PR-URL: #23781Fixes: #22767 Refs: #22513 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Matheus Marchini <mat@mmarchini.me>
targos
commented
Nov 1, 2018
Marking dont-land-on-v11.x until nodejs/build#1542 is fixed |
As per the conversation in #22513, this is essentially global, and adding this on the Environment is generally just confusing. Refs: #22513Fixes: #22767 PR-URL: #23781 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Matheus Marchini <mat@mmarchini.me>
Forbid modifying tracing state from worker threads, either through the built-in module or inspector sessions, since the main thread owns all global state, and at least the `async_hooks` integration is definitely not thread safe in its current state. PR-URL: #23781Fixes: #22767 Refs: #22513 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Matheus Marchini <mat@mmarchini.me>
As per the conversation in #22513, this is essentially global, and adding this on the Environment is generally just confusing. Refs: #22513Fixes: #22767 PR-URL: #23781 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Matheus Marchini <mat@mmarchini.me>
Forbid modifying tracing state from worker threads, either through the built-in module or inspector sessions, since the main thread owns all global state, and at least the `async_hooks` integration is definitely not thread safe in its current state. PR-URL: #23781Fixes: #22767 Refs: #22513 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Matheus Marchini <mat@mmarchini.me>
src: remove
Environment::tracing_agent_writer()As per the conversation in Scope of inspector/tracing agents #22513,
this is essentially global, and adding this on the Environment
is generally just confusing.
Refs: Scope of inspector/tracing agents #22513
Fixes: node::Environment::tracing_agent_writer returns nullptr in a worker #22767
tracing: forbid tracing modifications from worker threads
Forbid modifying tracing state from worker threads, either
through the built-in module or inspector sessions, since
the main thread owns all global state, and at least
the
async_hooksintegration is definitely not threadsafe in its current state.
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes