Skip to content
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

example apps: disable interface binding #2456

Merged
merged 1 commit into from
Aug 9, 2022

Conversation

Augustyniak
Copy link
Contributor

@Augustyniak Augustyniak commented Aug 4, 2022

Description: Disable interface binding in Android Kotlin example app as we have no clear plans for enabling interface binding anytime soon and having it disabled makes debugging of the example app (and Envoy Mobile) easier. On top of that, the same feature is not enabled in iOS example apps.
Risk Level: None, example app change only.
Testing: Example app run manually.
Docs Changes: N/A
Release Notes: N/A

Signed-off-by: Rafal Augustyniak [email protected]

@Augustyniak
Copy link
Contributor Author

Augustyniak commented Aug 4, 2022

There is a crash that I saw when running an example app with interface binding and proxy code from #2416 enabled.

Crash happens because an instance of SrcAddrSocketOptionImpl becomes NULL. The NULL values comes most probably from the return value of the following method that was implemented for interface binding feature specifically:

InterfacePair ConnectivityManager::getActiveAlternateInterface(envoy_network_t network,
unsigned short family) {
// Attempt to derive an active interface that differs from the passed network parameter.
if (network == ENVOY_NET_WWAN) {
// Network is cellular, so look for a WiFi interface.
// WiFi should always support multicast, and will not be point-to-point.
auto interfaces =
enumerateInterfaces(family, IFF_UP | IFF_MULTICAST, IFF_LOOPBACK | IFF_POINTOPOINT);
for (const auto& interface : interfaces) {
// Look for interface with name that matches the expected prefix.
// TODO(goaway): This is quite brittle. It would be an improvement to:
// 1) Improve the scoping via flags.
// 2) Prioritize interfaces by prefix instead of simply filtering them.
if (absl::StartsWith(std::get<const std::string>(interface), WlanPrefix)) {
return interface;
}
}
} else if (network == ENVOY_NET_WLAN) {
// Network is WiFi, so look for a cellular interface.
// Cellular networks should be point-to-point.
auto interfaces = enumerateInterfaces(family, IFF_UP | IFF_POINTOPOINT, IFF_LOOPBACK);
for (const auto& interface : interfaces) {
// Look for interface with name that matches the expected prefix.
// TODO(goaway): This is quite brittle. It would be an improvement to:
// 1) Improve the scoping via flags.
// 2) Prioritize interfaces by prefix instead of simply filtering them.
if (absl::StartsWith(std::get<const std::string>(interface), WwanPrefix)) {
return interface;
}
}
}
return std::make_pair("", nullptr);

Full crash stacktrace:

* thread #24, name = 'EnvoyMain', stop reason = breakpoint 4.1
  * frame #0: 0x000000738c24b58c libart.so`art_sigsegv_fault
    frame #1: 0x000000738c24b3f8 libart.so`art::FaultManager::HandleFault(int, siginfo*, void*) + 240
    frame #2: 0x000000768e808328 libsigchain.so`art::SignalChain::Handler(int, siginfo*, void*) + 668
    frame #3: 0x00000076a4c8089c [vdso]
    frame #4: 0x0000007301abc690 libenvoy_jni.so`Envoy::Network::SrcAddrSocketOptionImpl::hashKey(this=0x0000000000000000, key=size=0) const at src_addr_socket_option_impl.cc:39:7
    frame #5: 0x0000007301abd8c4 libenvoy_jni.so`Envoy::Network::AddrFamilyAwareSocketOptionImpl::hashKey(this=0x00000073bf1666a8, hash_key=size=1) const at addr_family_aware_socket_option_impl.h:41:19
    frame #6: 0x00000073000d44a0 libenvoy_jni.so`Envoy::Upstream::ClusterManagerImpl::ThreadLocalClusterManagerImpl::ClusterEntry::httpConnPoolImpl(this=0x000000743ee635f0, priority=Default, downstream_protocol= Has Value=true , context=0x000000745ee5a770, peek=false) at cluster_manager_impl.cc:1686:13
    frame #7: 0x00000073000d3e2c libenvoy_jni.so`Envoy::Upstream::ClusterManagerImpl::ThreadLocalClusterManagerImpl::ClusterEntry::httpConnPool(this=0x000000743ee635f0, priority=Default, protocol= Has Value=true , context=0x000000745ee5a770) at cluster_manager_impl.cc:973:15
    frame #8: 0x0000007301653dd8 libenvoy_jni.so`Envoy::Extensions::Upstreams::Http::Http::HttpConnPool::HttpConnPool(this=0x00000073fee82300, thread_local_cluster=0x000000743ee635f0, is_connect=false, route_entry=0x00000073deeb4248, downstream_protocol= Has Value=true , ctx=0x000000745ee5a770) at upstream_request.h:30:30
    frame #9: 0x0000007301651eb4 libenvoy_jni.so`std::__ndk1::__unique_if<Envoy::Extensions::Upstreams::Http::Http::HttpConnPool>::__unique_single std::__ndk1::make_unique<Envoy::Extensions::Upstreams::Http::Http::HttpConnPool, Envoy::Upstream::ThreadLocalCluster&, bool&, Envoy::Router::RouteEntry const&, std::__ndk1::optional<Envoy::Http::Protocol>&, Envoy::Upstream::LoadBalancerContext*&>(__args=0x000000743ee635f0, __args=0x00000073722694bc, __args=0x00000073deeb4248, __args= Has Value=true , __args=0x00000073722694b0) at memory:3003:32
    frame #10: 0x0000007301651960 libenvoy_jni.so`Envoy::Extensions::Upstreams::Http::Generic::GenericGenericConnPoolFactory::createGenericConnPool(this=0x00000073059313a8, thread_local_cluster=0x000000743ee635f0, is_connect=false, route_entry=0x00000073deeb4248, downstream_protocol= Has Value=true , ctx=0x000000745ee5a770) const at config.cc:22:14
    frame #11: 0x00000073016669d0 libenvoy_jni.so`Envoy::Router::Filter::createConnPool(this=0x000000745ee5a770, thread_local_cluster=0x000000743ee635f0) at router.cc:722:19
    frame #12: 0x0000007301664cd4 libenvoy_jni.so`Envoy::Router::Filter::decodeHeaders(this=0x000000745ee5a770, headers=0x000000746ee883b0, end_stream=true) at router.cc:580:56
    frame #13: 0x0000007300c144b4 libenvoy_jni.so`Envoy::Http::ActiveStreamDecoderFilter::decodeHeaders(this=0x000000740eeb96b0, headers=0x000000746ee883b0, end_stream=true) at filter_manager.h:243:43
    frame #14: 0x0000007300be5df4 libenvoy_jni.so`Envoy::Http::FilterManager::decodeHeaders(this=0x000000749ee55d58, filter=0x0000000000000000, headers=0x000000746ee883b0, end_stream=true) at filter_manager.cc:511:44
    frame #15: 0x0000007300bbcb4c libenvoy_jni.so`Envoy::Http::FilterManager::decodeHeaders(this=0x000000749ee55d58, headers=0x000000746ee883b0, end_stream=true) at filter_manager.h:721:5
    frame #16: 0x0000007300b9d098 libenvoy_jni.so`Envoy::Http::ConnectionManagerImpl::ActiveStream::decodeHeaders(this=0x000000749ee55ce0, headers=nullptr, end_stream=true) at conn_manager_impl.cc:1135:19
    frame #17: 0x0000007300b9dc70 libenvoy_jni.so`non-virtual thunk to Envoy::Http::ConnectionManagerImpl::ActiveStream::decodeHeaders(this=0x000000749ee55ce0, headers=nullptr, end_stream=true) at conn_manager_impl.cc:0
    frame #18: 0x00000073008b0f24 libenvoy_jni.so`Envoy::Http::Client::sendHeaders(this=0x000000742ee77050, stream=16, headers=envoy_headers @ 0x000000737226d610, end_stream=true) at client.cc:510:38
    frame #19: 0x00000072ffd2e2c0 libenvoy_jni.so`void send_headers::$_1::operator(this=0x00000073bf16e498, engine=0x000000742ee5cfd0)<Envoy::Engine>(Envoy::Engine&) const at main_interface.cc:32:29
    frame #20: 0x00000072ffd2e21c libenvoy_jni.so`decltype(__f=0x00000073bf16e498, __args=0x000000742ee5cfd0)(std::__ndk1::forward<Envoy::Engine&>(fp0))) std::__ndk1::__invoke<send_headers::$_1&, Envoy::Engine&>(send_headers::$_1&, Envoy::Engine&) at type_traits:3501:1
    frame #21: 0x00000072ffd2e1ac libenvoy_jni.so`void std::__ndk1::__invoke_void_return_wrapper<void>::__call<send_headers::$_1&, Envoy::Engine&>(__args=0x00000073bf16e498, __args=0x000000742ee5cfd0) at __functional_base:348:9
    frame #22: 0x00000072ffd2e160 libenvoy_jni.so`std::__ndk1::__function::__alloc_func<send_headers::$_1, std::__ndk1::allocator<send_headers::$_1>, void (Envoy::Engine&)>::operator(this=0x00000073bf16e498, __arg=0x000000742ee5cfd0)(Envoy::Engine&) at functional:1540:16
    frame #23: 0x00000072ffd2d080 libenvoy_jni.so`std::__ndk1::__function::__func<send_headers::$_1, std::__ndk1::allocator<send_headers::$_1>, void (Envoy::Engine&)>::operator(this=0x00000073bf16e490, __arg=0x000000742ee5cfd0)(Envoy::Engine&) at functional:1714:12
    frame #24: 0x00000072ffd262a8 libenvoy_jni.so`std::__ndk1::__function::__value_func<void (Envoy::Engine&)>::operator(this=0x00000073deeb45b0, __args=0x000000742ee5cfd0)(Envoy::Engine&) const at functional:1867:16
    frame #25: 0x00000072ffd26238 libenvoy_jni.so`std::__ndk1::function<void (Envoy::Engine&)>::operator(this=0x00000073deeb45b0, __arg=0x000000742ee5cfd0)(Envoy::Engine&) const at functional:2473:12
    frame #26: 0x00000072ffd25ea0 libenvoy_jni.so`Envoy::EngineHandle::runOnEngineDispatcher(this=0x00000073deeb45a0)>)::$_0::operator()() const at engine_handle.cc:8:57
    frame #27: 0x00000072ffd25e5c libenvoy_jni.so`decltype(__f=0x00000073deeb45a0)>)::$_0&>(fp)()) std::__ndk1::__invoke<Envoy::EngineHandle::runOnEngineDispatcher(long, std::__ndk1::function<void (Envoy::Engine&)>)::$_0&>(Envoy::EngineHandle::runOnEngineDispatcher(long, std::__ndk1::function<void (Envoy::Engine&)>)::$_0&) at type_traits:3501:1
    frame #28: 0x00000072ffd25e10 libenvoy_jni.so`void std::__ndk1::__invoke_void_return_wrapper<void>::__call<Envoy::EngineHandle::runOnEngineDispatcher(__args=0x00000073deeb45a0)>)::$_0&>(Envoy::EngineHandle::runOnEngineDispatcher(long, std::__ndk1::function<void (Envoy::Engine&)>)::$_0&) at __functional_base:348:9
    frame #29: 0x00000072ffd25de8 libenvoy_jni.so`std::__ndk1::__function::__alloc_func<Envoy::EngineHandle::runOnEngineDispatcher(long, std::__ndk1::function<void (Envoy::Engine&)>)::$_0, std::__ndk1::allocator<Envoy::EngineHandle::runOnEngineDispatcher(long, std::__ndk1::function<void (Envoy::Engine&)>)::$_0>, void ()>::operator(this=0x00000073deeb45a0)() at functional:1540:16
    frame #30: 0x00000072ffd24ba4 libenvoy_jni.so`std::__ndk1::__function::__func<Envoy::EngineHandle::runOnEngineDispatcher(long, std::__ndk1::function<void (Envoy::Engine&)>)::$_0, std::__ndk1::allocator<Envoy::EngineHandle::runOnEngineDispatcher(long, std::__ndk1::function<void (Envoy::Engine&)>)::$_0>, void ()>::operator(this=0x00000073deeb4590)() at functional:1714:12
    frame #31: 0x00000072ffe18700 libenvoy_jni.so`std::__ndk1::__function::__value_func<void ()>::operator(this=0x00000073cee7fed0)() const at functional:1867:16
    frame #32: 0x00000072ffe18400 libenvoy_jni.so`std::__ndk1::function<void ()>::operator(this=0x00000073cee7fed0)() const at functional:2473:12
    frame #33: 0x00000073015649ec libenvoy_jni.so`Envoy::Event::DispatcherImpl::runPostCallbacks(this=0x000000747ee2ccf0) at dispatcher_impl.cc:379:5
    frame #34: 0x000000730156da60 libenvoy_jni.so`Envoy::Event::DispatcherImpl::DispatcherImpl(this=0x000000741ee19198)> const&, std::__ndk1::shared_ptr<Envoy::Buffer::WatermarkFactory> const&)::$_3::operator()() const at dispatcher_impl.cc:80:77
    frame #35: 0x000000730156da24 libenvoy_jni.so`decltype(__f=0x000000741ee19198)> const&, std::__ndk1::shared_ptr<Envoy::Buffer::WatermarkFactory> const&)::$_3&>(fp)()) std::__ndk1::__invoke<Envoy::Event::DispatcherImpl::DispatcherImpl(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const&, Envoy::Thread::ThreadFactory&, Envoy::TimeSource&, Envoy::Random::RandomGenerator&, Envoy::Filesystem::Instance&, Envoy::Event::TimeSystem&, std::__ndk1::function<std::__ndk1::unique_ptr<Envoy::Event::ScaledRangeTimerManager, std::__ndk1::default_delete<Envoy::Event::ScaledRangeTimerManager> > (Envoy::Event::Dispatcher&)> const&, std::__ndk1::shared_ptr<Envoy::Buffer::WatermarkFactory> const&)::$_3&>(Envoy::Event::DispatcherImpl::DispatcherImpl(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const&, Envoy::Thread::ThreadFactory&, Envoy::TimeSource&, Envoy::Random::RandomGenerator&, Envoy::Filesystem::Instance&, Envoy::Event::TimeSystem&, std::__ndk1::function<std::__ndk1::unique_ptr<Envoy::Event::ScaledRangeTimerManager, std::__ndk1::default_delete<Envoy::Event::ScaledRangeTimerManager> > (Envoy::Event::Dispatcher&)> const&, std::__ndk1::shared_ptr<Envoy::Buffer::WatermarkFactory> const&)::$_3&) at type_traits:3501:1
    frame #36: 0x000000730156d9d8 libenvoy_jni.so`void std::__ndk1::__invoke_void_return_wrapper<void>::__call<Envoy::Event::DispatcherImpl::DispatcherImpl(__args=0x000000741ee19198)> const&, std::__ndk1::shared_ptr<Envoy::Buffer::WatermarkFactory> const&)::$_3&>(Envoy::Event::DispatcherImpl::DispatcherImpl(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const&, Envoy::Thread::ThreadFactory&, Envoy::TimeSource&, Envoy::Random::RandomGenerator&, Envoy::Filesystem::Instance&, Envoy::Event::TimeSystem&, std::__ndk1::function<std::__ndk1::unique_ptr<Envoy::Event::ScaledRangeTimerManager, std::__ndk1::default_delete<Envoy::Event::ScaledRangeTimerManager> > (Envoy::Event::Dispatcher&)> const&, std::__ndk1::shared_ptr<Envoy::Buffer::WatermarkFactory> const&)::$_3&) at __functional_base:348:9
    frame #37: 0x000000730156d9b0 libenvoy_jni.so`std::__ndk1::__function::__alloc_func<Envoy::Event::DispatcherImpl::DispatcherImpl(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const&, Envoy::Thread::ThreadFactory&, Envoy::TimeSource&, Envoy::Random::RandomGenerator&, Envoy::Filesystem::Instance&, Envoy::Event::TimeSystem&, std::__ndk1::function<std::__ndk1::unique_ptr<Envoy::Event::ScaledRangeTimerManager, std::__ndk1::default_delete<Envoy::Event::ScaledRangeTimerManager> > (Envoy::Event::Dispatcher&)> const&, std::__ndk1::shared_ptr<Envoy::Buffer::WatermarkFactory> const&)::$_3, std::__ndk1::allocator<Envoy::Event::DispatcherImpl::DispatcherImpl(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const&, Envoy::Thread::ThreadFactory&, Envoy::TimeSource&, Envoy::Random::RandomGenerator&, Envoy::Filesystem::Instance&, Envoy::Event::TimeSystem&, std::__ndk1::function<std::__ndk1::unique_ptr<Envoy::Event::ScaledRangeTimerManager, std::__ndk1::default_delete<Envoy::Event::ScaledRangeTimerManager> > (Envoy::Event::Dispatcher&)> const&, std::__ndk1::shared_ptr<Envoy::Buffer::WatermarkFactory> const&)::$_3>, void ()>::operator(this=0x000000741ee19198)() at functional:1540:16
    frame #38: 0x000000730156c6f4 libenvoy_jni.so`std::__ndk1::__function::__func<Envoy::Event::DispatcherImpl::DispatcherImpl(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const&, Envoy::Thread::ThreadFactory&, Envoy::TimeSource&, Envoy::Random::RandomGenerator&, Envoy::Filesystem::Instance&, Envoy::Event::TimeSystem&, std::__ndk1::function<std::__ndk1::unique_ptr<Envoy::Event::ScaledRangeTimerManager, std::__ndk1::default_delete<Envoy::Event::ScaledRangeTimerManager> > (Envoy::Event::Dispatcher&)> const&, std::__ndk1::shared_ptr<Envoy::Buffer::WatermarkFactory> const&)::$_3, std::__ndk1::allocator<Envoy::Event::DispatcherImpl::DispatcherImpl(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const&, Envoy::Thread::ThreadFactory&, Envoy::TimeSource&, Envoy::Random::RandomGenerator&, Envoy::Filesystem::Instance&, Envoy::Event::TimeSystem&, std::__ndk1::function<std::__ndk1::unique_ptr<Envoy::Event::ScaledRangeTimerManager, std::__ndk1::default_delete<Envoy::Event::ScaledRangeTimerManager> > (Envoy::Event::Dispatcher&)> const&, std::__ndk1::shared_ptr<Envoy::Buffer::WatermarkFactory> const&)::$_3>, void ()>::operator(this=0x000000741ee19190)() at functional:1714:12
    frame #39: 0x00000072ffe18700 libenvoy_jni.so`std::__ndk1::__function::__value_func<void ()>::operator(this=0x000000741ee19190)() const at functional:1867:16
    frame #40: 0x00000072ffe18400 libenvoy_jni.so`std::__ndk1::function<void ()>::operator(this=0x000000741ee19190)() const at functional:2473:12
    frame #41: 0x0000007301c1dac0 libenvoy_jni.so`Envoy::Event::SchedulableCallbackImpl::SchedulableCallbackImpl(this=0x0000007301c1da54, (null)=-1, (null)=1, arg=0x000000741ee19110)>&, std::__ndk1::function<void ()>)::$_0::operator()(int, short, void*) const at schedulable_cb_impl.cc:14:3
    frame #42: 0x0000007301c1da80 libenvoy_jni.so`Envoy::Event::SchedulableCallbackImpl::SchedulableCallbackImpl((null)=-1, (null)=1, arg=0x000000741ee19110)>&, std::__ndk1::function<void ()>)::$_0::__invoke(int, short, void*) at schedulable_cb_impl.cc:14:3
    frame #43: 0x0000007301ccdd14 libenvoy_jni.so`event_process_active_single_queue(base=0x000000747ee30530, activeq=0x000000739ee28070, max_to_process=2147483647, endtime=0x0000000000000000) at event.c:1713:4
    frame #44: 0x0000007301cc8200 libenvoy_jni.so`event_process_active(base=0x000000747ee30530) at event.c:1805:9
    frame #45: 0x0000007301cc7048 libenvoy_jni.so`event_base_loop(base=0x000000747ee30530, flags=0) at event.c:2047:12
    frame #46: 0x0000007301c1b91c libenvoy_jni.so`Envoy::Event::LibeventScheduler::run(this=0x000000747ee2cd80, mode=Block) at libevent_scheduler.cc:60:3
    frame #47: 0x00000073015645e8 libenvoy_jni.so`Envoy::Event::DispatcherImpl::run(this=0x000000747ee2ccf0, type=Block) at dispatcher_impl.cc:299:19
    frame #48: 0x00000072fff1694c libenvoy_jni.so`Envoy::Server::InstanceImpl::run(this=0x000000751f00a310) at server.cc:908:16
    frame #49: 0x00000072ffd4a220 libenvoy_jni.so`Envoy::MainCommonBase::run(this=0x00000074aee2c5e0) at main_common.cc:173:14
    frame #50: 0x00000072ffca1ddc libenvoy_jni.so`Envoy::EngineCommon::run(this=0x00000074aee2c140) at engine_common.h:26:29
    frame #51: 0x00000072ffc9464c libenvoy_jni.so`Envoy::Engine::main(this=0x000000742ee5cfd0, config="!ignore platform_defs:\n- &connect_timeout 30s\n- &dns_fail_base_interval 2s\n- &dns_fail_max_interval 10s\n- &dns_query_timeout 25s\n- &dns_min_refresh_rate 60s\n- &dns_preresolve_hostnames []\n- &dns_lookup_family ALL\n- &dns_multiple_addresses true\n- &h2_delay_keepalive_timeout false\n- &dns_resolver_name envoy.network.dns_resolver.cares\n- &dns_refresh_rate 60s\n- &dns_resolver_config {\"@type\":\"type.googleapis.com/envoy.extensions.network.dns_resolver.cares.v3.CaresDnsResolverConfig\",\"resolvers\":[],\"use_resolvers_as_fallback\": false, \"filter_unroutable_families\": true}\n- &enable_drain_post_dns_refresh false\n- &enable_interface_binding true\n- &force_ipv6 false\n- &h2_connection_keepalive_idle_interval 0.001s\n- &h2_connection_keepalive_timeout 10s\n- &h2_raw_domains []\n- &max_connections_per_host 7\n- &stream_idle_timeout 15s\n- &per_try_idle_timeout 15s\n- &metadata { device_os: Android, app_version: unspecified, app_id: unspecified }\n- &trust_chain_verification VERIFY_TRUST_CHAIN\n- &virtual_clusters []\n\n!ignore local_err"..., log_level="debug", admin_address_path="") at engine.cc:136:35
    frame #52: 0x00000072ffd15b78 libenvoy_jni.so`decltype(__f=0x00000073fee454c8, __a0=0x00000073fee454d8, __args="", __args="", __args="")).*fp(std::__ndk1::forward<std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > >(fp1), std::__ndk1::forward<std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > >(fp1), std::__ndk1::forward<std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > >(fp1))) std::__ndk1::__invoke<envoy_status_t (Envoy::Engine::*)(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >), Envoy::Engine*, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >, void>(envoy_status_t (Envoy::Engine::*&&)(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >), Envoy::Engine*&&, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >&&, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >&&, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >&&) at type_traits:3442:1
    frame #53: 0x00000072ffd159f8 libenvoy_jni.so`void std::__ndk1::__thread_execute<std::__ndk1::unique_ptr<std::__ndk1::__thread_struct, std::__ndk1::default_delete<std::__ndk1::__thread_struct> >, envoy_status_t (Envoy::Engine::*)(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >), Envoy::Engine*, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >, 2ul, 3ul, 4ul, 5ul>(__t=size=6, (null)=__tuple_indices<2, 3, 4, 5> @ 0x000000737226ebdf)(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >), Envoy::Engine*, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > >&, std::__ndk1::__tuple_indices<2ul, 3ul, 4ul, 5ul>) at thread:273:5
    frame #54: 0x00000072ffd1511c libenvoy_jni.so`void* std::__ndk1::__thread_proxy<std::__ndk1::tuple<std::__ndk1::unique_ptr<std::__ndk1::__thread_struct, std::__ndk1::default_delete<std::__ndk1::__thread_struct> >, envoy_status_t (Envoy::Engine::*)(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >), Envoy::Engine*, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > > >(__vp=0x00000073fee454c0) at thread:283:5
    frame #55: 0x0000007688558e98 libc.so`__pthread_start(void*) + 268
    frame #56: 0x00000076884f54b4 libc.so`__start_thread + 72

@Augustyniak
Copy link
Contributor Author

Re. crash mentioned above - it turns out that it's not interface binding fault that the app was crashing for me. More about this in #2457. TL;DR is that I was compiling the app using --config=dbg which did not include --define=include_ifaddrs=true which is required for proper functioning of interface binding.

Augustyniak added a commit that referenced this pull request Aug 5, 2022
Description: After finding an interface binding related crash in #2456 I noticed that our `dbg`  bazel config does not specify `--define=include_ifaddrs=true` which is supposed to ensure that we compile code that's required for proper functioning of Envoy Mobile on Android. Introduce `dbg-android` and `dbg-ios` which are intended to be platform specific `dbg` configurations.
Risk Level: None, does not impact release configurations.
Testing: Ran Kotlin example app manually.
Docs Changes: N/A
Release Notes: N/A

Signed-off-by: Rafal Augustyniak <[email protected]>
@Augustyniak Augustyniak requested review from jpsim and goaway August 5, 2022 18:23
@Augustyniak Augustyniak merged commit b20191a into main Aug 9, 2022
@Augustyniak Augustyniak deleted the disable-interface-binding-in-example-app branch August 9, 2022 21:25
jpsim pushed a commit to envoyproxy/envoy that referenced this pull request Nov 29, 2022
Description: After finding an interface binding related crash in envoyproxy/envoy-mobile#2456 I noticed that our `dbg`  bazel config does not specify `--define=include_ifaddrs=true` which is supposed to ensure that we compile code that's required for proper functioning of Envoy Mobile on Android. Introduce `dbg-android` and `dbg-ios` which are intended to be platform specific `dbg` configurations.
Risk Level: None, does not impact release configurations.
Testing: Ran Kotlin example app manually.
Docs Changes: N/A
Release Notes: N/A

Signed-off-by: Rafal Augustyniak <[email protected]>
Signed-off-by: JP Simard <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants