diff --git a/src/core/ext/transport/inproc/inproc_transport.cc b/src/core/ext/transport/inproc/inproc_transport.cc index 5a3d62243b7..a0dc91c8e0e 100644 --- a/src/core/ext/transport/inproc/inproc_transport.cc +++ b/src/core/ext/transport/inproc/inproc_transport.cc @@ -64,7 +64,10 @@ class InprocServerTransport final : public ServerTransport { "accept function set"); } - void Orphan() override { Unref(); } + void Orphan() override { + GRPC_TRACE_LOG(inproc, INFO) << "InprocServerTransport::Orphan(): " << this; + Unref(); + } FilterStackTransport* filter_stack_transport() override { return nullptr; } ClientTransport* client_transport() override { return nullptr; } @@ -158,7 +161,10 @@ class InprocClientTransport final : public ClientTransport { })); } - void Orphan() override { delete this; } + void Orphan() override { + GRPC_TRACE_LOG(inproc, INFO) << "InprocClientTransport::Orphan(): " << this; + Unref(); + } FilterStackTransport* filter_stack_transport() override { return nullptr; } ClientTransport* client_transport() override { return this; } diff --git a/src/core/lib/transport/call_filters.cc b/src/core/lib/transport/call_filters.cc index 8ff00e6fd03..05ab3db0654 100644 --- a/src/core/lib/transport/call_filters.cc +++ b/src/core/lib/transport/call_filters.cc @@ -877,10 +877,7 @@ Poll CallState::PollWasCancelled() { case ServerTrailingMetadataState::kNotPushed: case ServerTrailingMetadataState::kPushed: case ServerTrailingMetadataState::kPushedCancel: { - auto r = server_trailing_metadata_waiter_.pending(); - LOG(INFO) << GRPC_DUMP_ARGS( - server_trailing_metadata_waiter_.DebugString()); - return r; + return server_trailing_metadata_waiter_.pending(); } case ServerTrailingMetadataState::kPulled: return false; diff --git a/src/core/lib/transport/transport.h b/src/core/lib/transport/transport.h index 1ae3c07821d..b26d9c1bb3f 100644 --- a/src/core/lib/transport/transport.h +++ b/src/core/lib/transport/transport.h @@ -508,6 +508,8 @@ class Transport : public InternallyRefCounted { struct RawPointerChannelArgTag {}; static absl::string_view ChannelArgName() { return GRPC_ARG_TRANSPORT; } + using InternallyRefCounted::InternallyRefCounted; + // Though internally ref counted transports expose their "Ref" method to // create a RefCountedPtr to themselves. The OrphanablePtr owner is the // singleton decision maker on whether the transport should be destroyed or @@ -601,6 +603,7 @@ class FilterStackTransport : public Transport { class ClientTransport : public Transport { public: + using Transport::Transport; virtual void StartCall(CallHandler call_handler) = 0; protected: @@ -609,6 +612,7 @@ class ClientTransport : public Transport { class ServerTransport : public Transport { public: + using Transport::Transport; // Called once slightly after transport setup to register the accept function. virtual void SetCallDestination( RefCountedPtr unstarted_call_handler) = 0; diff --git a/test/cpp/microbenchmarks/fullstack_fixtures.h b/test/cpp/microbenchmarks/fullstack_fixtures.h index 96b6a5b6741..30f00e88543 100644 --- a/test/cpp/microbenchmarks/fullstack_fixtures.h +++ b/test/cpp/microbenchmarks/fullstack_fixtures.h @@ -95,6 +95,7 @@ class FullstackFixture : public BaseFixture { } ~FullstackFixture() override { + channel_.reset(); server_->Shutdown(grpc_timeout_milliseconds_to_deadline(0)); cq_->Shutdown(); void* tag; diff --git a/test/cpp/microbenchmarks/fullstack_unary_ping_pong.h b/test/cpp/microbenchmarks/fullstack_unary_ping_pong.h index 06e4d9e16a8..f6a7c8b88aa 100644 --- a/test/cpp/microbenchmarks/fullstack_unary_ping_pong.h +++ b/test/cpp/microbenchmarks/fullstack_unary_ping_pong.h @@ -104,6 +104,7 @@ static void BM_UnaryPingPong(benchmark::State& state) { service.RequestEcho(&senv->ctx, &senv->recv_request, &senv->response_writer, fixture->cq(), fixture->cq(), tag(slot)); } + stub.reset(); fixture.reset(); server_env[0]->~ServerEnv(); server_env[1]->~ServerEnv();