diff --git a/src/core/client_channel/client_channel_filter.cc b/src/core/client_channel/client_channel_filter.cc index c3820ed8846..b6123287474 100644 --- a/src/core/client_channel/client_channel_filter.cc +++ b/src/core/client_channel/client_channel_filter.cc @@ -2894,6 +2894,15 @@ ClientChannelFilter::LoadBalancedCall::PickSubchannel(bool was_queued) { set_picker(chand_->picker_); } while (true) { + // TODO(roth): Fix race condition in channel_idle filter and any + // other possible causes of this. + if (pickers.back() == nullptr) { + if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_lb_call_trace)) { + gpr_log(GPR_ERROR, "chand=%p lb_call=%p: picker is null, failing call", + chand_, this); + } + return absl::InternalError("picker is null -- shouldn't happen"); + } // Do pick. if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_lb_call_trace)) { gpr_log(GPR_INFO, "chand=%p lb_call=%p: performing pick with picker=%p",