Skip to content

Comments

build(deps): bump aio-run-checker from 0.5.1 to 0.5.4 in /tools/base#18

Closed
dependabot[bot] wants to merge 1 commit intomainfrom
dependabot/pip/tools/base/aio-run-checker-0.5.4
Closed

build(deps): bump aio-run-checker from 0.5.1 to 0.5.4 in /tools/base#18
dependabot[bot] wants to merge 1 commit intomainfrom
dependabot/pip/tools/base/aio-run-checker-0.5.4

Conversation

@dependabot
Copy link

@dependabot dependabot bot commented on behalf of github May 16, 2022

Bumps aio-run-checker from 0.5.1 to 0.5.4.

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [aio-run-checker](https://github.com/envoyproxy/pytooling) from 0.5.1 to 0.5.4.
- [Release notes](https://github.com/envoyproxy/pytooling/releases)
- [Commits](https://github.com/envoyproxy/pytooling/commits)

---
updated-dependencies:
- dependency-name: aio-run-checker
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file python Pull requests that update Python code labels May 16, 2022
@dependabot @github
Copy link
Author

dependabot bot commented on behalf of github May 26, 2022

Superseded by #31.

@dependabot dependabot bot closed this May 26, 2022
@dependabot dependabot bot deleted the dependabot/pip/tools/base/aio-run-checker-0.5.4 branch May 26, 2022 16:33
abeyad pushed a commit that referenced this pull request Sep 20, 2022
This test sends a large number of metadata frames in order to trigger a disconnect. However, it was possible for the disconnect to happen and the connection to be torn down before all the metadata frames had been sent. If that happened, ASAN detected a UAF:
```
==95==ERROR: AddressSanitizer: heap-use-after-free on address 0x60700037e5a0 at pc 0x000004811f9e bp 0x7ffc903af990 sp 0x7ffc903af988
READ of size 8 at 0x60700037e5a0 thread T0
    #0 0x4811f9d in Envoy::IntegrationCodecClient::sendMetadata(Envoy::Http::RequestEncoder&, Envoy::Http::MetadataMap) /proc/self/cwd/test/integration/http_integration.cc:168:3
    #1 0x46ed711 in Envoy::Http2FloodMitigationTest_RequestMetadata_Test::TestBody() /proc/self/cwd/test/integration/http2_flood_integration_test.cc:1486:20
    #2 0xd380e64 in void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /proc/self/cwd/external/com_google_googletest/googletest/src/gtest.cc:2580:10
    #3 0xd348dc2 in testing::Test::Run() /proc/self/cwd/external/com_google_googletest/googletest/src/gtest.cc:2655:5
    #4 0xd34a927 in testing::TestInfo::Run() /proc/self/cwd/external/com_google_googletest/googletest/src/gtest.cc:2832:11
    #5 0xd34ccc4 in testing::TestSuite::Run() /proc/self/cwd/external/com_google_googletest/googletest/src/gtest.cc:2986:28
    #6 0xd36f07a in testing::internal::UnitTestImpl::RunAllTests() /proc/self/cwd/external/com_google_googletest/googletest/src/gtest.cc:5697:44
    #7 0xd384e63 in bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /proc/self/cwd/external/com_google_googletest/googletest/src/
gtest.cc:2580:10
    #8 0xd36dd86 in testing::UnitTest::Run() /proc/self/cwd/external/com_google_googletest/googletest/src/gtest.cc:5280:10
    #9 0xa0e53a4 in Envoy::TestRunner::RunTests(int, char**) /proc/self/cwd/external/com_google_googletest/googletest/include/gtest/gtest.h:2485:46
    #10 0xa0e0af7 in main /proc/self/cwd/test/main.cc:34:10
    #11 0x7f442ef69082 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x24082) (BuildId: 1878e6b475720c7c51969e69ab2d276fae6d1dee)
    #12 0x45ed36d in _start (/mnt/ssd/cas/work/1/exec/bazel-out/k8-dbg/bin/test/integration/http2_flood_integration_test.runfiles/envoy/test/integration/http2_flood_integration_test+0x45ed36d)

0x60700037e5a0 is located 48 bytes inside of 80-byte region [0x60700037e570,0x60700037e5c0)
freed by thread T0 here:
    #0 0x466f7d2 in free /local/mnt/workspace/bcain_clang_hu-bcain-lv_22036/final/llvm-project/compiler-rt/lib/asan/asan_malloc_linux.cpp:52:3
    #1 0x831dde8 in Envoy::Http::CodecClient::ActiveRequest::~ActiveRequest() /proc/self/cwd/./source/common/http/codec_client.h:220:10
    #2 0x5aa33f9 in std::__1::unique_ptr<Envoy::Event::DeferredDeletable, std::__1::default_delete<Envoy::Event::DeferredDeletable> >::reset(Envoy::Event::DeferredDeletable*) /opt/llvm/bin/../include/c++/v1/__memory/unique_ptr.h:54:5
    #3 0xa3218e8 in Envoy::Event::DispatcherImpl::clearDeferredDeleteList() /proc/self/cwd/source/common/event/dispatcher_impl.cc:142:21
    #4 0xa3348df in void std::__1::__invoke_void_return_wrapper<void, true>::__call<Envoy::Event::DispatcherImpl::DispatcherImpl(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, Envoy::Thread::ThreadFactory&, Envoy::TimeSource&
, Envoy::Random::RandomGenerator&, Envoy::Filesystem::Instance&, Envoy::Event::TimeSystem&, std::__1::function<std::__1::unique_ptr<Envoy::Event::ScaledRangeTimerManager, std::__1::default_delete<Envoy::Event::ScaledRangeTimerManager> > (Envoy::Event::Dispatcher&)> const&
, std::__1::shared_ptr<Envoy::Buffer::WatermarkFactory> const&)::$_2&>(Envoy::Event::DispatcherImpl::DispatcherImpl(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, Envoy::Thread::ThreadFactory&, Envoy::TimeSource&, Envoy::Rand
om::RandomGenerator&, Envoy::Filesystem::Instance&, Envoy::Event::TimeSystem&, std::__1::function<std::__1::unique_ptr<Envoy::Event::ScaledRangeTimerManager, std::__1::default_delete<Envoy::Event::ScaledRangeTimerManager> > (Envoy::Event::Dispatcher&)> const&, std::__1::s
hared_ptr<Envoy::Buffer::WatermarkFactory> const&)::$_2&) /proc/self/cwd/source/common/event/dispatcher_impl.cc:79:30
    #5 0xa334603 in std::__1::__function::__func<Envoy::Event::DispatcherImpl::DispatcherImpl(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, Envoy::Thread::ThreadFactory&, Envoy::TimeSource&, Envoy::Random::RandomGenerator&,
Envoy::Filesystem::Instance&, Envoy::Event::TimeSystem&, std::__1::function<std::__1::unique_ptr<Envoy::Event::ScaledRangeTimerManager, std::__1::default_delete<Envoy::Event::ScaledRangeTimerManager> > (Envoy::Event::Dispatcher&)> const&, std::__1::shared_ptr<Envoy::Buffe
r::WatermarkFactory> const&)::$_2, std::__1::allocator<Envoy::Event::DispatcherImpl::DispatcherImpl(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, Envoy::Thread::ThreadFactory&, Envoy::TimeSource&, Envoy::Random::RandomGenera
tor&, Envoy::Filesystem::Instance&, Envoy::Event::TimeSystem&, std::__1::function<std::__1::unique_ptr<Envoy::Event::ScaledRangeTimerManager, std::__1::default_delete<Envoy::Event::ScaledRangeTimerManager> > (Envoy::Event::Dispatcher&)> const&, std::__1::shared_ptr<Envoy:
:Buffer::WatermarkFactory> const&)::$_2>, void ()>::operator()() /opt/llvm/bin/../include/c++/v1/__functional/function.h:180:16
    #6 0x4897039 in std::__1::__function::__value_func<void ()>::operator()() const /opt/llvm/bin/../include/c++/v1/__functional/function.h:507:16
    #7 0xa8e6aa4 in Envoy::Event::SchedulableCallbackImpl::SchedulableCallbackImpl(Envoy::CSmartPtr<event_base, &(event_base_free)>&, std::__1::function<void ()>)::$_0::__invoke(int, short, void*) /opt/llvm/bin/../include/c++/v1/__functional/function.h:1184:12
    #8 0xb557c5e in event_process_active_single_queue /mnt/ssd/cas/work/2/exec/external/com_github_libevent_libevent/event.c:1713:4
    #9 0xb539252 in event_process_active /mnt/ssd/cas/work/2/exec/external/com_github_libevent_libevent/event.c
    #10 0xb539252 in event_base_loop /mnt/ssd/cas/work/2/exec/external/com_github_libevent_libevent/event.c:2047:12
    #11 0xa8e1e3c in Envoy::Event::LibeventScheduler::run(Envoy::Event::Dispatcher::RunType) /proc/self/cwd/source/common/event/libevent_scheduler.cc:60:3
    #12 0xa32bd94 in Envoy::Event::DispatcherImpl::run(Envoy::Event::Dispatcher::RunType) /proc/self/cwd/source/common/event/dispatcher_impl.cc:299:19
    #13 0x480faad in Envoy::IntegrationCodecClient::flushWrite() /proc/self/cwd/test/integration/http_integration.cc:100:29
    #14 0x4811e94 in Envoy::IntegrationCodecClient::sendMetadata(Envoy::Http::RequestEncoder&, Envoy::Http::MetadataMap) /proc/self/cwd/test/integration/http_integration.cc:169:3
    #15 0x46ed711 in Envoy::Http2FloodMitigationTest_RequestMetadata_Test::TestBody() /proc/self/cwd/test/integration/http2_flood_integration_test.cc:1486:20
    #16 0xd380e64 in void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /proc/self/cwd/external/com_google_googletest/googletest/src/gtest.cc:2580:10
    #17 0xd348dc2 in testing::Test::Run() /proc/self/cwd/external/com_google_googletest/googletest/src/gtest.cc:2655:5
    #18 0xd34a927 in testing::TestInfo::Run() /proc/self/cwd/external/com_google_googletest/googletest/src/gtest.cc:2832:11
    #19 0xd34ccc4 in testing::TestSuite::Run() /proc/self/cwd/external/com_google_googletest/googletest/src/gtest.cc:2986:28
    #20 0xd36f07a in testing::internal::UnitTestImpl::RunAllTests() /proc/self/cwd/external/com_google_googletest/googletest/src/gtest.cc:5697:44
    #21 0xd384e63 in bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /proc/self/cwd/external/com_google_googletest/googletest/src/gtest.cc:2580:10
    #22 0xd36dd86 in testing::UnitTest::Run() /proc/self/cwd/external/com_google_googletest/googletest/src/gtest.cc:5280:10
    #23 0xa0e53a4 in Envoy::TestRunner::RunTests(int, char**) /proc/self/cwd/external/com_google_googletest/googletest/include/gtest/gtest.h:2485:46
    #24 0xa0e0af7 in main /proc/self/cwd/test/main.cc:34:10
    #25 0x7f442ef69082 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x24082) (BuildId: 1878e6b475720c7c51969e69ab2d276fae6d1dee)
```

To fix that, write all metadata frames at once.

Signed-off-by: Benjamin Peterson <benjamin@engflow.com>
abeyad pushed a commit that referenced this pull request Jan 10, 2024
Commit Message: the probing socket is released when port migration fails. If this happens in response to an incoming packet during an I/O event, the follow socket read could cause use-after-free.

[2024-01-08 16:30:53.386][12][critical][backtrace] [./source/server/backtrace.h:104] Caught Segmentation fault, suspect faulting address 0x0
[2024-01-08 16:30:53.387][12][critical][backtrace] [./source/server/backtrace.h:91] Backtrace (use tools/stack_decode.py to get line numbers):
[2024-01-08 16:30:53.387][12][critical][backtrace] [./source/server/backtrace.h:92] Envoy version: 0/1.29.0-dev/test/DEBUG/BoringSSL
[2024-01-08 16:30:53.413][12][critical][backtrace] [./source/server/backtrace.h:96] #0: Envoy::SignalAction::sigHandler() [0x55bb876d499e]
[2024-01-08 16:30:53.413][12][critical][backtrace] [./source/server/backtrace.h:98] #1: [0x7f55fbf92510]
[2024-01-08 16:30:53.440][12][critical][backtrace] [./source/server/backtrace.h:96] #2: Envoy::Network::Utility::readPacketsFromSocket() [0x55bb875de0ef]
[2024-01-08 16:30:53.466][12][critical][backtrace] [./source/server/backtrace.h:96] #3: Envoy::Quic::EnvoyQuicClientConnection::onFileEvent() [0x55bb8663e1eb]
[2024-01-08 16:30:53.492][12][critical][backtrace] [./source/server/backtrace.h:96] #4: Envoy::Quic::EnvoyQuicClientConnection::setUpConnectionSocket()::$_0::operator()() [0x55bb8663f192]
[2024-01-08 16:30:53.518][12][critical][backtrace] [./source/server/backtrace.h:96] #5: std::__invoke_impl<>() [0x55bb8663f151]
[2024-01-08 16:30:53.544][12][critical][backtrace] [./source/server/backtrace.h:96] #6: std::__invoke_r<>() [0x55bb8663f0e2]
[2024-01-08 16:30:53.569][12][critical][backtrace] [./source/server/backtrace.h:96] #7: std::_Function_handler<>::_M_invoke() [0x55bb8663efc2]
[2024-01-08 16:30:53.595][12][critical][backtrace] [./source/server/backtrace.h:96] #8: std::function<>::operator()() [0x55bb85cb8f44]
[2024-01-08 16:30:53.621][12][critical][backtrace] [./source/server/backtrace.h:96] #9: Envoy::Event::DispatcherImpl::createFileEvent()::$_5::operator()() [0x55bb8722560f]
[2024-01-08 16:30:53.648][12][critical][backtrace] [./source/server/backtrace.h:96] #10: std::__invoke_impl<>() [0x55bb872255c1]
[2024-01-08 16:30:53.674][12][critical][backtrace] [./source/server/backtrace.h:96] #11: std::__invoke_r<>() [0x55bb87225562]
[2024-01-08 16:30:53.700][12][critical][backtrace] [./source/server/backtrace.h:96] #12: std::_Function_handler<>::_M_invoke() [0x55bb872253e2]
[2024-01-08 16:30:53.700][12][critical][backtrace] [./source/server/backtrace.h:96] #13: std::function<>::operator()() [0x55bb85cb8f44]
[2024-01-08 16:30:53.726][12][critical][backtrace] [./source/server/backtrace.h:96] #14: Envoy::Event::FileEventImpl::mergeInjectedEventsAndRunCb() [0x55bb872358ec]
[2024-01-08 16:30:53.752][12][critical][backtrace] [./source/server/backtrace.h:96] #15: Envoy::Event::FileEventImpl::assignEvents()::$_1::operator()() [0x55bb87235ed1]
[2024-01-08 16:30:53.778][12][critical][backtrace] [./source/server/backtrace.h:96] #16: Envoy::Event::FileEventImpl::assignEvents()::$_1::__invoke() [0x55bb87235949]
[2024-01-08 16:30:53.804][12][critical][backtrace] [./source/server/backtrace.h:96] #17: event_persist_closure [0x55bb87fab72b]
[2024-01-08 16:30:53.830][12][critical][backtrace] [./source/server/backtrace.h:96] #18: event_process_active_single_queue [0x55bb87faada2]
[2024-01-08 16:30:53.856][12][critical][backtrace] [./source/server/backtrace.h:96] #19: event_process_active [0x55bb87fa56c8]
[2024-01-08 16:30:53.882][12][critical][backtrace] [./source/server/backtrace.h:96] #20: event_base_loop [0x55bb87fa45cc]
[2024-01-08 16:30:53.908][12][critical][backtrace] [./source/server/backtrace.h:96] #21: Envoy::Event::LibeventScheduler::run() [0x55bb8760a59f]
Risk Level: low
Testing: new unit test
Docs Changes: N/A
Release Notes: Yes
Platform Specific Features: N/A

Signed-off-by: Dan Zhang <danzh@google.com>
Co-authored-by: Dan Zhang <danzh@google.com>
abeyad pushed a commit that referenced this pull request Sep 10, 2024
Fixing asan failures:
```
==16==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 48 byte(s) in 1 object(s) allocated from:
    #0 0x323ecbe in malloc /local/mnt/workspace/bcain_clang_hu-bcain-lv_22036/final/llvm-project/compiler-rt/lib/asan/asan_malloc_linux.cpp:69:3
    #1 0xa58a194 in operator new(unsigned long) (/b/f/w/bazel-out/k8-dbg/bin/test/extensions/geoip_providers/maxmind/geoip_provider_test.runfiles/envoy/test/extensions/geoip_providers/maxmind/geoip_provider_test+0xa58a194)
    #2 0x3348d04 in void std::__1::vector<std::__1::function<absl::lts_20230802::Status (unsigned int)>, std::__1::allocator<std::__1::function<absl::lts_20230802::Status (unsigned int)> > >::__emplace_back_slow_path<std::__1::function<absl::lts_20230802::Status (unsigned int)> >(std::__1::function<absl::lts_20230802::Status (unsigned int)>&&) /opt/llvm/bin/../include/c++/v1/vector:1558:49
    #3 0x3348883 in std::__1::function<absl::lts_20230802::Status (unsigned int)>& std::__1::vector<std::__1::function<absl::lts_20230802::Status (unsigned int)>, std::__1::allocator<std::__1::function<absl::lts_20230802::Status (unsigned int)> > >::emplace_back<std::__1::function<absl::lts_20230802::Status (unsigned int)> >(std::__1::function<absl::lts_20230802::Status (unsigned int)>&&) /opt/llvm/bin/../include/c++/v1/vector:1580:9
    #4 0x3348554 in Envoy::Extensions::GeoipProviders::Maxmind::GeoipProviderTestBase::initializeProvider(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::optional<Envoy::ConditionalInitializer>&)::'lambda'()::operator()() const::'lambda'(std::__1::basic_string_view<char, std::__1::char_traits<char> >, unsigned int, std::__1::function<absl::lts_20230802::Status (unsigned int)>)::operator()(std::__1::basic_string_view<char, std::__1::char_traits<char> >, unsigned int, std::__1::function<absl::lts_20230802::Status (unsigned int)>) const /proc/self/cwd/test/extensions/geoip_providers/maxmind/geoip_provider_test.cc:118:35
    #5 0x334830e in decltype(static_cast<Envoy::Extensions::GeoipProviders::Maxmind::GeoipProviderTestBase::initializeProvider(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::optional<Envoy::ConditionalInitializer>&)::'lambda'()::operator()() const::'lambda'(std::__1::basic_string_view<char, std::__1::char_traits<char> >, unsigned int, std::__1::function<absl::lts_20230802::Status (unsigned int)>)&>(fp)(static_cast<std::__1::basic_string_view<char, std::__1::char_traits<char> >>(fp0), static_cast<unsigned int>(fp0), static_cast<std::__1::function<absl::lts_20230802::Status (unsigned int)>>(fp0))) std::__1::__invoke<Envoy::Extensions::GeoipProviders::Maxmind::GeoipProviderTestBase::initializeProvider(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::optional<Envoy::ConditionalInitializer>&)::'lambda'()::operator()() const::'lambda'(std::__1::basic_string_view<char, std::__1::char_traits<char> >, unsigned int, std::__1::function<absl::lts_20230802::Status (unsigned int)>)&, std::__1::basic_string_view<char, std::__1::char_traits<char> >, unsigned int, std::__1::function<absl::lts_20230802::Status (unsigned int)> >(Envoy::Extensions::GeoipProviders::Maxmind::GeoipProviderTestBase::initializeProvider(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::optional<Envoy::ConditionalInitializer>&)::'lambda'()::operator()() const::'lambda'(std::__1::basic_string_view<char, std::__1::char_traits<char> >, unsigned int, std::__1::function<absl::lts_20230802::Status (unsigned int)>)&, std::__1::basic_string_view<char, std::__1::char_traits<char> >&&, unsigned int&&, std::__1::function<absl::lts_20230802::Status (unsigned int)>&&) /opt/llvm/bin/../include/c++/v1/type_traits:3640:23
    #6 0x33481c5 in absl::lts_20230802::Status std::__1::__invoke_void_return_wrapper<absl::lts_20230802::Status, false>::__call<Envoy::Extensions::GeoipProviders::Maxmind::GeoipProviderTestBase::initializeProvider(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::optional<Envoy::ConditionalInitializer>&)::'lambda'()::operator()() const::'lambda'(std::__1::basic_string_view<char, std::__1::char_traits<char> >, unsigned int, std::__1::function<absl::lts_20230802::Status (unsigned int)>)&, std::__1::basic_string_view<char, std::__1::char_traits<char> >, unsigned int, std::__1::function<absl::lts_20230802::Status (unsigned int)> >(Envoy::Extensions::GeoipProviders::Maxmind::GeoipProviderTestBase::initializeProvider(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::optional<Envoy::ConditionalInitializer>&)::'lambda'()::operator()() const::'lambda'(std::__1::basic_string_view<char, std::__1::char_traits<char> >, unsigned int, std::__1::function<absl::lts_20230802::Status (unsigned int)>)&, std::__1::basic_string_view<char, std::__1::char_traits<char> >&&, unsigned int&&, std::__1::function<absl::lts_20230802::Status (unsigned int)>&&) /opt/llvm/bin/../include/c++/v1/__functional/invoke.h:30:16
    #7 0x334819d in std::__1::__function::__alloc_func<Envoy::Extensions::GeoipProviders::Maxmind::GeoipProviderTestBase::initializeProvider(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::optional<Envoy::ConditionalInitializer>&)::'lambda'()::operator()() const::'lambda'(std::__1::basic_string_view<char, std::__1::char_traits<char> >, unsigned int, std::__1::function<absl::lts_20230802::Status (unsigned int)>), std::__1::allocator<Envoy::Extensions::GeoipProviders::Maxmind::GeoipProviderTestBase::initializeProvider(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::optional<Envoy::ConditionalInitializer>&)::'lambda'()::operator()() const::'lambda'(std::__1::basic_string_view<char, std::__1::char_traits<char> >, unsigned int, std::__1::function<absl::lts_20230802::Status (unsigned int)>)>, absl::lts_20230802::Status (std::__1::basic_string_view<char, std::__1::char_traits<char> >, unsigned int, std::__1::function<absl::lts_20230802::Status (unsigned int)>)>::operator()(std::__1::basic_string_view<char, std::__1::char_traits<char> >&&, unsigned int&&, std::__1::function<absl::lts_20230802::Status (unsigned int)>&&) /opt/llvm/bin/../include/c++/v1/__functional/function.h:180:16
    #8 0x3347993 in std::__1::__function::__func<Envoy::Extensions::GeoipProviders::Maxmind::GeoipProviderTestBase::initializeProvider(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::optional<Envoy::ConditionalInitializer>&)::'lambda'()::operator()() const::'lambda'(std::__1::basic_string_view<char, std::__1::char_traits<char> >, unsigned int, std::__1::function<absl::lts_20230802::Status (unsigned int)>), std::__1::allocator<Envoy::Extensions::GeoipProviders::Maxmind::GeoipProviderTestBase::initializeProvider(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::optional<Envoy::ConditionalInitializer>&)::'lambda'()::operator()() const::'lambda'(std::__1::basic_string_view<char, std::__1::char_traits<char> >, unsigned int, std::__1::function<absl::lts_20230802::Status (unsigned int)>)>, absl::lts_20230802::Status (std::__1::basic_string_view<char, std::__1::char_traits<char> >, unsigned int, std::__1::function<absl::lts_20230802::Status (unsigned int)>)>::operator()(std::__1::basic_string_view<char, std::__1::char_traits<char> >&&, unsigned int&&, std::__1::function<absl::lts_20230802::Status (unsigned int)>&&) /opt/llvm/bin/../include/c++/v1/__functional/function.h:354:12
    #9 0x71758dd in std::__1::__function::__value_func<absl::lts_20230802::Status (std::__1::basic_string_view<char, std::__1::char_traits<char> >, unsigned int, std::__1::function<absl::lts_20230802::Status (unsigned int)>)>::operator()(std::__1::basic_string_view<char, std::__1::char_traits<char> >&&, unsigned int&&, std::__1::function<absl::lts_20230802::Status (unsigned int)>&&) const /opt/llvm/bin/../include/c++/v1/__functional/function.h:507:16
    #10 0x7175738 in std::__1::function<absl::lts_20230802::Status (std::__1::basic_string_view<char, std::__1::char_traits<char> >, unsigned int, std::__1::function<absl::lts_20230802::Status (unsigned int)>)>::operator()(std::__1::basic_string_view<char, std::__1::char_traits<char> >, unsigned int, std::__1::function<absl::lts_20230802::Status (unsigned int)>) const /opt/llvm/bin/../include/c++/v1/__functional/function.h:1184:12
    #11 0x71754e8 in decltype(std::forward<std::__1::function<absl::lts_20230802::Status (std::__1::basic_string_view<char, std::__1::char_traits<char> >, unsigned int, std::__1::function<absl::lts_20230802::Status (unsigned int)>)> const&>(fp)(std::get<0ul>(std::forward<std::__1::tuple<std::__1::basic_string_view<char, std::__1::char_traits<char> >, unsigned int, std::__1::function<absl::lts_20230802::Status (unsigned int)> > >(fp0)), std::get<1ul>(std::forward<std::__1::tuple<std::__1::basic_string_view<char, std::__1::char_traits<char> >, unsigned int, std::__1::function<absl::lts_20230802::Status (unsigned int)> > >(fp0)), std::get<2ul>(std::forward<std::__1::tuple<std::__1::basic_string_view<char, std::__1::char_traits<char> >, unsigned int, std::__1::function<absl::lts_20230802::Status (unsigned int)> > >(fp0)))) testing::internal::ApplyImpl<std::__1::function<absl::lts_20230802::Status (std::__1::basic_string_view<char, std::__1::char_traits<char> >, unsigned int, std::__1::function<absl::lts_20230802::Status (unsigned int)>)> const&, std::__1::tuple<std::__1::basic_string_view<char, std::__1::char_traits<char> >, unsigned int, std::__1::function<absl::lts_20230802::Status (unsigned int)> >, 0ul, 1ul, 2ul>(std::__1::function<absl::lts_20230802::Status (std::__1::basic_string_view<char, std::__1::char_traits<char> >, unsigned int, std::__1::function<absl::lts_20230802::Status (unsigned int)>)> const&, std::__1::tuple<std::__1::basic_string_view<char, std::__1::char_traits<char> >, unsigned int, std::__1::function<absl::lts_20230802::Status (unsigned int)> >&&, testing::internal::IndexSequence<0ul, 1ul, 2ul>) /proc/self/cwd/external/com_google_googletest/googlemock/include/gmock/internal/gmock-internal-utils.h:420:10
    #12 0x7175395 in decltype(ApplyImpl(std::forward<std::__1::function<absl::lts_20230802::Status (std::__1::basic_string_view<char, std::__1::char_traits<char> >, unsigned int, std::__1::function<absl::lts_20230802::Status (unsigned int)>)> const&>(fp), std::forward<std::__1::tuple<std::__1::basic_string_view<char, std::__1::char_traits<char> >, unsigned int, std::__1::function<absl::lts_20230802::Status (unsigned int)> > >(fp0), (testing::internal::MakeIndexSequence<std::tuple_size<std::__1::remove_reference<std::__1::tuple<std::__1::basic_string_view<char, std::__1::char_traits<char> >, unsigned int, std::__1::function<absl::lts_20230802::Status (unsigned int)> > >::type>::value>)())) testing::internal::Apply<std::__1::function<absl::lts_20230802::Status (std::__1::basic_string_view<char, std::__1::char_traits<char> >, unsigned int, std::__1::function<absl::lts_20230802::Status (unsigned int)>)> const&, std::__1::tuple<std::__1::basic_string_view<char, std::__1::char_traits<char> >, unsigned int, std::__1::function<absl::lts_20230802::Status (unsigned int)> > >(std::__1::function<absl::lts_20230802::Status (std::__1::basic_string_view<char, std::__1::char_traits<char> >, unsigned int, std::__1::function<absl::lts_20230802::Status (unsigned int)>)> const&, std::__1::tuple<std::__1::basic_string_view<char, std::__1::char_traits<char> >, unsigned int, std::__1::function<absl::lts_20230802::Status (unsigned int)> >&&) /proc/self/cwd/external/com_google_googletest/googlemock/include/gmock/internal/gmock-internal-utils.h:429:10
    #13 0x7174d47 in testing::Action<absl::lts_20230802::Status (std::__1::basic_string_view<char, std::__1::char_traits<char> >, unsigned int, std::__1::function<absl::lts_20230802::Status (unsigned int)>)>::Perform(std::__1::tuple<std::__1::basic_string_view<char, std::__1::char_traits<char> >, unsigned int, std::__1::function<absl::lts_20230802::Status (unsigned int)> >) const /proc/self/cwd/external/com_google_googletest/googlemock/include/gmock/gmock-actions.h:497:12
    #14 0x7175afd in testing::internal::ActionResultHolder<absl::lts_20230802::Status>* testing::internal::ActionResultHolder<absl::lts_20230802::Status>::PerformAction<absl::lts_20230802::Status (std::__1::basic_string_view<char, std::__1::char_traits<char> >, unsigned int, std::__1::function<absl::lts_20230802::Status (unsigned int)>)>(testing::Action<absl::lts_20230802::Status (std::__1::basic_string_view<char, std::__1::char_traits<char> >, unsigned int, std::__1::function<absl::lts_20230802::Status (unsigned int)>)> const&, testing::internal::Function<absl::lts_20230802::Status (std::__1::basic_string_view<char, std::__1::char_traits<char> >, unsigned int, std::__1::function<absl::lts_20230802::Status (unsigned int)>)>::ArgumentTuple&&) /proc/self/cwd/external/com_google_googletest/googlemock/include/gmock/gmock-spec-builders.h:1402:24
    #15 0x7173651 in testing::internal::FunctionMocker<absl::lts_20230802::Status (std::__1::basic_string_view<char, std::__1::char_traits<char> >, unsigned int, std::__1::function<absl::lts_20230802::Status (unsigned int)>)>::UntypedPerformAction(void const*, void*) const /proc/self/cwd/external/com_google_googletest/googlemock/include/gmock/gmock-spec-builders.h:1556:12
    #16 0xa3e9535 in testing::internal::UntypedFunctionMockerBase::UntypedInvokeWith(void*) /proc/self/cwd/external/com_google_googletest/googlemock/src/gmock-spec-builders.cc:452:24
    #17 0x333e5b2 in testing::internal::FunctionMocker<absl::lts_20230802::Status (std::__1::basic_string_view<char, std::__1::char_traits<char> >, unsigned int, std::__1::function<absl::lts_20230802::Status (unsigned int)>)>::Invoke(std::__1::basic_string_view<char, std::__1::char_traits<char> >, unsigned int, std::__1::function<absl::lts_20230802::Status (unsigned int)>) /proc/self/cwd/external/com_google_googletest/googlemock/include/gmock/gmock-spec-builders.h:1593:15
    #18 0x333e24c in Envoy::Filesystem::MockWatcher::addWatch(std::__1::basic_string_view<char, std::__1::char_traits<char> >, unsigned int, std::__1::function<absl::lts_20230802::Status (unsigned int)>) /proc/self/cwd/./test/mocks/filesystem/mocks.h:78:3
    #19 0x3405db9 in decltype(static_cast<Envoy::Extensions::GeoipProviders::Maxmind::GeoipProvider::GeoipProvider(Envoy::Event::Dispatcher&, Envoy::Api::Api&, std::__1::shared_ptr<Envoy::Singleton::Instance>, std::__1::shared_ptr<Envoy::Extensions::GeoipProviders::Maxmind::GeoipProviderConfig>)::$_0&>(fp)()) std::__1::__invoke<Envoy::Extensions::GeoipProviders::Maxmind::GeoipProvider::GeoipProvider(Envoy::Event::Dispatcher&, Envoy::Api::Api&, std::__1::shared_ptr<Envoy::Singleton::Instance>, std::__1::shared_ptr<Envoy::Extensions::GeoipProviders::Maxmind::GeoipProviderConfig>)::$_0&>(Envoy::Extensions::GeoipProviders::Maxmind::GeoipProvider::GeoipProvider(Envoy::Event::Dispatcher&, Envoy::Api::Api&, std::__1::shared_ptr<Envoy::Singleton::Instance>, std::__1::shared_ptr<Envoy::Extensions::GeoipProviders::Maxmind::GeoipProviderConfig>)::$_0&) /proc/self/cwd/source/extensions/geoip_providers/maxmind/geoip_provider.cc:126:11
    #20 0x3404a63 in std::__1::__function::__func<Envoy::Extensions::GeoipProviders::Maxmind::GeoipProvider::GeoipProvider(Envoy::Event::Dispatcher&, Envoy::Api::Api&, std::__1::shared_ptr<Envoy::Singleton::Instance>, std::__1::shared_ptr<Envoy::Extensions::GeoipProviders::Maxmind::GeoipProviderConfig>)::$_0, std::__1::allocator<Envoy::Extensions::GeoipProviders::Maxmind::GeoipProvider::GeoipProvider(Envoy::Event::Dispatcher&, Envoy::Api::Api&, std::__1::shared_ptr<Envoy::Singleton::Instance>, std::__1::shared_ptr<Envoy::Extensions::GeoipProviders::Maxmind::GeoipProviderConfig>)::$_0>, void ()>::operator()() /opt/llvm/bin/../include/c++/v1/__functional/invoke.h:61:9
    #21 0x34f0239 in std::__1::__function::__value_func<void ()>::operator()() const /opt/llvm/bin/../include/c++/v1/__functional/function.h:507:16
    #22 0x91dbf37 in Envoy::Thread::PosixThreadFactory::createPthread(Envoy::Thread::ThreadHandle*)::$_6::__invoke(void*) /opt/llvm/bin/../include/c++/v1/__functional/function.h:1184:12
    #23 0x7fb0ecf9f608 in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x8608) (BuildId: 0c044ba611aeeeaebb8374e660061f341ebc0bac)
```

Commit Message:
Additional Description:
Risk Level:
Testing:
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
Fixes envoyproxy#35829
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional [API
Considerations](https://github.com/envoyproxy/envoy/blob/main/api/review_checklist.md):]

Signed-off-by: Kateryna Nezdolii <kateryna.nezdolii@gmail.com>
abeyad pushed a commit that referenced this pull request Apr 22, 2025
When trying to build and run fuzzers that may throw an exception (e.g.,
`bazel build //test/common/http:path_utility_fuzz_test
--config=asan-fuzzer`) the following error occurs:
```
$ bazel-bin/test/common/http/path_utility_fuzz_test /tmp/corpus
INFO: found LLVMFuzzerCustomMutator (0x555ec3b27058). Disabling -len_control by default.
INFO: Running with entropic power schedule (0xFF, 100).
INFO: Seed: 3031084950
INFO: Loaded 1 modules   (2436830 inline 8-bit counters): 2436830 [0x555ecf049c40, 0x555ecf29cb1e),
INFO: Loaded 1 PC tables (2436830 PCs): 2436830 [0x555ecf29cb20,0x555ed17cb900),
INFO:        5 files found in /tmp/corpus
INFO: -max_len is not provided; libFuzzer will not generate inputs larger than 4096 bytes
INFO: seed corpus: files: 5 min: 91b max: 332b total: 1208b rss: 357Mb
libc++abi: terminating due to uncaught exception of type Envoy::EnvoyException
==3072858== ERROR: libFuzzer: deadly signal
    #0 0x555ec3ae0911 in __sanitizer_print_stack_trace (/usr/local/google/home/adip/.cache/bazel/_bazel_adip/8e88866af51670ff1222d99304421e7c/execroot/envoy/bazel-out/k8-fastbuild/bin/test/common/http/path_utility_fuzz_test+0xa49f911)
    #1 0x555ec39e56b8 in fuzzer::PrintStackTrace() cxa_noexception.cpp
    #2 0x555ec39c8a53 in fuzzer::Fuzzer::CrashCallback() cxa_noexception.cpp
    #3 0x7f5506763e1f  (/lib/x86_64-linux-gnu/libc.so.6+0x3fe1f) (BuildId: ea119b374e0f8f858c82ad03a9542414f9ea1c8c)
    #4 0x7f55067b7e5b in __pthread_kill_implementation nptl/pthread_kill.c:43:17
    #5 0x7f5506763d81 in raise signal/../sysdeps/posix/raise.c:26:13
    #6 0x7f550674c4ef in abort stdlib/abort.c:79:7
    #7 0x555ecc751905 in abort_message abort_message.cpp
    #8 0x555ecc751ae2 in demangling_terminate_handler() cxa_default_handlers.cpp
    #9 0x555ecc7519a2 in std::__terminate(void (*)()) cxa_handlers.cpp
    #10 0x555ecc750fd5 in __cxxabiv1::failed_throw(__cxxabiv1::__cxa_exception*) cxa_exception.cpp
    #11 0x555ecc750fbf in __cxa_throw (/usr/local/google/home/adip/.cache/bazel/_bazel_adip/8e88866af51670ff1222d99304421e7c/execroot/envoy/bazel-out/k8-fastbuild/bin/test/common/http/path_utility_fuzz_test+0x1310ffbf)
    #12 0x555ec97f5a1f in Envoy::ProtoExceptionUtil::throwProtoValidationException(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, google::protobuf::Message const&) (/usr/local/google/home/adip/.cache/bazel/_bazel_adip/8e88866af51670ff1222d99304421e7c/execroot/envoy/bazel-out/k8-fastbuild/bin/test/common/http/path_utility_fuzz_test+0x101b4a1f)
    #13 0x555ec3b87a1c in void Envoy::MessageUtil::validate<test::common::http::PathUtilityTestCase>(test::common::http::PathUtilityTestCase const&, Envoy::ProtobufMessage::ValidationVisitor&, bool) (/usr/local/google/home/adip/.cache/bazel/_bazel_adip/8e88866af51670ff1222d99304421e7c/execroot/envoy/bazel-out/k8-fastbuild/bin/test/common/http/path_utility_fuzz_test+0xa546a1c)
    #14 0x555ec3b277be in LLVMFuzzerTestOneInput (/usr/local/google/home/adip/.cache/bazel/_bazel_adip/8e88866af51670ff1222d99304421e7c/execroot/envoy/bazel-out/k8-fastbuild/bin/test/common/http/path_utility_fuzz_test+0xa4e67be)
    #15 0x555ec39c9f60 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) cxa_noexception.cpp
    #16 0x555ec39c9785 in fuzzer::Fuzzer::RunOne(unsigned char const*, unsigned long, bool, fuzzer::InputInfo*, bool, bool*) cxa_noexception.cpp
    #17 0x555ec39cb712 in fuzzer::Fuzzer::ReadAndExecuteSeedCorpora(std::__Fuzzer::vector<fuzzer::SizedFile, std::__Fuzzer::allocator<fuzzer::SizedFile>>&) cxa_noexception.cpp
    #18 0x555ec39cba02 in fuzzer::Fuzzer::Loop(std::__Fuzzer::vector<fuzzer::SizedFile, std::__Fuzzer::allocator<fuzzer::SizedFile>>&) cxa_noexception.cpp
    #19 0x555ec39b9eeb in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) cxa_noexception.cpp
    #20 0x555ec39e5f12 in main (/usr/local/google/home/adip/.cache/bazel/_bazel_adip/8e88866af51670ff1222d99304421e7c/execroot/envoy/bazel-out/k8-fastbuild/bin/test/common/http/path_utility_fuzz_test+0xa3a4f12)
    #21 0x7f550674dd67 in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16
    #22 0x7f550674de24 in __libc_start_main csu/../csu/libc-start.c:360:3
    #23 0x555ec39ac720 in _start (/usr/local/google/home/adip/.cache/bazel/_bazel_adip/8e88866af51670ff1222d99304421e7c/execroot/envoy/bazel-out/k8-fastbuild/bin/test/common/http/path_utility_fuzz_test+0xa36b720)

NOTE: libFuzzer has rudimentary signal handlers.
      Combine libFuzzer with AddressSanitizer or similar for better crash reports.
SUMMARY: libFuzzer: deadly signal
```

This PR adds a linking flag to allow the fuzzers to properly handle
exceptions.

Signed-off-by: Adi Suissa-Peleg <adip@google.com>
abeyad pushed a commit that referenced this pull request Dec 22, 2025
…voyproxy#42554)

## Description

Today, when a filesystem watch callback returns a non-OK status or
throws an exception, the error gets propagated to `FileEventImpl` which
uses `THROW_IF_NOT_OK`.

Since there's no exception handler in the `libevent` loop, this causes
`std::terminate` to be called, which crashes Envoy.

**Stack Trace:**
```
Dec 11 00:11:26 dbletE9433T node-envoy[234999]: [2025-12-11 00:11:26.119][234999][warning][misc] [source/common/protobuf/message_validator_impl.cc:23] Deprecated field: type envoy.config.core.v3.HeaderValueOption Using deprecated option 'envoy.config.core.v3.HeaderValueOption.append' from file base.proto. This configuration will be removed from Envoy soon. Please see https://www.envoyproxy.io/docs/envoy/latest/version_history/version_history for details. If continued use of this field is absolutely necessary, see https://www.envoyproxy.io/docs/envoy/latest/configuration/operations/runtime#using-runtime-overrides-for-deprecated-features for how to apply a temporary and highly discouraged override.
Dec 11 00:11:26 dbletE9433T node-envoy[234999]: [2025-12-11 00:11:26.120][234999][info][upstream] [source/common/listener_manager/lds_api.cc:109] lds: add/update listener '0_listener'
Dec 11 00:11:26 dbletE9433T node-envoy[234999]: [2025-12-11 00:11:26.123][234999][info][upstream] [source/common/listener_manager/lds_api.cc:109] lds: add/update listener '1_listener'
Dec 11 00:11:26 dbletE9433T node-envoy[234999]: [2025-12-11 00:11:26.126][234999][info][upstream] [source/common/listener_manager/lds_api.cc:109] lds: add/update listener '2_listener'
Dec 11 00:11:26 dbletE9433T node-envoy[234999]: [2025-12-11 00:11:26.127][234999][info][upstream] [source/common/listener_manager/lds_api.cc:109] lds: add/update listener '3_listener'
Dec 11 00:11:26 dbletE9433T node-envoy[234999]: [2025-12-11 00:11:26.128][234999][info][upstream] [source/common/listener_manager/lds_api.cc:109] lds: add/update listener '4_listener'
Dec 11 00:11:26 dbletE9433T node-envoy[234999]: [2025-12-11 00:11:26.130][234999][info][upstream] [source/common/listener_manager/lds_api.cc:109] lds: add/update listener '5_listener'
Dec 11 00:11:26 dbletE9433T node-envoy[234999]: [2025-12-11 00:11:26.132][234999][info][upstream] [source/common/listener_manager/lds_api.cc:109] lds: add/update listener '6_listener'
Dec 11 00:11:26 dbletE9433T node-envoy[234999]: [2025-12-11 00:11:26.134][234999][info][upstream] [source/common/listener_manager/lds_api.cc:109] lds: add/update listener 'mtls_untrusted_regional_transparent_tunnel_listener'
Dec 11 00:11:26 dbletE9433T node-envoy[234999]: [2025-12-11 00:11:26.135][234999][info][upstream] [source/common/listener_manager/lds_api.cc:109] lds: add/update listener 'mtls_app_trusted_regional_transparent_tunnel_listener'
Dec 11 00:11:30 dbletE9433T node-envoy[234999]: [2025-12-11 00:11:30.097][234999][critical][main] [source/exe/terminate_handler.cc:36] std::terminate called! Uncaught unknown exception, see trace.
Dec 11 00:11:30 dbletE9433T node-envoy[234999]: [2025-12-11 00:11:30.097][234999][critical][backtrace] [./source/server/backtrace.h:113] Backtrace (use tools/stack_decode.py to get line numbers):
Dec 11 00:11:30 dbletE9433T node-envoy[234999]: [2025-12-11 00:11:30.097][234999][critical][backtrace] [./source/server/backtrace.h:114] Envoy version: 5eaabe0bbaad4612cb85473cd151039d8f1a2760/1.34.2-dev/Clean/RELEASE/BoringSSL
Dec 11 00:11:30 dbletE9433T node-envoy[234999]: [2025-12-11 00:11:30.097][234999][critical][backtrace] [./source/server/backtrace.h:116] Address mapping: 558d8afcc000-558d8ee2f000 /usr/local/bin/envoy
Dec 11 00:11:30 dbletE9433T node-envoy[234999]: [2025-12-11 00:11:30.100][234999][critical][backtrace] [./source/server/backtrace.h:123] #0: [0x558d8da5784f]
Dec 11 00:11:30 dbletE9433T node-envoy[234999]: [2025-12-11 00:11:30.102][234999][critical][backtrace] [./source/server/backtrace.h:123] #1: [0x558d8edd8673]
Dec 11 00:11:30 dbletE9433T node-envoy[234999]: [2025-12-11 00:11:30.104][234999][critical][backtrace] [./source/server/backtrace.h:123] #2: [0x558d8e3b120b]
Dec 11 00:11:30 dbletE9433T node-envoy[234999]: [2025-12-11 00:11:30.106][234999][critical][backtrace] [./source/server/backtrace.h:121] #3: Envoy::Filesystem::WatcherImpl::onInotifyEvent() [0x558d8e3990c3]
Dec 11 00:11:30 dbletE9433T node-envoy[234999]: [2025-12-11 00:11:30.108][234999][critical][backtrace] [./source/server/backtrace.h:123] #4: [0x558d8e3998d2]
Dec 11 00:11:30 dbletE9433T node-envoy[234999]: [2025-12-11 00:11:30.109][234999][critical][backtrace] [./source/server/backtrace.h:123] #5: [0x558d8e393de6]
Dec 11 00:11:30 dbletE9433T node-envoy[234999]: [2025-12-11 00:11:30.111][234999][critical][backtrace] [./source/server/backtrace.h:121] #6: Envoy::Event::FileEventImpl::mergeInjectedEventsAndRunCb() [0x558d8e394eb5]
Dec 11 00:11:30 dbletE9433T node-envoy[234999]: [2025-12-11 00:11:30.113][234999][critical][backtrace] [./source/server/backtrace.h:123] #7: [0x558d8e710823]
Dec 11 00:11:30 dbletE9433T node-envoy[234999]: [2025-12-11 00:11:30.115][234999][critical][backtrace] [./source/server/backtrace.h:121] #8: event_base_loop [0x558d8e70d4a1]
Dec 11 00:11:30 dbletE9433T node-envoy[234999]: [2025-12-11 00:11:30.117][234999][critical][backtrace] [./source/server/backtrace.h:121] #9: Envoy::Server::InstanceBase::run() [0x558d8daa2b99]
Dec 11 00:11:30 dbletE9433T node-envoy[234999]: [2025-12-11 00:11:30.119][234999][critical][backtrace] [./source/server/backtrace.h:121] #10: Envoy::MainCommonBase::run() [0x558d8da4327a]
Dec 11 00:11:30 dbletE9433T node-envoy[234999]: [2025-12-11 00:11:30.121][234999][critical][backtrace] [./source/server/backtrace.h:121] #11: Envoy::MainCommon::main() [0x558d8da44234]
Dec 11 00:11:30 dbletE9433T node-envoy[234999]: [2025-12-11 00:11:30.123][234999][critical][backtrace] [./source/server/backtrace.h:121] #12: main [0x558d8afcc11c]
Dec 11 00:11:30 dbletE9433T node-envoy[234999]: [2025-12-11 00:11:30.123][234999][critical][backtrace] [./source/server/backtrace.h:123] #13: [0x7f1d54073efb]
Dec 11 00:11:30 dbletE9433T node-envoy[234999]: [2025-12-11 00:11:30.123][234999][critical][backtrace] [./source/server/backtrace.h:121] #14: __libc_start_main [0x7f1d54073fbb]
Dec 11 00:11:30 dbletE9433T node-envoy[234999]: [2025-12-11 00:11:30.124][234999][critical][backtrace] [./source/server/backtrace.h:121] #15: _start [0x558d8afcc02e]
Dec 11 00:11:30 dbletE9433T node-envoy[234999]: [2025-12-11 00:11:30.124][234999][critical][backtrace] [./source/server/backtrace.h:129] Caught Aborted, suspect faulting address 0x395f7
Dec 11 00:11:30 dbletE9433T node-envoy[234999]: [2025-12-11 00:11:30.124][234999][critical][backtrace] [./source/server/backtrace.h:113] Backtrace (use tools/stack_decode.py to get line numbers):
Dec 11 00:11:30 dbletE9433T node-envoy[234999]: [2025-12-11 00:11:30.124][234999][critical][backtrace] [./source/server/backtrace.h:114] Envoy version: 5eaabe0bbaad4612cb85473cd151039d8f1a2760/1.34.2-dev/Clean/RELEASE/BoringSSL
Dec 11 00:11:30 dbletE9433T node-envoy[234999]: [2025-12-11 00:11:30.124][234999][critical][backtrace] [./source/server/backtrace.h:116] Address mapping: 558d8afcc000-558d8ee2f000 /usr/local/bin/envoy
Dec 11 00:11:30 dbletE9433T node-envoy[234999]: [2025-12-11 00:11:30.124][234999][critical][backtrace] [./source/server/backtrace.h:123] #0: [0x7f1d54089c90]
Dec 11 00:11:30 dbletE9433T node-envoy[234999]: [2025-12-11 00:11:30.124][234999][critical][backtrace] [./source/server/backtrace.h:121] #1: gsignal [0x7f1d54089bde]
Dec 11 00:11:30 dbletE9433T node-envoy[234999]: [2025-12-11 00:11:30.124][234999][critical][backtrace] [./source/server/backtrace.h:121] #2: abort [0x7f1d54072832]
Dec 11 00:11:30 dbletE9433T node-envoy[234999]: [2025-12-11 00:11:30.126][234999][critical][backtrace] [./source/server/backtrace.h:123] #3: [0x558d8da5785c]
Dec 11 00:11:30 dbletE9433T node-envoy[234999]: [2025-12-11 00:11:30.128][234999][critical][backtrace] [./source/server/backtrace.h:123] #4: [0x558d8edd8673]
Dec 11 00:11:30 dbletE9433T node-envoy[234999]: [2025-12-11 00:11:30.129][234999][critical][backtrace] [./source/server/backtrace.h:123] #5: [0x558d8e3b120b]
Dec 11 00:11:30 dbletE9433T node-envoy[234999]: [2025-12-11 00:11:30.129][234999][critical][backtrace] [./source/server/backtrace.h:121] #6: Envoy::Filesystem::WatcherImpl::onInotifyEvent() [0x558d8e3990c3]
Dec 11 00:11:30 dbletE9433T node-envoy[234999]: [2025-12-11 00:11:30.131][234999][critical][backtrace] [./source/server/backtrace.h:123] #7: [0x558d8e3998d2]
Dec 11 00:11:30 dbletE9433T node-envoy[234999]: [2025-12-11 00:11:30.133][234999][critical][backtrace] [./source/server/backtrace.h:123] #8: [0x558d8e393de6]
Dec 11 00:11:30 dbletE9433T node-envoy[234999]: [2025-12-11 00:11:30.133][234999][critical][backtrace] [./source/server/backtrace.h:121] #9: Envoy::Event::FileEventImpl::mergeInjectedEventsAndRunCb() [0x558d8e394eb5]
Dec 11 00:11:30 dbletE9433T node-envoy[234999]: [2025-12-11 00:11:30.135][234999][critical][backtrace] [./source/server/backtrace.h:123] #10: [0x558d8e710823]
Dec 11 00:11:30 dbletE9433T node-envoy[234999]: [2025-12-11 00:11:30.135][234999][critical][backtrace] [./source/server/backtrace.h:121] #11: event_base_loop [0x558d8e70d4a1]
Dec 11 00:11:30 dbletE9433T node-envoy[234999]: [2025-12-11 00:11:30.135][234999][critical][backtrace] [./source/server/backtrace.h:121] #12: Envoy::Server::InstanceBase::run() [0x558d8daa2b99]
Dec 11 00:11:30 dbletE9433T node-envoy[234999]: [2025-12-11 00:11:30.135][234999][critical][backtrace] [./source/server/backtrace.h:121] #13: Envoy::MainCommonBase::run() [0x558d8da4327a]
Dec 11 00:11:30 dbletE9433T node-envoy[234999]: [2025-12-11 00:11:30.135][234999][critical][backtrace] [./source/server/backtrace.h:121] #14: Envoy::MainCommon::main() [0x558d8da44234]
Dec 11 00:11:30 dbletE9433T node-envoy[234999]: [2025-12-11 00:11:30.135][234999][critical][backtrace] [./source/server/backtrace.h:121] #15: main [0x558d8afcc11c]
Dec 11 00:11:30 dbletE9433T node-envoy[234999]: [2025-12-11 00:11:30.135][234999][critical][backtrace] [./source/server/backtrace.h:123] #16: [0x7f1d54073efb]
Dec 11 00:11:30 dbletE9433T node-envoy[234999]: [2025-12-11 00:11:30.135][234999][critical][backtrace] [./source/server/backtrace.h:121] #17: __libc_start_main [0x7f1d54073fbb]
Dec 11 00:11:30 dbletE9433T node-envoy[234999]: [2025-12-11 00:11:30.135][234999][critical][backtrace] [./source/server/backtrace.h:121] #18: _start [0x558d8afcc02e]
```

In this change, we are making the `inotify` and `kqueue` watchers handle
callback errors gracefully by catching any exceptions using
`TRY_ASSERT_MAIN_THREAD`, logging errors instead of propagating them and
always returning the `OkStatus` to the event loop.

---

**Commit Message:** filesystem: Fix crash when watch callback returns
error or throws
**Additional Description:** Make `inotify` and `kqueue` watchers handle
callback errors gracefully.
**Risk Level:** Low
**Testing:** CI
**Docs Changes:** N/A
**Release Notes:** N/A

---------

Signed-off-by: Rohit Agrawal <rohit.agrawal@salesforce.com>
Signed-off-by: Rohit Agrawal <rohit.agrawal@databricks.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file python Pull requests that update Python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants