[party] Fix use after free in tracer (#37748)

It's possible for `LogStateChange` to be called after the party is destroyed (one thread calls Unref, which calls LogStateChange after the atomic op; another calls Unref concurrently, frees the last ref, deletes the object)

Consequently, it's not safe to call `DebugTag()` here - remove that.

Closes #37748

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/37748 from ctiller:flake-fightas-10 ddef399309
PiperOrigin-RevId: 675833221
pull/37764/head
Craig Tiller 6 months ago committed by Copybara-Service
parent f55bf225da
commit dbdb035f59
  1. 2
      src/core/lib/promise/party.h

@ -394,7 +394,7 @@ class Party : public Activity, private Wakeable {
const char* op, uint64_t prev_state, uint64_t new_state,
DebugLocation loc = {}) {
GRPC_TRACE_LOG(party_state, INFO).AtLocation(loc.file(), loc.line())
<< DebugTag() << " " << op << " "
<< this << " " << op << " "
<< absl::StrFormat("%016" PRIx64 " -> %016" PRIx64, prev_state,
new_state);
}

Loading…
Cancel
Save