We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 967fbeb commit aa05c8bCopy full SHA for aa05c8b
src/tracing/node_trace_buffer.cc
@@ -59,7 +59,13 @@ void InternalTraceBuffer::Flush(bool blocking) {
59
for (size_t i = 0; i < total_chunks_; ++i) {
60
auto& chunk = chunks_[i];
61
for (size_t j = 0; j < chunk->size(); ++j) {
62
- agent_->AppendTraceEvent(chunk->GetEventAt(j));
+ TraceObject* trace_event = chunk->GetEventAt(j);
63
+ // Another thread may have added a trace that is yet to be
64
+ // initialized. Skip such traces.
65
+ // https://github.com/nodejs/node/issues/21038.
66
+ if (trace_event->name()) {
67
+ agent_->AppendTraceEvent(trace_event);
68
+ }
69
}
70
71
total_chunks_ = 0;
0 commit comments