Skip to content

Commit 8ad65ab

Browse files
yashyktcopybara-github
authored andcommitted
[http2] Fix http2_stats test's usage of GlobalPluginStatsRegistry (grpc#36561)
This should fix errors of the form - https://source.cloud.google.com/results/invocations/84e6c8cd-78df-45a3-8898-d703a2d38ac5/targets/%2F%2Ftest%2Fcore%2Fend2end:http2_stats_test@poller%3Dpoll/log ``` *** SIGSEGV received at time=1715064982 on cpu 0 *** PC: @ 0xffffaf404250 (unknown) absl::lts_20240116::Mutex::Lock() @ 0xffffb406e818 224 absl::lts_20240116::AbslFailureSignalHandler() @ 0xffffb45297b0 4768 (unknown) @ 0xffffb0266888 32 grpc_core::DelegatingClientCallTracer::DelegatingClientCallAttemptTracer::RecordEnd() @ 0xffffb14de408 64 grpc_core::ClientChannelFilter::FilterBasedLoadBalancedCall::Orphan() @ 0xffffb14fd2b0 48 grpc_core::RetryFilter::LegacyCallData::~LegacyCallData() @ 0xffffb14fc8e4 32 grpc_core::RetryFilter::LegacyCallData::Destroy() @ 0xffffb0ebc5bc 32 grpc_call_stack_destroy() @ 0xffffb14f4e34 48 grpc_core::DynamicFilters::Call::Destroy() @ 0xffffaff752b0 48 grpc_core::ExecCtx::Flush() @ 0xffffb44a6fb0 64 grpc_core::ExecCtx::~ExecCtx() @ 0xffffb14f2a90 160 absl::lts_20240116::internal_any_invocable::LocalInvoker<>() @ 0xffffb072c2fc 48 grpc_event_engine::experimental::SelfDeletingClosure::Run() @ 0xffffb072bd78 32 grpc_event_engine::experimental::WorkStealingThreadPool::ThreadState::Step() @ 0xffffb072ba7c 112 grpc_event_engine::experimental::WorkStealingThreadPool::ThreadState::ThreadBody() @ 0xffffb072c33c 48 grpc_event_engine::experimental::WorkStealingThreadPool::WorkStealingThreadPoolImpl::StartThread()::$_0::__invoke() @ 0xffffafb4bdc0 80 grpc_core::(anonymous namespace)::ThreadInternalsPosix::ThreadInternalsPosix()::{lambda()#1}::__invoke() @ 0xffffaef95648 80 start_thread ``` I wasn't able to reproduce this but the fix seems correct. Internal ref: b/339452200 Closes grpc#36561 COPYBARA_INTEGRATE_REVIEW=grpc#36561 from yashykt:FixHttp2StatsTest 88f2962 PiperOrigin-RevId: 631860860
1 parent 52f7a6f commit 8ad65ab

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

test/core/end2end/tests/http2_stats.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ CORE_END2END_TEST(Http2FullstackSingleHopTest, StreamStats) {
199199
g_mu = new Mutex();
200200
g_client_call_ended_notify = new CoreEnd2endTest::TestNotification(this);
201201
g_server_call_ended_notify = new CoreEnd2endTest::TestNotification(this);
202+
GlobalStatsPluginRegistryTestPeer::ResetGlobalStatsPluginRegistry();
202203
GlobalStatsPluginRegistry::RegisterStatsPlugin(
203204
std::make_shared<NewFakeStatsPlugin>());
204205
auto send_from_client = RandomSlice(10);
@@ -265,8 +266,6 @@ CORE_END2END_TEST(Http2FullstackSingleHopTest, StreamStats) {
265266
EXPECT_GE(server_transport_stats.incoming.framing_bytes, 32);
266267
EXPECT_LE(server_transport_stats.incoming.framing_bytes, 58);
267268

268-
delete ServerCallTracerFactory::Get(ChannelArgs());
269-
ServerCallTracerFactory::RegisterGlobal(nullptr);
270269
delete g_client_call_ended_notify;
271270
g_client_call_ended_notify = nullptr;
272271
delete g_server_call_ended_notify;

0 commit comments

Comments
 (0)