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

[CI][C++][Parquet] test-conda-cpp-valgrind fails on parquet encryption tests #36327

Closed
raulcd opened this issue Jun 27, 2023 · 2 comments · Fixed by #36461
Closed

[CI][C++][Parquet] test-conda-cpp-valgrind fails on parquet encryption tests #36327

raulcd opened this issue Jun 27, 2023 · 2 comments · Fixed by #36461

Comments

@raulcd
Copy link
Member

raulcd commented Jun 27, 2023

Describe the bug, including details regarding any error messages, version, and platform.

The test-conda-cpp-valgrind fails on the following tests:

	 80 - parquet-encryption-test (Failed)
	 81 - parquet-encryption-key-management-test (Failed)

The error seems to be the following one and it has been failing for a long time (can't find when it started due to flaky #35636)

==14050== Conditional jump or move depends on uninitialised value(s)
==14050==    at 0x81FBCEC: gcm_cipher_internal (in /opt/conda/envs/arrow/lib/libcrypto.so.3)
==14050==    by 0x81FC962: ossl_gcm_stream_final (in /opt/conda/envs/arrow/lib/libcrypto.so.3)
==14050==    by 0x8017D69: EVP_DecryptFinal_ex (in /opt/conda/envs/arrow/lib/libcrypto.so.3)
==14050==    by 0x4FFC2BB: parquet::encryption::AesDecryptor::AesDecryptorImpl::GcmDecrypt(unsigned char const*, int, unsigned char const*, int, unsigned char const*, int, unsigned char*) (encryption_internal.cc:508)
==14050==    by 0x4FFC8DC: parquet::encryption::AesDecryptor::AesDecryptorImpl::Decrypt(unsigned char const*, int, unsigned char const*, int, unsigned char const*, int, unsigned char*) (encryption_internal.cc:585)
==14050==    by 0x4FFB3B5: parquet::encryption::AesDecryptor::Decrypt(unsigned char const*, int, unsigned char const*, int, unsigned char const*, int, unsigned char*) (encryption_internal.cc:353)
==14050==    by 0x501D00F: parquet::encryption::internal::DecryptKeyLocally(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (key_toolkit_internal.cc:63)
==14050==    by 0x501DF24: parquet::encryption::LocalWrapKmsClient::UnwrapKey(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (local_wrap_kms_client.cc:101)
==14050==    by 0x50045AC: parquet::encryption::FileKeyUnwrapper::GetDataEncryptionKey(parquet::encryption::KeyMaterial const&) (file_key_unwrapper.cc:94)
==14050==    by 0x500427B: parquet::encryption::FileKeyUnwrapper::GetKey(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (file_key_unwrapper.cc:82)
==14050==    by 0x4EE2C71: parquet::InternalFileDecryptor::GetFooterDecryptor(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool) (internal_file_decryptor.cc:124)
==14050==    by 0x4EE2920: parquet::InternalFileDecryptor::GetFooterDecryptor() (internal_file_decryptor.cc:96)
==14050==    by 0x4F14631: parquet::FileMetaData::FileMetaDataImpl::FileMetaDataImpl(void const*, unsigned int*, parquet::ReaderProperties const&, std::shared_ptr<parquet::InternalFileDecryptor>) (metadata.cc:602)
==14050==    by 0x4F16DE5: parquet::FileMetaData::FileMetaData(void const*, unsigned int*, parquet::ReaderProperties const&, std::shared_ptr<parquet::InternalFileDecryptor>) (metadata.cc:881)
==14050==    by 0x4F16BFB: parquet::FileMetaData::Make(void const*, unsigned int*, parquet::ReaderProperties const&, std::shared_ptr<parquet::InternalFileDecryptor>) (metadata.cc:868)
==14050==    by 0x4EEFD91: parquet::SerializedFile::ParseUnencryptedFileMetadata(std::shared_ptr<arrow::Buffer> const&, unsigned int) (file_reader.cc:593)
==14050==    by 0x4EEE82D: parquet::SerializedFile::ParseMetaData() (file_reader.cc:414)
==14050==    by 0x4EF0CD3: parquet::ParquetFileReader::Contents::Open(std::shared_ptr<arrow::io::RandomAccessFile>, parquet::ReaderProperties const&, std::shared_ptr<parquet::FileMetaData>) (file_reader.cc:731)
==14050==    by 0x4EF13B7: parquet::ParquetFileReader::Open(std::shared_ptr<arrow::io::RandomAccessFile>, parquet::ReaderProperties const&, std::shared_ptr<parquet::FileMetaData>) (file_reader.cc:769)
==14050==    by 0x13241E: parquet::encryption::test::FileDecryptor::DecryptFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::shared_ptr<parquet::FileDecryptionProperties>) (test_encryption_util.cc:357)
==14050==    by 0x1185C6: parquet::encryption::test::TestEncryptionKeyManagement::ReadEncryptedParquetFile(bool, bool, int) (key_management_test.cc:180)
==14050==    by 0x1190ED: parquet::encryption::test::TestEncryptionKeyManagement_WrapLocally_Test::TestBody() (key_management_test.cc:246)
==14050==    by 0x4B588B2: void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) (gtest.cc:2607)
==14050==    by 0x4B4F85C: void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) (gtest.cc:2643)
==14050==    by 0x4B2A0F0: testing::Test::Run() (gtest.cc:2682)
==14050==    by 0x4B2AB60: testing::TestInfo::Run() (gtest.cc:2861)
==14050==    by 0x4B2B52C: testing::TestSuite::Run() (gtest.cc:3015)
==14050==    by 0x4B3BC40: testing::internal::UnitTestImpl::RunAllTests() (gtest.cc:5855)
==14050==    by 0x4B5986D: bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) (gtest.cc:2607)
==14050==    by 0x4B50A49: bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) (gtest.cc:2643)
==14050==    by 0x4B3A106: testing::UnitTest::Run() (gtest.cc:5438)
==14050==    by 0x4AFA920: RUN_ALL_TESTS() (gtest.h:2490)
==14050==    by 0x4AFA969: main (gtest_main.cc:52)
==14050== 
{
   <insert_a_suppression_name_here>
   Memcheck:Cond
   fun:gcm_cipher_internal
   fun:ossl_gcm_stream_final
   fun:EVP_DecryptFinal_ex
   fun:_ZN7parquet10encryption12AesDecryptor16AesDecryptorImpl10GcmDecryptEPKhiS4_iS4_iPh
   fun:_ZN7parquet10encryption12AesDecryptor16AesDecryptorImpl7DecryptEPKhiS4_iS4_iPh
   fun:_ZN7parquet10encryption12AesDecryptor7DecryptEPKhiS3_iS3_iPh
   fun:_ZN7parquet10encryption8internal17DecryptKeyLocallyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_S9_
   fun:_ZN7parquet10encryption18LocalWrapKmsClient9UnwrapKeyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_
   fun:_ZN7testing8UnitTest3RunEv
   fun:_Z13RUN_ALL_TESTSv
   fun:main
}

Component(s)

C++, Continuous Integration, Parquet

@mapleFU
Copy link
Member

mapleFU commented Jul 2, 2023

Hi @raulcd , I guess this may related to openssl/openssl#19719

@pitrou
Copy link
Member

pitrou commented Jul 4, 2023

I think we can just add a Valgrind suppression. Valgrind has issues interpreting elaborate bit-twiddling sequences of instructions.

@pitrou pitrou self-assigned this Jul 4, 2023
pitrou added a commit to pitrou/arrow that referenced this issue Jul 4, 2023
* Silence Valgrind error in OpenSSL
* Make sure the entire data buffer of pairwise_diff is initialized
* Make sure the bitmaps of REE-encoded data are initialized
pitrou added a commit to pitrou/arrow that referenced this issue Jul 4, 2023
* Silence Valgrind error in OpenSSL
* Make sure the entire data buffer of pairwise_diff is initialized
* Make sure the bitmaps of REE-encoded data are initialized
pitrou added a commit that referenced this issue Jul 4, 2023
* Silence Valgrind error in OpenSSL
* Make sure the entire data buffer of pairwise_diff is initialized
* Make sure the bitmaps of REE-encoded data are initialized

* Closes: #36327

Authored-by: Antoine Pitrou <antoine@python.org>
Signed-off-by: Antoine Pitrou <antoine@python.org>
westonpace pushed a commit to westonpace/arrow that referenced this issue Jul 7, 2023
* Silence Valgrind error in OpenSSL
* Make sure the entire data buffer of pairwise_diff is initialized
* Make sure the bitmaps of REE-encoded data are initialized

* Closes: apache#36327

Authored-by: Antoine Pitrou <antoine@python.org>
Signed-off-by: Antoine Pitrou <antoine@python.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants