Skip to content

grpc transcoder config may lead to crash #18849

Closed

Description

@belyalov

Title: grpc transcoder config may lead to crash when using per route configs

Description:
Envoy may crash and/or corrupt memory when applying configuration and http grpc per route transcoder config is set, like this one:

- name: test_service.proto
  service:
  - method:
    - input_type: .google.api.HttpBody
      name: TestAtLeast
      options:
        '[google.api.http]':
          additional_bindings:
          - post: /routes/test_at_least
          - custom:
              kind: OPTIONS
              path: /routes/test_at_least

Running ASAN build of envoy generates reports like this:

=================================================================
==7==ERROR: AddressSanitizer: heap-use-after-free on address 0x6080011505b8 at pc 0x560154cc9373 bp 0x7f335f7043a0 sp 0x7f335f704398
READ of size 8 at 0x6080011505b8 thread T74
    #0 0x560154cc9372 in std::_Rb_tree<google::protobuf::Type const*, std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > >, std::_Select1st<std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > > >, std::less<google::protobuf::Type const*>, std::allocator<std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > > > >::_M_erase(std::_Rb_tree_node<std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > > >*) path/root/bin/../lib/gcc/x86_64-linux-gnu/8.2.0/../../../../include/c++/8.2.0/bits/stl_tree.h:1872
    #1 0x560154cc930b in std::_Rb_tree<google::protobuf::Type const*, std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > >, std::_Select1st<std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > > >, std::less<google::protobuf::Type const*>, std::allocator<std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > > > >::_M_erase(std::_Rb_tree_node<std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > > >*) path/root/bin/../lib/gcc/x86_64-linux-gnu/8.2.0/../../../../include/c++/8.2.0/bits/stl_tree.h:1872
    #2 0x560154cc930b in std::_Rb_tree<google::protobuf::Type const*, std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > >, std::_Select1st<std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > > >, std::less<google::protobuf::Type const*>, std::allocator<std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > > > >::_M_erase(std::_Rb_tree_node<std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > > >*) path/root/bin/../lib/gcc/x86_64-linux-gnu/8.2.0/../../../../include/c++/8.2.0/bits/stl_tree.h:1872
    #3 0x560154cc930b in std::_Rb_tree<google::protobuf::Type const*, std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > >, std::_Select1st<std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > > >, std::less<google::protobuf::Type const*>, std::allocator<std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > > > >::_M_erase(std::_Rb_tree_node<std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > > >*) path/root/bin/../lib/gcc/x86_64-linux-gnu/8.2.0/../../../../include/c++/8.2.0/bits/stl_tree.h:1872
    #4 0x560154cc930b in std::_Rb_tree<google::protobuf::Type const*, std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > >, std::_Select1st<std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > > >, std::less<google::protobuf::Type const*>, std::allocator<std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > > > >::_M_erase(std::_Rb_tree_node<std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > > >*) path/root/bin/../lib/gcc/x86_64-linux-gnu/8.2.0/../../../../include/c++/8.2.0/bits/stl_tree.h:1872
    #5 0x560154cc930b in std::_Rb_tree<google::protobuf::Type const*, std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > >, std::_Select1st<std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > > >, std::less<google::protobuf::Type const*>, std::allocator<std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > > > >::_M_erase(std::_Rb_tree_node<std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > > >*) path/root/bin/../lib/gcc/x86_64-linux-gnu/8.2.0/../../../../include/c++/8.2.0/bits/stl_tree.h:1872
    #6 0x560154cc930b in std::_Rb_tree<google::protobuf::Type const*, std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > >, std::_Select1st<std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > > >, std::less<google::protobuf::Type const*>, std::allocator<std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > > > >::_M_erase(std::_Rb_tree_node<std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > > >*) path/root/bin/../lib/gcc/x86_64-linux-gnu/8.2.0/../../../../include/c++/8.2.0/bits/stl_tree.h:1872
    #7 0x560154cccef8 in std::_Rb_tree<google::protobuf::Type const*, std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > >, std::_Select1st<std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > > >, std::less<google::protobuf::Type const*>, std::allocator<std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > > > >::~_Rb_tree() path/root/bin/../lib/gcc/x86_64-linux-gnu/8.2.0/../../../../include/c++/8.2.0/bits/stl_tree.h:965
    #8 0x560154cccef8 in std::map<google::protobuf::Type const*, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > >, std::less<google::protobuf::Type const*>, std::allocator<std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > > > >::~map() path/root/bin/../lib/gcc/x86_64-linux-gnu/8.2.0/../../../../include/c++/8.2.0/bits/stl_map.h:300
    #9 0x560154cccef8 in ~TypeInfoForTypeResolver external/com_google_protobuf/src/google/protobuf/util/internal/type_info.cc:57
    #10 0x560154cccef8 in ~TypeInfoForTypeResolver external/com_google_protobuf/src/google/protobuf/util/internal/type_info.cc:60
    #11 0x5601504355c8 in std::default_delete<google::protobuf::util::converter::TypeInfo>::operator()(google::protobuf::util::converter::TypeInfo*) const path/root/bin/../lib/gcc/x86_64-linux-gnu/8.2.0/../../../../include/c++/8.2.0/bits/unique_ptr.h:81
    #12 0x5601504355c8 in std::unique_ptr<google::protobuf::util::converter::TypeInfo, std::default_delete<google::protobuf::util::converter::TypeInfo> >::reset(google::protobuf::util::converter::TypeInfo*) path/root/bin/../lib/gcc/x86_64-linux-gnu/8.2.0/../../../../include/c++/8.2.0/bits/unique_ptr.h:382
    #13 0x5601504355c8 in google::grpc::transcoding::TypeHelper::~TypeHelper() external/grpc_httpjson_transcoding/src/type_helper.cc:116
    #14 0x5601503f7118 in Envoy::Extensions::HttpFilters::GrpcJsonTranscoder::JsonTranscoderConfig::~JsonTranscoderConfig() (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x1738118)
    #15 0x56014ff9ffae in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release() (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x12e0fae)
    #16 0x5601528701b8 in absl::container_internal::raw_hash_set<absl::container_internal::NodeHashMapPolicy<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::shared_ptr<Envoy::Router::RouteSpecificFilterConfig const> >, absl::container_internal::StringHash, absl::container_internal::StringHashEq::Eq, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::shared_ptr<Envoy::Router::RouteSpecificFilterConfig const> > > >::destroy_slots() (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x3bb11b8)
    #17 0x5601528d000d in Envoy::Router::VirtualHostImpl::~VirtualHostImpl() (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x3c1100d)
    #18 0x5601528d0530 in Envoy::Router::VirtualHostImpl::~VirtualHostImpl() (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x3c11530)
    #19 0x56014ff9ffae in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release() (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x12e0fae)
    #20 0x5601525ddca8 in Envoy::Router::ConfigImpl::~ConfigImpl() (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x391eca8)
    #21 0x56014ff9ffae in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release() (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x12e0fae)
    #22 0x5601525cc1df in std::_Function_handler<void (Envoy::OptRef<Envoy::Router::RdsRouteConfigProviderImpl::ThreadLocalConfig>), Envoy::Router::RdsRouteConfigProviderImpl::onConfigUpdate()::{lambda(Envoy::OptRef<Envoy::Router::RdsRouteConfigProviderImpl::ThreadLocalConfig>)#1}>::_M_invoke(std::_Any_data const&, Envoy::OptRef<Envoy::Router::RdsRouteConfigProviderImpl::ThreadLocalConfig>&&) (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x390d1df)
    #23 0x5601525cbe2e in std::_Function_handler<void (std::shared_ptr<Envoy::ThreadLocal::ThreadLocalObject>), Envoy::ThreadLocal::TypedSlot<Envoy::Router::RdsRouteConfigProviderImpl::ThreadLocalConfig>::makeSlotUpdateCb(std::function<void (Envoy::OptRef<Envoy::Router::RdsRouteConfigProviderImpl::ThreadLocalConfig>)>)::{lambda(std::shared_ptr<Envoy::ThreadLocal::ThreadLocalObject>)#1}>::_M_invoke(std::_Any_data const&, std::shared_ptr<Envoy::ThreadLocal::ThreadLocalObject>&&) (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x390ce2e)
    #24 0x5601513ed3ad in std::_Function_handler<void (), Envoy::ThreadLocal::InstanceImpl::SlotImpl::dataCallback(std::function<void (std::shared_ptr<Envoy::ThreadLocal::ThreadLocalObject>)> const&)::{lambda()#1}>::_M_invoke(std::_Any_data const&) (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x272e3ad)
    #25 0x560153013fad in Envoy::Event::DispatcherImpl::runPostCallbacks() (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x4354fad)
    #26 0x5601535d6414 in event_process_active_single_queue external/libevent/event.c:1713
    #27 0x5601535d7dae in event_process_active external/libevent/event.c:1805
    #28 0x5601535d7dae in event_base_loop external/libevent/event.c:2047
    #29 0x5601514922a3 in Envoy::Server::WorkerImpl::threadRoutine(Envoy::Server::GuardDog&, std::function<void ()> const&) (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x27d32a3)
    #30 0x560153673b6c in Envoy::Thread::ThreadImplPosix::ThreadImplPosix(std::function<void ()>, std::optional<Envoy::Thread::Options> const&)::{lambda(void*)#1}::_FUN(void*) (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x49b4b6c)
    #31 0x7f338f46d05d in start_thread (/usr/path/v3/lib64/libpthread.so.0+0x805d)
    #32 0x7f338f07466e in clone (/usr/path/v3/lib64/libc.so.6+0x11466e)

0x6080011505b8 is located 24 bytes inside of 88-byte region [0x6080011505a0,0x6080011505f8)
freed by thread T74 here:
    #0 0x7f338f583670 in operator delete(void*) (/usr/path/v3/lib64/libasan.so.5+0xee670)
    #1 0x560154cc934f in __gnu_cxx::new_allocator<std::_Rb_tree_node<std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > > > >::deallocate(std::_Rb_tree_node<std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > > >*, unsigned long) path/root/bin/../lib/gcc/x86_64-linux-gnu/8.2.0/../../../../include/c++/8.2.0/ext/new_allocator.h:125
    #2 0x560154cc934f in std::allocator_traits<std::allocator<std::_Rb_tree_node<std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > > > > >::deallocate(std::allocator<std::_Rb_tree_node<std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > > > >&, std::_Rb_tree_node<std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > > >*, unsigned long) path/root/bin/../lib/gcc/x86_64-linux-gnu/8.2.0/../../../../include/c++/8.2.0/bits/alloc_traits.h:462
    #3 0x560154cc934f in std::_Rb_tree<google::protobuf::Type const*, std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > >, std::_Select1st<std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > > >, std::less<google::protobuf::Type const*>, std::allocator<std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > > > >::_M_put_node(std::_Rb_tree_node<std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > > >*) path/root/bin/../lib/gcc/x86_64-linux-gnu/8.2.0/../../../../include/c++/8.2.0/bits/stl_tree.h:603
    #4 0x560154cc934f in std::_Rb_tree<google::protobuf::Type const*, std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > >, std::_Select1st<std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > > >, std::less<google::protobuf::Type const*>, std::allocator<std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > > > >::_M_drop_node(std::_Rb_tree_node<std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > > >*) path/root/bin/../lib/gcc/x86_64-linux-gnu/8.2.0/../../../../include/c++/8.2.0/bits/stl_tree.h:670
    #5 0x560154cc934f in std::_Rb_tree<google::protobuf::Type const*, std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > >, std::_Select1st<std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > > >, std::less<google::protobuf::Type const*>, std::allocator<std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > > > >::_M_erase(std::_Rb_tree_node<std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > > >*) path/root/bin/../lib/gcc/x86_64-linux-gnu/8.2.0/../../../../include/c++/8.2.0/bits/stl_tree.h:1874
    #6 0x560154cc930b in std::_Rb_tree<google::protobuf::Type const*, std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > >, std::_Select1st<std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > > >, std::less<google::protobuf::Type const*>, std::allocator<std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > > > >::_M_erase(std::_Rb_tree_node<std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > > >*) path/root/bin/../lib/gcc/x86_64-linux-gnu/8.2.0/../../../../include/c++/8.2.0/bits/stl_tree.h:1872
    #7 0x560154cc930b in std::_Rb_tree<google::protobuf::Type const*, std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > >, std::_Select1st<std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > > >, std::less<google::protobuf::Type const*>, std::allocator<std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > > > >::_M_erase(std::_Rb_tree_node<std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > > >*) path/root/bin/../lib/gcc/x86_64-linux-gnu/8.2.0/../../../../include/c++/8.2.0/bits/stl_tree.h:1872
    #8 0x560154cc930b in std::_Rb_tree<google::protobuf::Type const*, std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > >, std::_Select1st<std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > > >, std::less<google::protobuf::Type const*>, std::allocator<std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > > > >::_M_erase(std::_Rb_tree_node<std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > > >*) path/root/bin/../lib/gcc/x86_64-linux-gnu/8.2.0/../../../../include/c++/8.2.0/bits/stl_tree.h:1872
    #9 0x560154cc930b in std::_Rb_tree<google::protobuf::Type const*, std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > >, std::_Select1st<std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > > >, std::less<google::protobuf::Type const*>, std::allocator<std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > > > >::_M_erase(std::_Rb_tree_node<std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > > >*) path/root/bin/../lib/gcc/x86_64-linux-gnu/8.2.0/../../../../include/c++/8.2.0/bits/stl_tree.h:1872
    #10 0x560154cc930b in std::_Rb_tree<google::protobuf::Type const*, std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > >, std::_Select1st<std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > > >, std::less<google::protobuf::Type const*>, std::allocator<std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > > > >::_M_erase(std::_Rb_tree_node<std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > > >*) path/root/bin/../lib/gcc/x86_64-linux-gnu/8.2.0/../../../../include/c++/8.2.0/bits/stl_tree.h:1872
    #11 0x560154cc930b in std::_Rb_tree<google::protobuf::Type const*, std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > >, std::_Select1st<std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > > >, std::less<google::protobuf::Type const*>, std::allocator<std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > > > >::_M_erase(std::_Rb_tree_node<std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > > >*) path/root/bin/../lib/gcc/x86_64-linux-gnu/8.2.0/../../../../include/c++/8.2.0/bits/stl_tree.h:1872
    #12 0x560154cccef8 in std::_Rb_tree<google::protobuf::Type const*, std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > >, std::_Select1st<std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > > >, std::less<google::protobuf::Type const*>, std::allocator<std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > > > >::~_Rb_tree() path/root/bin/../lib/gcc/x86_64-linux-gnu/8.2.0/../../../../include/c++/8.2.0/bits/stl_tree.h:965
    #13 0x560154cccef8 in std::map<google::protobuf::Type const*, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > >, std::less<google::protobuf::Type const*>, std::allocator<std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > > > >::~map() path/root/bin/../lib/gcc/x86_64-linux-gnu/8.2.0/../../../../include/c++/8.2.0/bits/stl_map.h:300
    #14 0x560154cccef8 in ~TypeInfoForTypeResolver external/com_google_protobuf/src/google/protobuf/util/internal/type_info.cc:57
    #15 0x560154cccef8 in ~TypeInfoForTypeResolver external/com_google_protobuf/src/google/protobuf/util/internal/type_info.cc:60
    #16 0x5601504355c8 in std::default_delete<google::protobuf::util::converter::TypeInfo>::operator()(google::protobuf::util::converter::TypeInfo*) const path/root/bin/../lib/gcc/x86_64-linux-gnu/8.2.0/../../../../include/c++/8.2.0/bits/unique_ptr.h:81
    #17 0x5601504355c8 in std::unique_ptr<google::protobuf::util::converter::TypeInfo, std::default_delete<google::protobuf::util::converter::TypeInfo> >::reset(google::protobuf::util::converter::TypeInfo*) path/root/bin/../lib/gcc/x86_64-linux-gnu/8.2.0/../../../../include/c++/8.2.0/bits/unique_ptr.h:382
    #18 0x5601504355c8 in google::grpc::transcoding::TypeHelper::~TypeHelper() external/grpc_httpjson_transcoding/src/type_helper.cc:116
    #19 0x5601503f7118 in Envoy::Extensions::HttpFilters::GrpcJsonTranscoder::JsonTranscoderConfig::~JsonTranscoderConfig() (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x1738118)
    #20 0x56014ff9ffae in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release() (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x12e0fae)
    #21 0x5601528701b8 in absl::container_internal::raw_hash_set<absl::container_internal::NodeHashMapPolicy<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::shared_ptr<Envoy::Router::RouteSpecificFilterConfig const> >, absl::container_internal::StringHash, absl::container_internal::StringHashEq::Eq, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::shared_ptr<Envoy::Router::RouteSpecificFilterConfig const> > > >::destroy_slots() (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x3bb11b8)
    #22 0x5601528d000d in Envoy::Router::VirtualHostImpl::~VirtualHostImpl() (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x3c1100d)
    #23 0x5601528d0530 in Envoy::Router::VirtualHostImpl::~VirtualHostImpl() (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x3c11530)
    #24 0x56014ff9ffae in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release() (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x12e0fae)
    #25 0x5601525ddca8 in Envoy::Router::ConfigImpl::~ConfigImpl() (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x391eca8)
    #26 0x56014ff9ffae in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release() (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x12e0fae)
    #27 0x5601525cc1df in std::_Function_handler<void (Envoy::OptRef<Envoy::Router::RdsRouteConfigProviderImpl::ThreadLocalConfig>), Envoy::Router::RdsRouteConfigProviderImpl::onConfigUpdate()::{lambda(Envoy::OptRef<Envoy::Router::RdsRouteConfigProviderImpl::ThreadLocalConfig>)#1}>::_M_invoke(std::_Any_data const&, Envoy::OptRef<Envoy::Router::RdsRouteConfigProviderImpl::ThreadLocalConfig>&&) (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x390d1df)
    #28 0x5601525cbe2e in std::_Function_handler<void (std::shared_ptr<Envoy::ThreadLocal::ThreadLocalObject>), Envoy::ThreadLocal::TypedSlot<Envoy::Router::RdsRouteConfigProviderImpl::ThreadLocalConfig>::makeSlotUpdateCb(std::function<void (Envoy::OptRef<Envoy::Router::RdsRouteConfigProviderImpl::ThreadLocalConfig>)>)::{lambda(std::shared_ptr<Envoy::ThreadLocal::ThreadLocalObject>)#1}>::_M_invoke(std::_Any_data const&, std::shared_ptr<Envoy::ThreadLocal::ThreadLocalObject>&&) (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x390ce2e)
    #29 0x5601513ed3ad in std::_Function_handler<void (), Envoy::ThreadLocal::InstanceImpl::SlotImpl::dataCallback(std::function<void (std::shared_ptr<Envoy::ThreadLocal::ThreadLocalObject>)> const&)::{lambda()#1}>::_M_invoke(std::_Any_data const&) (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x272e3ad)
    #30 0x560153013fad in Envoy::Event::DispatcherImpl::runPostCallbacks() (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x4354fad)
    #31 0x5601535d6414 in event_process_active_single_queue external/libevent/event.c:1713
    #32 0x5601535d7dae in event_process_active external/libevent/event.c:1805
    #33 0x5601535d7dae in event_base_loop external/libevent/event.c:2047
    #34 0x5601514922a3 in Envoy::Server::WorkerImpl::threadRoutine(Envoy::Server::GuardDog&, std::function<void ()> const&) (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x27d32a3)
    #35 0x560153673b6c in Envoy::Thread::ThreadImplPosix::ThreadImplPosix(std::function<void ()>, std::optional<Envoy::Thread::Options> const&)::{lambda(void*)#1}::_FUN(void*) (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x49b4b6c)
    #36 0x7f338f46d05d in start_thread (/usr/path/v3/lib64/libpthread.so.0+0x805d)

previously allocated by thread T0 here:
    #0 0x7f338f582900 in operator new(unsigned long) (/usr/path/v3/lib64/libasan.so.5+0xed900)
    #1 0x560154cc75b2 in __gnu_cxx::new_allocator<std::_Rb_tree_node<std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > > > >::allocate(unsigned long, void const*) path/root/bin/../lib/gcc/x86_64-linux-gnu/8.2.0/../../../../include/c++/8.2.0/ext/new_allocator.h:111
    #2 0x560154cc75b2 in std::allocator_traits<std::allocator<std::_Rb_tree_node<std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > > > > >::allocate(std::allocator<std::_Rb_tree_node<std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > > > >&, unsigned long) path/root/bin/../lib/gcc/x86_64-linux-gnu/8.2.0/../../../../include/c++/8.2.0/bits/alloc_traits.h:436
    #3 0x560154cc75b2 in std::_Rb_tree<google::protobuf::Type const*, std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > >, std::_Select1st<std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > > >, std::less<google::protobuf::Type const*>, std::allocator<std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > > > >::_M_get_node() path/root/bin/../lib/gcc/x86_64-linux-gnu/8.2.0/../../../../include/c++/8.2.0/bits/stl_tree.h:599
    #4 0x560154cc75b2 in std::_Rb_tree_node<std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > > >* std::_Rb_tree<google::protobuf::Type const*, std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > >, std::_Select1st<std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > > >, std::less<google::protobuf::Type const*>, std::allocator<std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > > > >::_M_create_node<std::piecewise_construct_t const&, std::tuple<google::protobuf::Type const* const&>, std::tuple<> >(std::piecewise_construct_t const&, std::tuple<google::protobuf::Type const* const&>&&, std::tuple<>&&) path/root/bin/../lib/gcc/x86_64-linux-gnu/8.2.0/../../../../include/c++/8.2.0/bits/stl_tree.h:653
    #5 0x560154cc75b2 in std::_Rb_tree_iterator<std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > > > std::_Rb_tree<google::protobuf::Type const*, std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > >, std::_Select1st<std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > > >, std::less<google::protobuf::Type const*>, std::allocator<std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > > > >::_M_emplace_hint_unique<std::piecewise_construct_t const&, std::tuple<google::protobuf::Type const* const&>, std::tuple<> >(std::_Rb_tree_const_iterator<std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > > >, std::piecewise_construct_t const&, std::tuple<google::protobuf::Type const* const&>&&, std::tuple<>&&) path/root/bin/../lib/gcc/x86_64-linux-gnu/8.2.0/../../../../include/c++/8.2.0/bits/stl_tree.h:2414
    #6 0x560154cc8fd3 in std::map<google::protobuf::Type const*, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > >, std::less<google::protobuf::Type const*>, std::allocator<std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > > > >::operator[](google::protobuf::Type const* const&) path/root/bin/../lib/gcc/x86_64-linux-gnu/8.2.0/../../../../include/c++/8.2.0/bits/stl_map.h:499
    #7 0x560154cc8fd3 in FindField external/com_google_protobuf/src/google/protobuf/util/internal/type_info.cc:116
    #8 0x56015043639e in google::grpc::transcoding::TypeHelper::ResolveFieldPath(google::protobuf::Type const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::vector<google::protobuf::Field const*, std::allocator<google::protobuf::Field const*> >*) const external/grpc_httpjson_transcoding/src/type_helper.cc:159
    #9 0x56015043a455 in google::grpc::transcoding::TypeHelper::ResolveFieldPath(google::protobuf::Type const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::vector<google::protobuf::Field const*, std::allocator<google::protobuf::Field const*> >*) const external/grpc_httpjson_transcoding/src/type_helper.cc:143
    #10 0x5601503f802b in Envoy::Extensions::HttpFilters::GrpcJsonTranscoder::JsonTranscoderConfig::resolveField(google::protobuf::Descriptor const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::vector<google::protobuf::Field const*, std::allocator<google::protobuf::Field const*> >*, bool*) (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x173902b)
    #11 0x5601503f927a in Envoy::Extensions::HttpFilters::GrpcJsonTranscoder::JsonTranscoderConfig::createMethodInfo(google::protobuf::MethodDescriptor const*, google::api::HttpRule const&, std::shared_ptr<Envoy::Extensions::HttpFilters::GrpcJsonTranscoder::MethodInfo>&) (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x173a27a)
    #12 0x5601503fb59d in Envoy::Extensions::HttpFilters::GrpcJsonTranscoder::JsonTranscoderConfig::JsonTranscoderConfig(envoy::extensions::filters::http::grpc_json_transcoder::v3::GrpcJsonTranscoder const&, Envoy::Api::Api&) (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x173c59d)
    #13 0x5601503c1a7c in Envoy::Extensions::HttpFilters::GrpcJsonTranscoder::GrpcJsonTranscoderFilterConfig::createRouteSpecificFilterConfigTyped(envoy::extensions::filters::http::grpc_json_transcoder::v3::GrpcJsonTranscoder const&, Envoy::Server::Configuration::ServerFactoryContext&, Envoy::ProtobufMessage::ValidationVisitor&) (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x1702a7c)
    #14 0x5601503c5a63 in Envoy::Extensions::HttpFilters::Common::FactoryBase<envoy::extensions::filters::http::grpc_json_transcoder::v3::GrpcJsonTranscoder, envoy::extensions::filters::http::grpc_json_transcoder::v3::GrpcJsonTranscoder>::createRouteSpecificFilterConfig(google::protobuf::Message const&, Envoy::Server::Configuration::ServerFactoryContext&, Envoy::ProtobufMessage::ValidationVisitor&) (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x1706a63)
    #15 0x56015289e2db in Envoy::Router::PerFilterConfigs::createRouteSpecificFilterConfig(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, google::protobuf::Any const&, google::protobuf::Struct const&, absl::flat_hash_set<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, absl::container_internal::StringHash, absl::container_internal::StringHashEq::Eq, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, Envoy::Server::Configuration::ServerFactoryContext&, Envoy::ProtobufMessage::ValidationVisitor&) (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x3bdf2db)
    #16 0x5601528b7080 in Envoy::Router::PerFilterConfigs::PerFilterConfigs(google::protobuf::Map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, google::protobuf::Any> const&, google::protobuf::Map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, google::protobuf::Struct> const&, absl::flat_hash_set<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, absl::container_internal::StringHash, absl::container_internal::StringHashEq::Eq, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, Envoy::Server::Configuration::ServerFactoryContext&, Envoy::ProtobufMessage::ValidationVisitor&) (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x3bf8080)
    #17 0x5601528ef651 in Envoy::Router::VirtualHostImpl::VirtualHostImpl(envoy::config::route::v3::VirtualHost const&, absl::flat_hash_set<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, absl::container_internal::StringHash, absl::container_internal::StringHashEq::Eq, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, Envoy::Router::ConfigImpl const&, Envoy::Server::Configuration::ServerFactoryContext&, Envoy::Stats::Scope&, Envoy::ProtobufMessage::ValidationVisitor&, std::optional<Envoy::Upstream::ClusterManager::ClusterInfoMaps> const&) (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x3c30651)
    #18 0x5601528f534e in Envoy::Router::RouteMatcher::RouteMatcher(envoy::config::route::v3::RouteConfiguration const&, absl::flat_hash_set<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, absl::container_internal::StringHash, absl::container_internal::StringHashEq::Eq, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, Envoy::Router::ConfigImpl const&, Envoy::Server::Configuration::ServerFactoryContext&, Envoy::ProtobufMessage::ValidationVisitor&, bool) (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x3c3634e)
    #19 0x5601528f8108 in Envoy::Router::ConfigImpl::ConfigImpl(envoy::config::route::v3::RouteConfiguration const&, absl::flat_hash_set<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, absl::container_internal::StringHash, absl::container_internal::StringHashEq::Eq, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, Envoy::Server::Configuration::ServerFactoryContext&, Envoy::ProtobufMessage::ValidationVisitor&, bool) (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x3c39108)
    #20 0x560152768061 in Envoy::Router::RouteConfigUpdateReceiverImpl::onRdsUpdate(envoy::config::route::v3::RouteConfiguration const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x3aa9061)
    #21 0x5601525eb697 in Envoy::Router::RdsRouteConfigSubscription::onConfigUpdate(std::vector<std::reference_wrapper<Envoy::Config::DecodedResource>, std::allocator<std::reference_wrapper<Envoy::Config::DecodedResource> > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x392c697)
    #22 0x56015261365f in Envoy::Config::GrpcSubscriptionImpl::onConfigUpdate(std::vector<std::reference_wrapper<Envoy::Config::DecodedResource>, std::allocator<std::reference_wrapper<Envoy::Config::DecodedResource> > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x395465f)
    #23 0x56015265036e in Envoy::Config::GrpcMuxImpl::onDiscoveryResponse(std::unique_ptr<envoy::service::discovery::v3::DiscoveryResponse, std::default_delete<envoy::service::discovery::v3::DiscoveryResponse> >&&, Envoy::Config::ControlPlaneStats&) (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x399136e)
    #24 0x560152636005 in Envoy::Grpc::AsyncStreamCallbacks<envoy::service::discovery::v3::DiscoveryResponse>::onReceiveMessageRaw(std::unique_ptr<Envoy::Buffer::Instance, std::default_delete<Envoy::Buffer::Instance> >&&) (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x3977005)
    #25 0x5601526b85b3 in Envoy::Grpc::AsyncStreamImpl::onData(Envoy::Buffer::Instance&, bool) (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x39f95b3)
    #26 0x5601526eb348 in Envoy::Http::AsyncStreamImpl::encodeData(Envoy::Buffer::Instance&, bool) (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x3a2c348)
    #27 0x560152832280 in Envoy::Router::UpstreamRequest::decodeData(Envoy::Buffer::Instance&, bool) (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x3b73280)
    #28 0x56015253ab7e in Envoy::Http::Http2::ConnectionImpl::onFrameReceived(nghttp2_frame const*) (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x387bb7e)
    #29 0x56015253cb24 in Envoy::Http::Http2::ConnectionImpl::Http2Callbacks::Http2Callbacks()::{lambda(nghttp2_session*, nghttp2_frame const*, void*)#7}::_FUN(nghttp2_session*, nghttp2_frame const*, void*) (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x387db24)
    #30 0x560153590567 in session_call_on_frame_received external/com_github_nghttp2_nghttp2/lib/nghttp2_session.c:3299
    #31 0x560153590567 in nghttp2_session_on_data_received external/com_github_nghttp2_nghttp2/lib/nghttp2_session.c:4975
    #32 0x56015359ac58 in session_process_data_frame external/com_github_nghttp2_nghttp2/lib/nghttp2_session.c:4994
    #33 0x56015359ac58 in nghttp2_session_mem_recv external/com_github_nghttp2_nghttp2/lib/nghttp2_session.c:6608
    #34 0x5601525225b8 in Envoy::Http::Http2::ConnectionImpl::dispatch(Envoy::Buffer::Instance&) (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x38635b8)
    #35 0x560151efc2ce in Envoy::Http::CodecClient::onData(Envoy::Buffer::Instance&) (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x323d2ce)
    #36 0x560151efd443 in Envoy::Http::CodecClient::CodecReadFilter::onData(Envoy::Buffer::Instance&, bool) (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x323e443)

Thread T74 created by T0 here:
    #0 0x7f338f4e1ef0 in __interceptor_pthread_create (/usr/path/v3/lib64/libasan.so.5+0x4cef0)
    #1 0x5601536763af in Envoy::Thread::ThreadImplPosix::ThreadImplPosix(std::function<void ()>, std::optional<Envoy::Thread::Options> const&) (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x49b73af)
    #2 0x560153677dea in Envoy::Thread::ThreadFactoryImplPosix::createThread(std::function<void ()>, std::optional<Envoy::Thread::Options> const&) (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x49b8dea)
    #3 0x560151493ce7 in Envoy::Server::WorkerImpl::start(Envoy::Server::GuardDog&, std::function<void ()> const&) (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x27d4ce7)
    #4 0x560152149bc5 in Envoy::Server::ListenerManagerImpl::startWorkers(Envoy::Server::GuardDog&, std::function<void ()>) (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x348abc5)
    #5 0x5601513f755d in Envoy::Server::InstanceImpl::startWorkers() (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x273855d)
    #6 0x56015141ecfa in std::_Function_handler<void (), Envoy::Server::InstanceImpl::run()::{lambda()#1}>::_M_invoke(std::_Any_data const&) (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x275fcfa)
    #7 0x560153369b17 in Envoy::Init::WatcherHandleImpl::ready() const (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x46aab17)
    #8 0x56015335af9e in Envoy::Init::ManagerImpl::onTargetReady(std::basic_string_view<char, std::char_traits<char> >) (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x469bf9e)
    #9 0x560153369b17 in Envoy::Init::WatcherHandleImpl::ready() const (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x46aab17)
    #10 0x56015335f874 in Envoy::Init::TargetImpl::ready() (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x46a0874)
    #11 0x560153369b17 in Envoy::Init::WatcherHandleImpl::ready() const (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x46aab17)
    #12 0x56015335af9e in Envoy::Init::ManagerImpl::onTargetReady(std::basic_string_view<char, std::char_traits<char> >) (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x469bf9e)
    #13 0x560153369b17 in Envoy::Init::WatcherHandleImpl::ready() const (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x46aab17)
    #14 0x56015335fc98 in Envoy::Init::SharedTargetImpl::ready() (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x46a0c98)
    #15 0x560153369b17 in Envoy::Init::WatcherHandleImpl::ready() const (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x46aab17)
    #16 0x56015335af9e in Envoy::Init::ManagerImpl::onTargetReady(std::basic_string_view<char, std::char_traits<char> >) (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x469bf9e)
    #17 0x560153369b17 in Envoy::Init::WatcherHandleImpl::ready() const (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x46aab17)
    #18 0x56015335f874 in Envoy::Init::TargetImpl::ready() (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x46a0874)
    #19 0x5601525ec6fd in Envoy::Router::RdsRouteConfigSubscription::onConfigUpdate(std::vector<std::reference_wrapper<Envoy::Config::DecodedResource>, std::allocator<std::reference_wrapper<Envoy::Config::DecodedResource> > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x392d6fd)
    #20 0x56015261365f in Envoy::Config::GrpcSubscriptionImpl::onConfigUpdate(std::vector<std::reference_wrapper<Envoy::Config::DecodedResource>, std::allocator<std::reference_wrapper<Envoy::Config::DecodedResource> > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x395465f)
    #21 0x56015265036e in Envoy::Config::GrpcMuxImpl::onDiscoveryResponse(std::unique_ptr<envoy::service::discovery::v3::DiscoveryResponse, std::default_delete<envoy::service::discovery::v3::DiscoveryResponse> >&&, Envoy::Config::ControlPlaneStats&) (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x399136e)
    #22 0x560152636005 in Envoy::Grpc::AsyncStreamCallbacks<envoy::service::discovery::v3::DiscoveryResponse>::onReceiveMessageRaw(std::unique_ptr<Envoy::Buffer::Instance, std::default_delete<Envoy::Buffer::Instance> >&&) (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x3977005)
    #23 0x5601526b85b3 in Envoy::Grpc::AsyncStreamImpl::onData(Envoy::Buffer::Instance&, bool) (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x39f95b3)
    #24 0x5601526eb348 in Envoy::Http::AsyncStreamImpl::encodeData(Envoy::Buffer::Instance&, bool) (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x3a2c348)
    #25 0x560152832280 in Envoy::Router::UpstreamRequest::decodeData(Envoy::Buffer::Instance&, bool) (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x3b73280)
    #26 0x56015253ab7e in Envoy::Http::Http2::ConnectionImpl::onFrameReceived(nghttp2_frame const*) (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x387bb7e)
    #27 0x56015253cb24 in Envoy::Http::Http2::ConnectionImpl::Http2Callbacks::Http2Callbacks()::{lambda(nghttp2_session*, nghttp2_frame const*, void*)#7}::_FUN(nghttp2_session*, nghttp2_frame const*, void*) (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x387db24)
    #28 0x560153590567 in session_call_on_frame_received external/com_github_nghttp2_nghttp2/lib/nghttp2_session.c:3299
    #29 0x560153590567 in nghttp2_session_on_data_received external/com_github_nghttp2_nghttp2/lib/nghttp2_session.c:4975
    #30 0x56015359ac58 in session_process_data_frame external/com_github_nghttp2_nghttp2/lib/nghttp2_session.c:4994
    #31 0x56015359ac58 in nghttp2_session_mem_recv external/com_github_nghttp2_nghttp2/lib/nghttp2_session.c:6608
    #32 0x5601525225b8 in Envoy::Http::Http2::ConnectionImpl::dispatch(Envoy::Buffer::Instance&) (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x38635b8)
    #33 0x560151efc2ce in Envoy::Http::CodecClient::onData(Envoy::Buffer::Instance&) (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x323d2ce)
    #34 0x560151efd443 in Envoy::Http::CodecClient::CodecReadFilter::onData(Envoy::Buffer::Instance&, bool) (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x323e443)
    #35 0x5601530b2f18 in Envoy::Network::FilterManagerImpl::onContinueReading(Envoy::Network::FilterManagerImpl::ActiveReadFilter*, Envoy::Network::ReadBufferSource&) (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x43f3f18)
    #36 0x56015309af0a in Envoy::Network::ConnectionImpl::onReadReady() (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x43dbf0a)
    #37 0x5601530a3ff6 in Envoy::Network::ConnectionImpl::onFileEvent(unsigned int) (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x43e4ff6)
    #38 0x5601530107e5 in std::_Function_handler<void (unsigned int), Envoy::Event::DispatcherImpl::createFileEvent(int, std::function<void (unsigned int)>, Envoy::Event::FileTriggerType, unsigned int)::{lambda(unsigned int)#1}>::_M_invoke(std::_Any_data const&, unsigned int&&) (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x43517e5)
    #39 0x560153021e7a in Envoy::Event::FileEventImpl::mergeInjectedEventsAndRunCb(unsigned int) (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x4362e7a)
    #40 0x5601535d6414 in event_process_active_single_queue external/libevent/event.c:1713
    #41 0x5601535d7dae in event_process_active external/libevent/event.c:1805
    #42 0x5601535d7dae in event_base_loop external/libevent/event.c:2047
    #43 0x56015143705d in Envoy::Server::InstanceImpl::run() (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x277805d)
    #44 0x56014ffddf24 in Envoy::MainCommonBase::run() (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x131ef24)
    #45 0x56014fe284fe in main (/path/envoy_proxy/envoy_proxy.runfiles/__main__/path/envoy_proxy+0x11694fe)
    #46 0x7f338ef8300a in __libc_start_main (/usr/path/v3/lib64/libc.so.6+0x2300a)

SUMMARY: AddressSanitizer: heap-use-after-free path/root/bin/../lib/gcc/x86_64-linux-gnu/8.2.0/../../../../include/c++/8.2.0/bits/stl_tree.h:1872 in std::_Rb_tree<google::protobuf::Type const*, std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > >, std::_Select1st<std::pair<google::protobuf::Type const* const, std::map<google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, std::less<google::protobuf::stringpiece_internal::StringPiece>, std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const, google::protobuf::stringpiece_internal::StringPiece> > > > >, std::less<google::protobuf::Type const*>, std
Shadow bytes around the buggy address:
  0x0c1080222060: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c1080222070: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c1080222080: fa fa fa fa 00 00 00 00 00 00 00 00 00 00 03 fa
  0x0c1080222090: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c10802220a0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
=>0x0c10802220b0: fa fa fa fa fd fd fd[fd]fd fd fd fd fd fd fd fa
  0x0c10802220c0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c10802220d0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c10802220e0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c10802220f0: fa fa fa fa 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c1080222100: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07 
  Heap left redzone:       fa
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
==7==ABORTING

Repro steps:
There are no explicit steps to repro, it sometime happens when new configuration (which contains grpc transcoder) applied.
Possibly race condition?

Activity

  1. added
    triage
    on Nov 1, 2021
  2. added
    help wanted
    and removed
    triage
    on Nov 1, 2021
  3. mattklein123 commented on Nov 1, 2021

    @mattklein123
    Member

    cc @lizan @qiwzhang @dio who are more familiar with the transcoding code. I'm not exactly sure what is going on here but it looks like some kind of race condition possibly in the destructor of the TypeInfoForTypeResolver object, possibly exposed by use of this for per-route config?

  4. qiwzhang commented on Nov 1, 2021

    @qiwzhang
    Contributor

    Hmm, it seems something wrong with this destructor,

    When it is trying to destruct this map,

    It may not be a race condition, it seems that freeing and use-after-free are in the same thread [T74] and in the same destructor.

  5. mattklein123 commented on Nov 2, 2021

    @mattklein123
    Member

    @qiwzhang @lizan is JsonTranscoderConfig actually thread safe? I see a lot of stuff in that class that I'm skeptical is thread safe in practice.

  6. mattklein123 commented on Nov 2, 2021

    @mattklein123
    Member

    @belyalov one other option would be try to run a TSAN build instead of an ASAN build. You might hit on the actual problem if it is a thread safety issue.

  7. mattklein123 commented on Nov 2, 2021

    @mattklein123
    Member

    (The other option if course is a bug in the underlying proto/transcoding library, though from the looks of it the issue would be in std::map which I'm very skeptical of.)

  8. qiwzhang commented on Nov 2, 2021

    @qiwzhang
    Contributor

    JsonTranscoderConfig is thread safe after it is created. All its public methods are "const" methods.

    It seems that TypeInfoForTypeResolver is not thread safe. It has this "mutable" map

    Its method is called in the function "JsonTranscoderConfig::createTranscoder" which is called per request. This could be a problem here.

  9. belyalov commented on Nov 2, 2021

    @belyalov
    ContributorAuthor

    @belyalov one other option would be try to run a TSAN build instead of an ASAN build. You might hit on the actual problem if it is a thread safety issue.

    Sure, we'll try it, hopefully it wouldl succeed.

  10. mattklein123 commented on Nov 2, 2021

    @mattklein123
    Member

    Its method is called in the function "JsonTranscoderConfig::createTranscoder" which is called per request. This could be a problem here.

    Yup that was my suspicion also. I think we need locks in here.

  11. qiwzhang commented on Nov 2, 2021

    @qiwzhang
    Contributor

    Is it OK to use a lock in worker thread? I thought it is not allowed in Envoy.

  12. mattklein123 commented on Nov 2, 2021

    @mattklein123
    Member

    Yes we can use a lock if it's needed. The alternative would be to make a copy of the config for each worker.

  13. qiwzhang commented on Nov 2, 2021

    @qiwzhang
    Contributor

    I think we can make type_helper_ inside the JsonTranscoderConfig as thread local, not the whole JsonTranscoderConfig.

  14. belyalov commented on Nov 3, 2021

    @belyalov
    ContributorAuthor

    Update on TSAN build: it is not trivial to run it on our infrastructure.

    BTW, do you need any other help from our side?

  15. mattklein123 commented on Nov 3, 2021

    @mattklein123
    Member

    BTW, do you need any other help from our side?

    I don't think so. I'm pretty sure we know what the problem is. Someone just needs to fix it if you want to help with that. :)

  16. belyalov commented on Nov 4, 2021

    @belyalov
    ContributorAuthor

    Thanks, @mattklein123

    I think I can try to fix it, what I only need it just a bit of understanding how config stuff work.
    IIRC, Envoy workers do not share data, it is all local to worker expect some global configuration.

    Is createRouteSpecificFilterConfigTyped

    Router::RouteSpecificFilterConfigConstSharedPtr
    GrpcJsonTranscoderFilterConfig::createRouteSpecificFilterConfigTyped(
    const envoy::extensions::filters::http::grpc_json_transcoder::v3::GrpcJsonTranscoder&
    proto_config,
    Server::Configuration::ServerFactoryContext& context, ProtobufMessage::ValidationVisitor&) {
    return std::make_shared<JsonTranscoderConfig>(proto_config, context.api());
    }
    considered as global config and being created by main thread, then shared with all works or it is being created by worker thread when instantiating http conn manager (which json config is belongs to)?

    Is there any doc about how configuration is designed?

    Best

  17. mattklein123 commented on Nov 4, 2021

    @mattklein123
    Member

    @belyalov see #18894. If you want to try that patch it will probably fix it.

  18. belyalov commented on Nov 4, 2021

    @belyalov
    ContributorAuthor

    Oh nice, I didn't see that PR was attached before posted a message :)
    Yeah, I'll try it to day and update you guys

  19. belyalov commented on Nov 4, 2021

    @belyalov
    ContributorAuthor

    Okay, fix is deployed the box with repro, will see :)

  20. qiwzhang commented on Nov 4, 2021

    @qiwzhang
    Contributor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions