Repository navigation
Closed
Description
DESCRIPTION
We are reporting a segmentation fault occuring with Envoy 1.14.1, in a situation where successive configuration updates are sent via xDS, successively adding/removing aggregate clusters. This could be related to the respective draining listener routes which reference these aggregate clusters.
Here is the full dump stack after troubleshooting with debug symbols binary :
sh-4.4$ gdb /usr/local/bin/envoy /tmp/core.11.11781.1594290271.envoy
GNU gdb (GDB) Red Hat Enterprise Linux 8.2-11.el8
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/local/bin/envoy...done.
warning: exec file is newer than core file.
[New LWP 31]
[New LWP 13]
[New LWP 15]
[New LWP 28]
[New LWP 36]
[New LWP 21]
[New LWP 32]
[New LWP 23]
[New LWP 16]
[New LWP 12]
[New LWP 14]
[New LWP 27]
[New LWP 18]
[New LWP 29]
[New LWP 42]
[New LWP 17]
[New LWP 24]
[New LWP 30]
[New LWP 41]
[New LWP 37]
[New LWP 33]
[New LWP 35]
[New LWP 26]
[New LWP 22]
[New LWP 34]
[New LWP 39]
[New LWP 38]
[New LWP 11]
[New LWP 19]
[New LWP 40]
[New LWP 25]
[New LWP 20]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `/usr/local/bin/envoy -l info --log-path /mnt/log/envoyfifo --log-format [%l][%n'.
Program terminated with signal SIGABRT, Aborted.
#0 0x00007ff78c36670f in raise () from /lib64/libc.so.6
[Current thread is 1 (Thread 0x7ff78231a700 (LWP 31))]
Missing separate debuginfos, use: yum debuginfo-install cesp-envoy-debug-1.14.1-3.x86_64
(gdb) bt
#0 0x00007ff78c36670f in raise () from /lib64/libc.so.6
#1 0x00007ff78c350b25 in abort () from /lib64/libc.so.6
#2 0x000055db05b81fac in Envoy::Extensions::Clusters::Aggregate::Cluster::refresh(std::__1::function<bool (std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)> const&)::$_1::operator()() const (this=0x55db0b79d580) at source/extensions/clusters/aggregate/cluster.cc:90
#3 0x000055db05b81dad in std::__1::__invoke<Envoy::Extensions::Clusters::Aggregate::Cluster::refresh(std::__1::function<bool (std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)> const&)::$_1&> (__f=...) at /opt/llvm/bin/../include/c++/v1/type_traits:3530
#4 0x000055db05b81d5d in std::__1::__invoke_void_return_wrapper<void>::__call<Envoy::Extensions::Clusters::Aggregate::Cluster::refresh(std::__1::function<bool (std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)> const&)::$_1&>(Envoy::Extensions::Clusters::Aggregate::Cluster::refresh(std::__1::function<bool (std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)> const&)::$_1&) (__args=...) at /opt/llvm/bin/../include/c++/v1/__functional_base:348
#5 0x000055db05b81d2d in std::__1::__function::__alloc_func<Envoy::Extensions::Clusters::Aggregate::Cluster::refresh(std::__1::function<bool (std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)> const&)::$_1, std::__1::allocator<Envoy::Extensions::Clusters::Aggregate::Cluster::refresh(std::__1::function<bool (std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)> const&)::$_1>, void ()>::operator()() (this=0x55db0b79d580) at /opt/llvm/bin/../include/c++/v1/functional:1533
#6 0x000055db05b80eee in std::__1::__function::__func<Envoy::Extensions::Clusters::Aggregate::Cluster::refresh(std::__1::function<bool (std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)> const&)::$_1, std::__1::allocator<Envoy::Extensions::Clusters::Aggregate::Cluster::refresh(std::__1::function<bool (std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)> const&)::$_1>, void ()>::operator()() (this=0x55db0b79d570) at /opt/llvm/bin/../include/c++/v1/functional:1707
#7 0x000055db05a2f435 in std::__1::__function::__value_func<void ()>::operator()() const (this=0x55db0b350740) at /opt/llvm/bin/../include/c++/v1/functional:1860
#8 0x000055db05a2f0d5 in std::__1::function<void ()>::operator()() const (this=0x55db0b350740) at /opt/llvm/bin/../include/c++/v1/functional:2419
#9 0x000055db075ab6c5 in Envoy::ThreadLocal::InstanceImpl::Bookkeeper::runOnAllThreads(std::__1::function<void ()>)::$_5::operator()() const (this=0x55db0b350740) at source/common/thread_local/thread_local_impl.cc:90
#10 0x000055db075ab68d in std::__1::__invoke<Envoy::ThreadLocal::InstanceImpl::Bookkeeper::runOnAllThreads(std::__1::function<void ()>)::$_5&> (__f=...) at /opt/llvm/bin/../include/c++/v1/type_traits:3530
#11 0x000055db075ab63d in std::__1::__invoke_void_return_wrapper<void>::__call<Envoy::ThreadLocal::InstanceImpl::Bookkeeper::runOnAllThreads(std::__1::function<void ()>)::$_5&>(Envoy::ThreadLocal::InstanceImpl::Bookkeeper::runOnAllThreads(std::__1::function<void ()>)::$_5&) (__args=...) at /opt/llvm/bin/../include/c++/v1/__functional_base:348
#12 0x000055db075ab60d in std::__1::__function::__alloc_func<Envoy::ThreadLocal::InstanceImpl::Bookkeeper::runOnAllThreads(std::__1::function<void ()>)::$_5, std::__1::allocator<Envoy::ThreadLocal::InstanceImpl::Bookkeeper::runOnAllThreads(std::__1::function<void ()>)::$_5>, void ()>::operator()() (this=0x55db0b350740) at /opt/llvm/bin/../include/c++/v1/functional:1533
#13 0x000055db075aa80e in std::__1::__function::__func<Envoy::ThreadLocal::InstanceImpl::Bookkeeper::runOnAllThreads(std::__1::function<void ()>)::$_5, std::__1::allocator<Envoy::ThreadLocal::InstanceImpl::Bookkeeper::runOnAllThreads(std::__1::function<void ()>)::$_5>, void ()>::operator()() (this=0x55db0b350730) at /opt/llvm/bin/../include/c++/v1/functional:1707
#14 0x000055db05a2f435 in std::__1::__function::__value_func<void ()>::operator()() const (this=0x7ff782305d90) at /opt/llvm/bin/../include/c++/v1/functional:1860
#15 0x000055db05a2f0d5 in std::__1::function<void ()>::operator()() const (this=0x7ff782305d90) at /opt/llvm/bin/../include/c++/v1/functional:2419
#16 0x000055db07772a69 in Envoy::Event::DispatcherImpl::runPostCallbacks (this=0x55db0ad68780) at source/common/event/dispatcher_impl.cc:225
#17 0x000055db07775478 in Envoy::Event::DispatcherImpl::DispatcherImpl(std::__1::unique_ptr<Envoy::Buffer::WatermarkFactory, std::__1::default_delete<Envoy::Buffer::WatermarkFactory> >&&, Envoy::Api::Api&, Envoy::Event::TimeSystem&)::$_1::operator()() const (this=0x55db0ad43048) at source/common/event/dispatcher_impl.cc:43
#18 0x000055db0777543d in std::__1::__invoke<Envoy::Event::DispatcherImpl::DispatcherImpl(std::__1::unique_ptr<Envoy::Buffer::WatermarkFactory, std::__1::default_delete<Envoy::Buffer::WatermarkFactory> >&&, Envoy::Api::Api&, Envoy::Event::TimeSystem&)::$_1&> (__f=...) at /opt/llvm/bin/../include/c++/v1/type_traits:3530
#19 0x000055db077753ed in std::__1::__invoke_void_return_wrapper<void>::__call<Envoy::Event::DispatcherImpl::DispatcherImpl(std::__1::unique_ptr<Envoy::Buffer::WatermarkFactory, std::__1::default_delete<Envoy::Buffer::WatermarkFactory> >&&, Envoy::Api::Api&, Envoy::Event::TimeSystem&)::$_1&>(Envoy::Event::DispatcherImpl::DispatcherImpl(std::__1::unique_ptr<Envoy::Buffer::WatermarkFactory, std::__1::default_delete<Envoy::Buffer::WatermarkFactory> >&&, Envoy::Api::Api&, Envoy::Event::TimeSystem&)::$_1&) (__args=...) at /opt/llvm/bin/../include/c++/v1/__functional_base:348
#20 0x000055db077753bd in std::__1::__function::__alloc_func<Envoy::Event::DispatcherImpl::DispatcherImpl(std::__1::unique_ptr<Envoy::Buffer::WatermarkFactory, std::__1::default_delete<Envoy::Buffer::WatermarkFactory> >&&, Envoy::Api::Api&, Envoy::Event::TimeSystem&)::$_1, std::__1::allocator<Envoy::Event::DispatcherImpl::DispatcherImpl(std::__1::unique_ptr<Envoy::Buffer::WatermarkFactory, std::__1::default_delete<Envoy::Buffer::WatermarkFactory> >&&, Envoy::Api::Api&, Envoy::Event::TimeSystem&)::$_1>, void ()>::operator()() (this=0x55db0ad43048) at /opt/llvm/bin/../include/c++/v1/functional:1533
#21 0x000055db0777450e in std::__1::__function::__func<Envoy::Event::DispatcherImpl::DispatcherImpl(std::__1::unique_ptr<Envoy::Buffer::WatermarkFactory, std::__1::default_delete<Envoy::Buffer::WatermarkFactory> >&&, Envoy::Api::Api&, Envoy::Event::TimeSystem&)::$_1, std::__1::allocator<Envoy::Event::DispatcherImpl::DispatcherImpl(std::__1::unique_ptr<Envoy::Buffer::WatermarkFactory, std::__1::default_delete<Envoy::Buffer::WatermarkFactory> >&&, Envoy::Api::Api&, Envoy::Event::TimeSystem&)::$_1>, void ()>::operator()() (this=0x55db0ad43040) at /opt/llvm/bin/../include/c++/v1/functional:1707
#22 0x000055db05a2f435 in std::__1::__function::__value_func<void ()>::operator()() const (this=0x55db0ad43040) at /opt/llvm/bin/../include/c++/v1/functional:1860
#23 0x000055db05a2f0d5 in std::__1::function<void ()>::operator()() const (this=0x55db0ad43040) at /opt/llvm/bin/../include/c++/v1/functional:2419
#24 0x000055db077b1e1d in Envoy::Event::TimerImpl::TimerImpl(Envoy::CSmartPtr<event_base, &event_base_free>&, std::__1::function<void ()>, Envoy::Event::Dispatcher&)::$_0::operator()(int, short, void*) const (this=0xffffffff,
arg=0x55db0ad42fc0) at source/common/event/timer_impl.cc:15
#25 0x000055db077b1dc6 in Envoy::Event::TimerImpl::TimerImpl(Envoy::CSmartPtr<event_base, &event_base_free>&, std::__1::function<void ()>, Envoy::Event::Dispatcher&)::$_0::__invoke(int, short, void*) (arg=0x55db0ad42fc0)
at source/common/event/timer_impl.cc:15
#26 0x000055db08284ca1 in event_process_active_single_queue (base=0x55db0ad6a000, activeq=0x55db0a9aff30, max_to_process=2147483647, endtime=0x0)
at /build/tmp/_bazel_bazel/b570b5ccd0454dc9af9f65ab1833764d/sandbox/processwrapper-sandbox/2467/execroot/envoy/external/com_github_libevent_libevent/event.c:1713
#27 0x000055db0827f39a in event_process_active (base=0x55db0ad6a000)
at /build/tmp/_bazel_bazel/b570b5ccd0454dc9af9f65ab1833764d/sandbox/processwrapper-sandbox/2467/execroot/envoy/external/com_github_libevent_libevent/event.c:1805
#28 0x000055db0827e26c in event_base_loop (base=0x55db0ad6a000, flags=0)
at /build/tmp/_bazel_bazel/b570b5ccd0454dc9af9f65ab1833764d/sandbox/processwrapper-sandbox/2467/execroot/envoy/external/com_github_libevent_libevent/event.c:2047
#29 0x000055db077b0968 in Envoy::Event::LibeventScheduler::run (this=0x55db0ad687d0, mode=Envoy::Event::Dispatcher::RunType::Block) at source/common/event/libevent_scheduler.cc:47
#30 0x000055db0777297a in Envoy::Event::DispatcherImpl::run (this=0x55db0ad68780, type=Envoy::Event::Dispatcher::RunType::Block) at source/common/event/dispatcher_impl.cc:197
--Type <RET> for more, q to quit, c to continue without paging--
#31 0x000055db07748251 in Envoy::Server::WorkerImpl::threadRoutine (this=0x55db0ac82660, guard_dog=...) at source/server/worker_impl.cc:110
#32 0x000055db0774de4c in Envoy::Server::WorkerImpl::start(Envoy::Server::GuardDog&)::$_3::operator()() const (this=0x55db0b703008) at source/server/worker_impl.cc:75
#33 0x000055db0774de0d in std::__1::__invoke<Envoy::Server::WorkerImpl::start(Envoy::Server::GuardDog&)::$_3&> (__f=...) at /opt/llvm/bin/../include/c++/v1/type_traits:3530
#34 0x000055db0774ddbd in std::__1::__invoke_void_return_wrapper<void>::__call<Envoy::Server::WorkerImpl::start(Envoy::Server::GuardDog&)::$_3&>(Envoy::Server::WorkerImpl::start(Envoy::Server::GuardDog&)::$_3&) (__args=...)
at /opt/llvm/bin/../include/c++/v1/__functional_base:348
#35 0x000055db0774dd8d in std::__1::__function::__alloc_func<Envoy::Server::WorkerImpl::start(Envoy::Server::GuardDog&)::$_3, std::__1::allocator<Envoy::Server::WorkerImpl::start(Envoy::Server::GuardDog&)::$_3>, void ()>::operator()() (this=0x55db0b703008) at /opt/llvm/bin/../include/c++/v1/functional:1533
#36 0x000055db0774cebe in std::__1::__function::__func<Envoy::Server::WorkerImpl::start(Envoy::Server::GuardDog&)::$_3, std::__1::allocator<Envoy::Server::WorkerImpl::start(Envoy::Server::GuardDog&)::$_3>, void ()>::operator()()
(this=0x55db0b703000) at /opt/llvm/bin/../include/c++/v1/functional:1707
#37 0x000055db05a2f435 in std::__1::__function::__value_func<void ()>::operator()() const (this=0x55db0b703000) at /opt/llvm/bin/../include/c++/v1/functional:1860
#38 0x000055db05a2f0d5 in std::__1::function<void ()>::operator()() const (this=0x55db0b703000) at /opt/llvm/bin/../include/c++/v1/functional:2419
#39 0x000055db083f99b2 in Envoy::Thread::ThreadImplPosix::ThreadImplPosix(std::__1::function<void ()>)::$_0::operator()(void*) const (this=0x55db0b702ff0, arg=0x55db0b702ff0) at source/common/common/posix/thread_impl.cc:33
#40 0x000055db083f9985 in Envoy::Thread::ThreadImplPosix::ThreadImplPosix(std::__1::function<void ()>)::$_0::__invoke(void*) (arg=0x55db0b702ff0) at source/common/common/posix/thread_impl.cc:32
#41 0x00007ff78c6f92de in start_thread () from /lib64/libpthread.so.0
#42 0x00007ff78c42ae83 in clone () from /lib64/libc.so.6
(gdb)
(gdb)
Thanks for your support
Reacted by Chris Brawn
Activity
snowp commentedon Jul 13, 2020
This seems to be when the aggregate cluster attempts to rebuild its view of the inner clusters, but the TLS cluster for a cluster it cares about doesn't exist:
snowp commentedon Jul 13, 2020
@vinzo99 Would you be able to provide debug logs or a reproducer? That would help the debug process, thanks!
vinzo99 commentedon Jul 17, 2020
Here are the requested logs :
Thanks !
ankatare commentedon Jul 23, 2020
@vinzo99 i would like to take this issue.
cc @htuch
lretrain91 commentedon Jul 30, 2020
hello @ankatare any news about the fix ?
ankatare commentedon Jul 30, 2020
@lretrain91 currently investigating it and will update soon.
ankatare commentedon Jul 30, 2020
@vinzo99 Hi, would you please help me by providing steps to reproduce it.
ankatare commentedon Aug 5, 2020
@snowp please help to reproduce it.
chrikar commentedon Aug 12, 2020
Hello,
From what I've seen on our environment, the main way to reproduce this is to remove and reintroduce an existing aggregate cluster configuration using the CDS (xDS). The crush does not occur immediately after the removal, as envoy is still trying to request what it considers as missing cluster information from the xDS server. The crash occurs during the next subsequent xDS cluster update.
I'm not sure if you also need TLS configured for the cluster, based on the comment of @snowp above.
26 remaining items
vinzo99 commentedon Mar 18, 2021
Hi,
this means the next freeze including that fix will be
v1.17.2, right ?ankatare commentedon Mar 18, 2021
@vanhtuan0409 Hi, could you pls check #15195
zarianec commentedon Mar 18, 2021
We just tested our setup with the latest dev build of envoy and it still crashes.
Version:
How we configure the envoy:
We use filesystem xDS and trigger the changes with:
Static config:
Initial
lds-config.yamlandcds-config.yamlare empty.Add some configs:
cds-config.yaml:lds-config.yaml:We start with the TCP on 3000 port for both cluster and listener.
Let's crash it:
Now we want to listen for UDP so the new
lds-config.yamlis:The result:
ankatare commentedon Mar 18, 2021
@zarianec Would you please try on a version that has that commit. see #15195
zarianec commentedon Mar 18, 2021
@ankatare Isn't it merge to the main branch yet? I tried with the official dev build from main branch and thought it already contains this fix.
https://hub.docker.com/layers/envoyproxy/envoy-dev/2c8f6639ba2fc1b83af5c95115045fb8b1b9fc88/images/sha256-e76cd3baac22315fd44bed20338194a93d73247bbfce0814967bfbeeed893a72?context=explore
ankatare commentedon Mar 18, 2021
@zarianec humm. Ideally it should have merged in main. Let @mattklein123 to check this.
mattklein123 commentedon Mar 18, 2021
OK if it still crashes with the fix it's a different issue. I will try the repro instructions later today.
mattklein123 commentedon Mar 18, 2021
@zarianec can you provide your bootstrap config so there is a self contained repro that I can do?
zarianec commentedon Mar 18, 2021
@mattklein123
/app/envoy/envoy.yaml:And I start it with the command:
No additional flags or anything.
mattklein123 commentedon Mar 18, 2021
OK thanks I will take a look.
mattklein123 commentedon Mar 18, 2021
I'm able to repro this but I'm pretty sure that the issue that @zarianec reports is a different issue than the other crashes which I think are fixed by my other change. I will debug this new config crash.
mattklein123 commentedon Mar 19, 2021
The issue reported by @zarianec is new so I opened #15562 to track that. I'm going to close this issue because I the originally reported crash has been fixed.