Skip to content

Commit

Permalink
Skip CloseAsync tests due to false positive leak
Browse files Browse the repository at this point in the history
  • Loading branch information
pitrou committed Aug 21, 2024
1 parent 2a37491 commit 216e8d5
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions cpp/src/arrow/filesystem/azurefs_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1569,6 +1569,31 @@ class TestAzureFileSystem : public ::testing::Test {
}

void TestOpenOutputStreamCloseAsync() {
#if defined(ADDRESS_SANITIZER) || defined(ARROW_VALGRIND)
// This false positive leak is similar to the one pinpointed in the
// have_false_positive_memory_leak_with_generator() comments above,
// though the stack trace is different. It happens when a block list
// is committed from a background thread.
//
// clang-format off
// Direct leak of 968 byte(s) in 1 object(s) allocated from:
// #0 calloc
// #1 (/lib/x86_64-linux-gnu/libxml2.so.2+0xe25a4)
// #2 __xmlDefaultBufferSize
// #3 xmlBufferCreate
// #4 Azure::Storage::_internal::XmlWriter::XmlWriter()
// #5 Azure::Storage::Blobs::_detail::BlockBlobClient::CommitBlockList
// #6 Azure::Storage::Blobs::BlockBlobClient::CommitBlockList
// #7 arrow::fs::(anonymous namespace)::CommitBlockList
// #8 arrow::fs::(anonymous namespace)::ObjectAppendStream::FlushAsync()::'lambda'
// clang-format on
//
// TODO perhaps remove this skip once we can rely on
// https://github.com/Azure/azure-sdk-for-cpp/pull/5767
if (options_.background_writes) {
GTEST_SKIP() << "False positive memory leak in libxml2 with CloseAsync";
}
#endif
ASSERT_OK_AND_ASSIGN(auto fs, AzureFileSystem::Make(options_));
auto data = SetUpPreexistingData();
const std::string path = data.ContainerPath("test-write-object");
Expand All @@ -1584,6 +1609,12 @@ class TestAzureFileSystem : public ::testing::Test {
}

void TestOpenOutputStreamCloseAsyncDestructor() {
#if defined(ADDRESS_SANITIZER) || defined(ARROW_VALGRIND)
// See above.
if (options_.background_writes) {
GTEST_SKIP() << "False positive memory leak in libxml2 with CloseAsync";
}
#endif
ASSERT_OK_AND_ASSIGN(auto fs, AzureFileSystem::Make(options_));
auto data = SetUpPreexistingData();
const std::string path = data.ContainerPath("test-write-object");
Expand Down

0 comments on commit 216e8d5

Please sign in to comment.