Skip to content

Instantly share code, notes, and snippets.

@kyessenov
Created August 29, 2022 17:03
Show Gist options
  • Save kyessenov/016643c55bf2c34863954c76b9f805dd to your computer and use it in GitHub Desktop.
Save kyessenov/016643c55bf2c34863954c76b9f805dd to your computer and use it in GitHub Desktop.
[ RUN ] DownstreamProtocols/DownstreamProtocolIntegrationTest.FaultyFilterWithConnect/IPv6_Http3Downstream_HttpUpstreamNghttp2NoDeferredProcessing
=================================================================
==17==ERROR: AddressSanitizer: heap-use-after-free on address 0x60f00005da80 at pc 0x0000089bf500 bp 0x7ffd5d49f4a0 sp 0x7ffd5d49f498
READ of size 8 at 0x60f00005da80 thread T0
#0 0x89bf4ff in Envoy::Http::StreamCallbackHelper::runResetCallbacks(Envoy::Http::StreamResetReason) /proc/self/cwd/./source/common/http/codec_helper.h:51:20
#1 0x962bdf6 in Envoy::Quic::EnvoyQuicClientStream::ResetWithError(quic::QuicResetStreamError) /proc/self/cwd/source/common/quic/envoy_quic_client_stream.cc:348:3
#2 0x9cdf101 in quic::QuicStream::Reset(quic::QuicRstStreamErrorCode) /proc/self/cwd/external/com_github_google_quiche/quiche/quic/core/quic_stream.cc:595:3
#3 0x961ed2d in Envoy::Quic::EnvoyQuicClientStream::resetStream(Envoy::Http::StreamResetReason) /proc/self/cwd/source/common/quic/envoy_quic_client_stream.cc:148:3
#4 0x961ed5f in non-virtual thunk to Envoy::Quic::EnvoyQuicClientStream::resetStream(Envoy::Http::StreamResetReason) /proc/self/cwd/source/common/quic/envoy_quic_client_stream.cc
#5 0x86d4d1c in Envoy::Http::CodecClient::onEvent(Envoy::Network::ConnectionEvent) /proc/self/cwd/source/common/http/codec_client.cc:120:45
#6 0x86d7aec in non-virtual thunk to Envoy::Http::CodecClient::onEvent(Envoy::Network::ConnectionEvent) /proc/self/cwd/source/common/http/codec_client.cc
#7 0xa5cd1ed in Envoy::Network::ConnectionImplBase::raiseConnectionEvent(Envoy::Network::ConnectionEvent) /proc/self/cwd/source/common/network/connection_impl_base.cc:62:17
#8 0x9b1f6b7 in Envoy::Quic::QuicFilterManagerConnectionImpl::onConnectionCloseEvent(quic::QuicConnectionCloseFrame const&, quic::ConnectionCloseSource, quic::ParsedQuicVersion const&) /proc/self/cwd/source/common/quic/quic_filter_manager_connection_impl.cc:173:5
#9 0x95f9a77 in Envoy::Quic::EnvoyQuicClientSession::OnConnectionClosed(quic::QuicConnectionCloseFrame const&, quic::ConnectionCloseSource) /proc/self/cwd/source/common/quic/envoy_quic_client_session.cc:96:3
#10 0x95f9e5f in non-virtual thunk to Envoy::Quic::EnvoyQuicClientSession::OnConnectionClosed(quic::QuicConnectionCloseFrame const&, quic::ConnectionCloseSource) /proc/self/cwd/source/common/quic/envoy_quic_client_session.cc
#11 0x9e3845c in quic::QuicConnection::TearDownLocalConnectionState(quic::QuicConnectionCloseFrame const&, quic::ConnectionCloseSource) /proc/self/cwd/external/com_github_google_quiche/quiche/quic/core/quic_connection.cc:4598:13
#12 0x9e0a340 in quic::QuicConnection::TearDownLocalConnectionState(quic::QuicErrorCode, quic::QuicIetfTransportErrorCodes, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, quic::ConnectionCloseSource) /proc/self/cwd/external/com_github_google_quiche/quiche/quic/core/quic_connection.cc:4584:10
#13 0x9e8d2b0 in quic::QuicConnection::CloseConnection(quic::QuicErrorCode, quic::QuicIetfTransportErrorCodes, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, quic::ConnectionCloseBehavior) /proc/self/cwd/external/com_github_google_quiche/quiche/quic/core/quic_connection.cc:4489:3
#14 0x9e8c806 in quic::QuicConnection::CloseConnection(quic::QuicErrorCode, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, quic::ConnectionCloseBehavior) /proc/self/cwd/external/com_github_google_quiche/quiche/quic/core/quic_connection.cc:4460:3
#15 0x9b20f29 in Envoy::Quic::QuicFilterManagerConnectionImpl::closeConnectionImmediately() /proc/self/cwd/source/common/quic/quic_filter_manager_connection_impl.cc:202:21
#16 0x9b1b889 in Envoy::Quic::QuicFilterManagerConnectionImpl::close(Envoy::Network::ConnectionCloseType) /proc/self/cwd/source/common/quic/quic_filter_manager_connection_impl.cc
#17 0x9b1c9e2 in virtual thunk to Envoy::Quic::QuicFilterManagerConnectionImpl::close(Envoy::Network::ConnectionCloseType) /proc/self/cwd/source/common/quic/quic_filter_manager_connection_impl.cc
#18 0x86d1647 in Envoy::Http::CodecClient::close() /proc/self/cwd/source/common/http/codec_client.cc:62:42
#19 0x4b3323c in Envoy::HttpIntegrationTest::cleanupUpstreamAndDownstream() /proc/self/cwd/test/integration/http_integration.cc:473:20
#20 0x4b328d3 in Envoy::HttpIntegrationTest::~HttpIntegrationTest() /proc/self/cwd/test/integration/http_integration.cc:341:47
#21 0x49ad961 in Envoy::DownstreamProtocolIntegrationTest_FaultyFilterWithConnect_Test::~DownstreamProtocolIntegrationTest_FaultyFilterWithConnect_Test() /proc/self/cwd/./test/integration/http_protocol_integration.h:32:7
0x60f00005da80 is located 32 bytes inside of 176-byte region [0x60f00005da60,0x60f00005db10)
freed by thread T0 here:
#0 0x47846d2 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 0x4bdbc78 in std::__1::__shared_ptr_emplace<Envoy::IntegrationStreamDecoder, std::__1::allocator<Envoy::IntegrationStreamDecoder> >::__on_zero_shared_weak() /opt/llvm/bin/../include/c++/v1/new:255:3
#2 0x47d16bd in std::__1::__shared_weak_count::__release_shared() /opt/llvm/bin/../include/c++/v1/__memory/shared_ptr.h:217:9
#3 0x49630e9 in std::__1::shared_ptr<Envoy::IntegrationStreamDecoder>::~shared_ptr() /opt/llvm/bin/../include/c++/v1/__memory/shared_ptr.h:703:23
#4 0x487385e in Envoy::DownstreamProtocolIntegrationTest_FaultyFilterWithConnect_Test::TestBody() /proc/self/cwd/test/integration/protocol_integration_test.cc:582:1
#5 0xd4e1e84 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
#6 0xd4a9de2 in testing::Test::Run() /proc/self/cwd/external/com_google_googletest/googletest/src/gtest.cc:2655:5
#7 0xd4ab947 in testing::TestInfo::Run() /proc/self/cwd/external/com_google_googletest/googletest/src/gtest.cc:2832:11
#8 0xd4adce4 in testing::TestSuite::Run() /proc/self/cwd/external/com_google_googletest/googletest/src/gtest.cc:2986:28
#9 0xd4d009a in testing::internal::UnitTestImpl::RunAllTests() /proc/self/cwd/external/com_google_googletest/googletest/src/gtest.cc:5697:44
#10 0xd4e5e83 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
#11 0xd4ceda6 in testing::UnitTest::Run() /proc/self/cwd/external/com_google_googletest/googletest/src/gtest.cc:5280:10
#12 0xa2ab054 in Envoy::TestRunner::RunTests(int, char**) /proc/self/cwd/external/com_google_googletest/googletest/include/gtest/gtest.h:2485:46
#13 0xa2a67a7 in main /proc/self/cwd/test/main.cc:34:10
#14 0x7fe050a60082 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x24082) (BuildId: 1878e6b475720c7c51969e69ab2d276fae6d1dee)
previously allocated by thread T0 here:
#0 0x478497e 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 0x7fe050c9a3d4 in operator new(unsigned long) (/opt/llvm/lib/x86_64-unknown-linux-gnu/libc++abi.so.1+0x2c3d4)
#2 0x4bdb606 in std::__1::__allocation_guard<std::__1::allocator<std::__1::__shared_ptr_emplace<Envoy::IntegrationStreamDecoder, std::__1::allocator<Envoy::IntegrationStreamDecoder> > > >::__allocation_guard<std::__1::allocator<Envoy::IntegrationStreamDecoder> >(std::__1::allocator<Envoy::IntegrationStreamDecoder>, unsigned long) /opt/llvm/bin/../include/c++/v1/__memory/allocation_guard.h:53:18
#3 0x4bdb2d3 in std::__1::shared_ptr<Envoy::IntegrationStreamDecoder> std::__1::allocate_shared<Envoy::IntegrationStreamDecoder, std::__1::allocator<Envoy::IntegrationStreamDecoder>, Envoy::Event::Dispatcher&, void>(std::__1::allocator<Envoy::IntegrationStreamDecoder> const&, Envoy::Event::Dispatcher&) /opt/llvm/bin/../include/c++/v1/__memory/shared_ptr.h:953:48
#4 0x4b29cd0 in Envoy::IntegrationCodecClient::startRequest(Envoy::Http::RequestHeaderMap const&, bool) /opt/llvm/bin/../include/c++/v1/__memory/shared_ptr.h:963:12
#5 0x4872e24 in Envoy::DownstreamProtocolIntegrationTest_FaultyFilterWithConnect_Test::TestBody() /proc/self/cwd/test/integration/protocol_integration_test.cc:576:45
#6 0xd4e1e84 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
#7 0xd4a9de2 in testing::Test::Run() /proc/self/cwd/external/com_google_googletest/googletest/src/gtest.cc:2655:5
#8 0xd4ab947 in testing::TestInfo::Run() /proc/self/cwd/external/com_google_googletest/googletest/src/gtest.cc:2832:11
#9 0xd4adce4 in testing::TestSuite::Run() /proc/self/cwd/external/com_google_googletest/googletest/src/gtest.cc:2986:28
#10 0xd4d009a in testing::internal::UnitTestImpl::RunAllTests() /proc/self/cwd/external/com_google_googletest/googletest/src/gtest.cc:5697:44
#11 0xd4e5e83 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
#12 0xd4ceda6 in testing::UnitTest::Run() /proc/self/cwd/external/com_google_googletest/googletest/src/gtest.cc:5280:10
#13 0xa2ab054 in Envoy::TestRunner::RunTests(int, char**) /proc/self/cwd/external/com_google_googletest/googletest/include/gtest/gtest.h:2485:46
#14 0xa2a67a7 in main /proc/self/cwd/test/main.cc:34:10
#15 0x7fe050a60082 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x24082) (BuildId: 1878e6b475720c7c51969e69ab2d276fae6d1dee)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment