-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GrpcSubscriptionImpl bug: send another request at destructor #4167
Comments
The trace log for the crash RUN ] IpVersionsClientType/SdsDynamicDownstreamIntegrationTest.BasicSuccess/1 [2018-08-17 02:04:32.601][15][info][testing] test/integration/server.cc:36] starting integration test server [2018-08-17 02:04:32.670][29][debug][upstream] source/common/upstream/cluster_manager_impl.cc:957] membership update for TLS cluster cluster_0 [2018-08-17 02:04:32.670][29][debug][upstream] source/common/upstream/cluster_manager_impl.cc:957] membership update for TLS cluster sds_cluster [2018-08-17 02:04:32.691][29][trace][upstream] source/common/config/grpc_mux_impl.cc:82] Sending DiscoveryRequest for type.googleapis.com/envoy.api.v2.auth.Secret: node { [2018-08-17 02:04:32.691][29][trace][grpc] source/common/grpc/google_async_client_impl.cc:192] Queued message to write (127 bytes) [2018-08-17 02:04:32.695][29][trace][grpc] source/common/grpc/google_async_client_impl.cc:241] handleOpCompletion op=2 ok=true inflight=1 [2018-08-17 02:04:32.702][29][trace][grpc] source/common/grpc/google_async_client_impl.cc:192] Queued message to write (130 bytes) [2018-08-17 02:04:32.753][34][debug][router] source/common/router/router.cc:252] [C10][S17963119814636879959] cluster 'cluster_0' match for URL '/test/long/url' [2018-08-17 02:04:32.754][34][debug][pool] source/common/http/http1/conn_pool.cc:78] creating a new connection [2018-08-17 02:04:32.761][34][trace][connection] source/common/network/connection_impl.cc:326] [C10] writing 124 bytes, end_stream false [2018-08-17 02:04:32.772][29][debug][admin] source/server/http/admin.cc:843] [C14][S1847132448462207422] request complete: path: /quitquitquit [2018-08-17 02:04:32.772][29][trace][connection] source/common/network/connection_impl.cc:326] [C14] writing 209 bytes, end_stream false [2018-08-17 02:04:32.780][29][trace][grpc] source/common/grpc/google_async_client_impl.cc:192] Queued message to write (117 bytes) |
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or other activity occurs. Thank you for your contributions. |
Title: GrpcSubscriptionImpl bug: send another request at destructor
Description:
It causes google_grpc implementation to fail at assertion; try to send data when Its completion_queue have been deleted.
When a GrpcMuxWatchImpl is deleted, it will ask GrpcMuxImpl to send a new request.
https://github.com/envoyproxy/envoy/blob/master/source/common/config/grpc_mux_impl.h#L68
GrpcMuxImpl destructor https://github.com/envoyproxy/envoy/blob/master/source/common/config/grpc_mux_impl.cc#L23
is setting inserted_ to false trying to disable this.
But it is too late, GrpcMuxWatchImpl is owned by grpc_mux_subscription_
https://github.com/envoyproxy/envoy/blob/master/source/common/config/grpc_subscription_impl.h#L39 which is deleted before grpc_mux_;
When GrpcMuxImpl destructor is called, all its watchers should have been removed.
Repro steps:
In this PR https://github.com/istio/envoy/pull/8/files, sds_dynamic_integation test is added. When try it run it 1000 times
bazel test //test/integration:sds_dynamic_integration_test --runs_per_test=1000
some of them failed with following backtrace:
Call Stack:
E0815 16:05:20.123250125 109 call.cc:1933] assertion failed: grpc_cq_begin_op(call->cq, notify_tag)
[2018-08-15 16:05:20.123][109][critical][backtrace] bazel-out/k8-fastbuild/bin/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:125] Caught Aborted, suspect faulting address 0x3e90000000f
[2018-08-15 16:05:20.124][109][critical][backtrace] bazel-out/k8-fastbuild/bin/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:94] Backtrace thr<109> obj</lib/x86_64-linux-gnu/libc.so.6> (If unsymbolized, use tools/stack_decode.py):
[2018-08-15 16:05:20.124][109][critical][backtrace] bazel-out/k8-fastbuild/bin/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:117] thr<109> #0 0x7f13d2957428 (unknown)
[2018-08-15 16:05:20.124][109][critical][backtrace] bazel-out/k8-fastbuild/bin/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:117] thr<109> #1 0x7f13d2959029 (unknown)
[2018-08-15 16:05:20.124][109][critical][backtrace] bazel-out/k8-fastbuild/bin/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:104] thr<109> obj</home/qiwzhang/.cache/bazel/_bazel_qiwzhang/85114b85e3290f3d9d9a93c62b41d7d0/sandbox/8146193360513514347/execroot/envoy/bazel-out/k8-fastbuild/bin/test/integration/sds_dynamic_integration_test.runfiles/envoy/test/integration/sds_dynamic_integration_test>
[2018-08-15 16:05:20.134][109][critical][backtrace] bazel-out/k8-fastbuild/bin/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:114] thr<109> #2 0x73abfc call_start_batch()
[2018-08-15 16:05:20.143][109][critical][backtrace] bazel-out/k8-fastbuild/bin/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:114] thr<109> #3 0x73aed9 grpc_call_start_batch
[2018-08-15 16:05:20.153][109][critical][backtrace] bazel-out/k8-fastbuild/bin/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:114] thr<109> #4 0x68dd47 grpc::Channel::PerformOpsOnCall()
[2018-08-15 16:05:20.163][109][critical][backtrace] bazel-out/k8-fastbuild/bin/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:114] thr<109> #5 0x66859e grpc::internal::Call::PerformOps()
[2018-08-15 16:05:20.173][109][critical][backtrace] bazel-out/k8-fastbuild/bin/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:114] thr<109> #6 0x66c20c grpc::ClientAsyncReaderWriter<>::Write()
[2018-08-15 16:05:20.182][109][critical][backtrace] bazel-out/k8-fastbuild/bin/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:114] thr<109> #7 0x66343d Envoy::Grpc::GoogleAsyncStreamImpl::writeQueued()
[2018-08-15 16:05:20.189][109][critical][backtrace] bazel-out/k8-fastbuild/bin/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:114] thr<109> #8 0x66315e Envoy::Grpc::GoogleAsyncStreamImpl::sendMessage()
[2018-08-15 16:05:20.196][109][critical][backtrace] bazel-out/k8-fastbuild/bin/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:114] thr<109> #9 0xd3469d Envoy::Config::GrpcMuxImpl::sendDiscoveryRequest()
[2018-08-15 16:05:20.206][109][critical][backtrace] bazel-out/k8-fastbuild/bin/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:114] thr<109> #10 0xd370ff Envoy::Config::GrpcMuxImpl::GrpcMuxWatchImpl::~GrpcMuxWatchImpl()
[2018-08-15 16:05:20.215][109][critical][backtrace] bazel-out/k8-fastbuild/bin/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:114] thr<109> #11 0xd3715f Envoy::Config::GrpcMuxImpl::GrpcMuxWatchImpl::~GrpcMuxWatchImpl()
[2018-08-15 16:05:20.225][109][critical][backtrace] bazel-out/k8-fastbuild/bin/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:114] thr<109> #12 0x5ae0cb std::default_delete<>::operator()()
[2018-08-15 16:05:20.234][109][critical][backtrace] bazel-out/k8-fastbuild/bin/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:114] thr<109> #13 0x5ad0b6 std::unique_ptr<>::~unique_ptr()
[2018-08-15 16:05:20.242][109][critical][backtrace] bazel-out/k8-fastbuild/bin/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:114] thr<109> #14 0x8f69f6 Envoy::Config::GrpcMuxSubscriptionImpl<>::~GrpcMuxSubscriptionImpl()
[2018-08-15 16:05:20.250][109][critical][backtrace] bazel-out/k8-fastbuild/bin/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:114] thr<109> #15 0x8f7f97 Envoy::Config::GrpcSubscriptionImpl<>::~GrpcSubscriptionImpl()
[2018-08-15 16:05:20.260][109][critical][backtrace] bazel-out/k8-fastbuild/bin/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:114] thr<109> #16 0x8f7fe7 Envoy::Config::GrpcSubscriptionImpl<>::~GrpcSubscriptionImpl()
[2018-08-15 16:05:20.270][109][critical][backtrace] bazel-out/k8-fastbuild/bin/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:114] thr<109> #17 0x8f6195 std::default_delete<>::operator()()
[2018-08-15 16:05:20.279][109][critical][backtrace] bazel-out/k8-fastbuild/bin/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:114] thr<109> #18 0x8f52c0 std::unique_ptr<>::
unique_ptr()__shared_ptr()[2018-08-15 16:05:20.289][109][critical][backtrace] bazel-out/k8-fastbuild/bin/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:114] thr<109> #19 0x8f340c Envoy::Secret::SdsApi::
SdsApi()__shared_count()[2018-08-15 16:05:20.298][109][critical][backtrace] bazel-out/k8-fastbuild/bin/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:114] thr<109> #20 0x8f28fe __gnu_cxx::new_allocator<>::destroy<>()
[2018-08-15 16:05:20.308][109][critical][backtrace] bazel-out/k8-fastbuild/bin/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:114] thr<109> #21 0x8f277e std::allocator_traits<>::destroy<>()
[2018-08-15 16:05:20.316][109][critical][backtrace] bazel-out/k8-fastbuild/bin/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:114] thr<109> #22 0x8f2446 std::_Sp_counted_ptr_inplace<>::_M_dispose()
[2018-08-15 16:05:20.324][109][critical][backtrace] bazel-out/k8-fastbuild/bin/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:114] thr<109> #23 0x43b8d5 std::_Sp_counted_base<>::_M_release()
[2018-08-15 16:05:20.331][109][critical][backtrace] bazel-out/k8-fastbuild/bin/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:114] thr<109> #24 0x4364bc std::__shared_count<>::
[2018-08-15 16:05:20.339][109][critical][backtrace] bazel-out/k8-fastbuild/bin/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:114] thr<109> #25 0x8edad7 std::__shared_ptr<>::
[2018-08-15 16:05:20.347][109][critical][backtrace] bazel-out/k8-fastbuild/bin/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:114] thr<109> #26 0x8edb0f std::shared_ptr<>::~shared_ptr()
[2018-08-15 16:05:20.354][109][critical][backtrace] bazel-out/k8-fastbuild/bin/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:114] thr<109> #27 0xec8c60 Envoy::Ssl::ContextConfigImpl::~ContextConfigImpl()
[2018-08-15 16:05:20.362][109][critical][backtrace] bazel-out/k8-fastbuild/bin/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:114] thr<109> #28 0xeca7bb Envoy::Ssl::ClientContextConfigImpl::~ClientContextConfigImpl()
[2018-08-15 16:05:20.371][109][critical][backtrace] bazel-out/k8-fastbuild/bin/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:114] thr<109> #29 0xeca81d Envoy::Ssl::ClientContextConfigImpl::~ClientContextConfigImpl()
[2018-08-15 16:05:20.378][109][critical][backtrace] bazel-out/k8-fastbuild/bin/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:114] thr<109> #30 0x515d87 std::default_delete<>::operator()()
[2018-08-15 16:05:20.386][109][critical][backtrace] bazel-out/k8-fastbuild/bin/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:114] thr<109> #31 0x514452 std::unique_ptr<>::~unique_ptr()
[2018-08-15 16:05:20.393][109][critical][backtrace] bazel-out/k8-fastbuild/bin/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:114] thr<109> #32 0xebf944 Envoy::Ssl::ClientSslSocketFactory::~ClientSslSocketFactory()
[2018-08-15 16:05:20.401][109][critical][backtrace] bazel-out/k8-fastbuild/bin/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:114] thr<109> #33 0xebf99d Envoy::Ssl::ClientSslSocketFactory::~ClientSslSocketFactory()
[2018-08-15 16:05:20.409][109][critical][backtrace] bazel-out/k8-fastbuild/bin/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:114] thr<109> #34 0x443569 std::default_delete<>::operator()()
[2018-08-15 16:05:20.418][109][critical][backtrace] bazel-out/k8-fastbuild/bin/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:114] thr<109> #35 0x4394ae std::unique_ptr<>::~unique_ptr()
[2018-08-15 16:05:20.425][109][critical][backtrace] bazel-out/k8-fastbuild/bin/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:114] thr<109> #36 0xd17b39 Envoy::Upstream::ClusterInfoImpl::
ClusterInfoImpl()__shared_ptr()[2018-08-15 16:05:20.432][109][critical][backtrace] bazel-out/k8-fastbuild/bin/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:114] thr<109> #37 0xd17b89 Envoy::Upstream::ClusterInfoImpl::
ClusterInfoImpl()__shared_count()[2018-08-15 16:05:20.440][109][critical][backtrace] bazel-out/k8-fastbuild/bin/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:114] thr<109> #38 0x9ca94f std::default_delete<>::operator()()
[2018-08-15 16:05:20.449][109][critical][backtrace] bazel-out/k8-fastbuild/bin/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:114] thr<109> #39 0x9ccbc1 std::_Sp_counted_deleter<>::_M_dispose()
[2018-08-15 16:05:20.449][109][critical][backtrace] bazel-out/k8-fastbuild/bin/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:114] thr<109> #40 0x43b8d5 std::_Sp_counted_base<>::_M_release()
[2018-08-15 16:05:20.449][109][critical][backtrace] bazel-out/k8-fastbuild/bin/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:114] thr<109> #41 0x4364bc std::__shared_count<>::
[2018-08-15 16:05:20.458][109][critical][backtrace] bazel-out/k8-fastbuild/bin/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:114] thr<109> #42 0x48be45 std::__shared_ptr<>::
[2018-08-15 16:05:20.466][109][critical][backtrace] bazel-out/k8-fastbuild/bin/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:114] thr<109> #43 0x48be61 std::shared_ptr<>::~shared_ptr()
[2018-08-15 16:05:20.473][109][critical][backtrace] bazel-out/k8-fastbuild/bin/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:114] thr<109> #44 0x9c7640 Envoy::Upstream::HostDescriptionImpl::~HostDescriptionImpl()
[2018-08-15 16:05:20.482][109][critical][backtrace] bazel-out/k8-fastbuild/bin/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:114] thr<109> #45 0xd114a7 Envoy::Upstream::HostImpl::
HostImpl()__shared_ptr()[2018-08-15 16:05:20.490][109][critical][backtrace] bazel-out/k8-fastbuild/bin/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:114] thr<109> #46 0xd11509 Envoy::Upstream::HostImpl::
HostImpl()__shared_count()[2018-08-15 16:05:20.498][109][critical][backtrace] bazel-out/k8-fastbuild/bin/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:114] thr<109> #47 0x9cca73 std::_Sp_counted_ptr<>::_M_dispose()
[2018-08-15 16:05:20.498][109][critical][backtrace] bazel-out/k8-fastbuild/bin/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:114] thr<109> #48 0x43b8d5 std::_Sp_counted_base<>::_M_release()
[2018-08-15 16:05:20.498][109][critical][backtrace] bazel-out/k8-fastbuild/bin/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:114] thr<109> #49 0x4364bc std::__shared_count<>::
[2018-08-15 16:05:20.505][109][critical][backtrace] bazel-out/k8-fastbuild/bin/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:114] thr<109> #50 0x5edde7 std::__shared_ptr<>::
[2018-08-15 16:05:20.513][109][critical][backtrace] bazel-out/k8-fastbuild/bin/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:114] thr<109> #51 0x5ede29 std::shared_ptr<>::
shared_ptr()__shared_ptr()[2018-08-15 16:05:20.523][109][critical][backtrace] bazel-out/k8-fastbuild/bin/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:114] thr<109> #52 0x60b357 std::_Destroy<>()
[2018-08-15 16:05:20.532][109][critical][backtrace] bazel-out/k8-fastbuild/bin/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:114] thr<109> #53 0x605558 std::_Destroy_aux<>::__destroy<>()
[2018-08-15 16:05:20.542][109][critical][backtrace] bazel-out/k8-fastbuild/bin/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:114] thr<109> #54 0x5ff460 std::_Destroy<>()
[2018-08-15 16:05:20.552][109][critical][backtrace] bazel-out/k8-fastbuild/bin/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:114] thr<109> #55 0x5f8255 std::_Destroy<>()
[2018-08-15 16:05:20.561][109][critical][backtrace] bazel-out/k8-fastbuild/bin/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:114] thr<109> #56 0x5f1dee std::vector<>::
vector()__shared_count()[2018-08-15 16:05:20.573][109][critical][backtrace] bazel-out/k8-fastbuild/bin/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:114] thr<109> #57 0x614755 std::_Sp_counted_ptr<>::_M_dispose()
[2018-08-15 16:05:20.573][109][critical][backtrace] bazel-out/k8-fastbuild/bin/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:114] thr<109> #58 0x43b8d5 std::_Sp_counted_base<>::_M_release()
[2018-08-15 16:05:20.573][109][critical][backtrace] bazel-out/k8-fastbuild/bin/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:114] thr<109> #59 0x4364bc std::__shared_count<>::
[2018-08-15 16:05:20.581][109][critical][backtrace] bazel-out/k8-fastbuild/bin/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:114] thr<109> #60 0x5ee3f9 std::__shared_ptr<>::
[2018-08-15 16:05:20.591][109][critical][backtrace] bazel-out/k8-fastbuild/bin/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:114] thr<109> #61 0x5ee415 std::shared_ptr<>::~shared_ptr()
[2018-08-15 16:05:20.601][109][critical][backtrace] bazel-out/k8-fastbuild/bin/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:114] thr<109> #62 0x63d0e7 Envoy::Upstream::HostSetImpl::~HostSetImpl()
[2018-08-15 16:05:20.601][109][critical][backtrace] bazel-out/k8-fastbuild/bin/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:121] end backtrace thread 109
The text was updated successfully, but these errors were encountered: