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

[R] test-fedora-r-clang-sanitizer job failing due to snappy causing a sanitizer error #30369

Closed
asfimport opened this issue Nov 24, 2021 · 8 comments

Comments

@asfimport
Copy link

A recent build failure

We could consider mentioning this upstream to the snappy project. They explicitly support clang clang. I have confirmed (locally, by setting ARROW_VERBOSE_THIRDPARTY_BUILD=ON that snapy 1.1.9 definitely is being installed (which we bumped in ARROW-14594).

We might also try building with the master branch of snappy (which can be accomplished by changing https://github.com/apache/arrow/blob/master/cpp/thirdparty/versions.txt#L80-L81 to point to the master branch tar.gz.

    #7 0x7f39908049c0 in arrow::util::internal::(anonymous namespace)::SnappyCodec::Decompress(long, unsigned char const*, long, unsigned char*) /arrow/cpp/src/arrow/util/compression_snappy.cc:56:10
    #8 0x7f398f1489d7 in parquet::(anonymous namespace)::SerializedPageReader::DecompressIfNeeded(std::__1::shared_ptr<arrow::Buffer>, int, int, int) /arrow/cpp/src/parquet/column_reader.cc:492:3
    #9 0x7f398f144897 in parquet::(anonymous namespace)::SerializedPageReader::NextPage() /arrow/cpp/src/parquet/column_reader.cc:404:11
    #10 0x7f398f1ab37f in parquet::(anonymous namespace)::ColumnReaderImplBase<parquet::PhysicalType<(parquet::Type::type)5> >::ReadNewPage() /arrow/cpp/src/parquet/column_reader.cc:595:31
    #11 0x7f398f1aaf04 in parquet::(anonymous namespace)::ColumnReaderImplBase<parquet::PhysicalType<(parquet::Type::type)5> >::HasNextInternal() /arrow/cpp/src/parquet/column_reader.cc:575:12
    #12 0x7f398f2130ef in parquet::internal::(anonymous namespace)::TypedRecordReader<parquet::PhysicalType<(parquet::Type::type)5> >::ReadRecords(long) /arrow/cpp/src/parquet/column_reader.cc:1227:18
    #13 0x7f398efbe8d8 in parquet::arrow::(anonymous namespace)::LeafReader::LoadBatch(long) /arrow/cpp/src/parquet/arrow/reader.cc:467:46
    #14 0x7f398efe86db in parquet::arrow::ColumnReaderImpl::NextBatch(long, std::__1::shared_ptr<arrow::ChunkedArray>*) /arrow/cpp/src/parquet/arrow/reader.cc:108:5
    #15 0x7f398efce3a2 in parquet::arrow::(anonymous namespace)::FileReaderImpl::ReadColumn(int, std::__1::vector<int, std::__1::allocator<int> > const&, parquet::arrow::ColumnReader*, std::__1::shared_ptr<arrow::ChunkedArray>*) /arrow/cpp/src/parquet/arrow/reader.cc:273:20
    #16 0x7f398efda5bc in parquet::arrow::(anonymous namespace)::FileReaderImpl::DecodeRowGroups(std::__1::shared_ptr<parquet::arrow::(anonymous namespace)::FileReaderImpl>, std::__1::vector<int, std::__1::allocator<int> > const&, std::__1::vector<int, std::__1::allocator<int> > const&, arrow::internal::Executor*)::$_4::operator()(unsigned long, std::__1::shared_ptr<parquet::arrow::ColumnReaderImpl>) const /arrow/cpp/src/parquet/arrow/reader.cc:1180:5
    #17 0x7f398efdb2e7 in std::__1::enable_if<((!(std::is_void<arrow::Result<std::__1::shared_ptr<arrow::ChunkedArray> > >::value)) && (!(is_future<arrow::Result<std::__1::shared_ptr<arrow::ChunkedArray> > >::value))) && ((!(arrow::Future<std::__1::shared_ptr<arrow::ChunkedArray> >::is_empty)) || (std::is_same<arrow::Result<std::__1::shared_ptr<arrow::ChunkedArray> >, arrow::Status>::value)), void>::type arrow::detail::ContinueFuture::operator()<parquet::arrow::(anonymous namespace)::FileReaderImpl::DecodeRowGroups(std::__1::shared_ptr<parquet::arrow::(anonymous namespace)::FileReaderImpl>, std::__1::vector<int, std::__1::allocator<int> > const&, std::__1::vector<int, std::__1::allocator<int> > const&, arrow::internal::Executor*)::$_4&, unsigned long&, std::__1::shared_ptr<parquet::arrow::ColumnReaderImpl>&, arrow::Result<std::__1::shared_ptr<arrow::ChunkedArray> >, arrow::Future<std::__1::shared_ptr<arrow::ChunkedArray> > >(arrow::Future<std::__1::shared_ptr<arrow::ChunkedArray> >, parquet::arrow::(anonymous namespace)::FileReaderImpl::DecodeRowGroups(std::__1::shared_ptr<parquet::arrow::(anonymous namespace)::FileReaderImpl>, std::__1::vector<int, std::__1::allocator<int> > const&, std::__1::vector<int, std::__1::allocator<int> > const&, arrow::internal::Executor*)::$_4&, unsigned long&, std::__1::shared_ptr<parquet::arrow::ColumnReaderImpl>&) const /arrow/cpp/src/arrow/util/future.h:148:23
    #18 0x7f398efdb2e7 in decltype(std::__1::forward<arrow::detail::ContinueFuture&>(fp)(std::__1::forward<arrow::Future<std::__1::shared_ptr<arrow::ChunkedArray> >&>(fp0), std::__1::forward<parquet::arrow::(anonymous namespace)::FileReaderImpl::DecodeRowGroups(std::__1::shared_ptr<parquet::arrow::(anonymous namespace)::FileReaderImpl>, std::__1::vector<int, std::__1::allocator<int> > const&, std::__1::vector<int, std::__1::allocator<int> > const&, arrow::internal::Executor*)::$_4&>(fp0), std::__1::forward<unsigned long&>(fp0), std::__1::forward<std::__1::shared_ptr<parquet::arrow::ColumnReaderImpl>&>(fp0))) std::__1::__invoke<arrow::detail::ContinueFuture&, arrow::Future<std::__1::shared_ptr<arrow::ChunkedArray> >&, parquet::arrow::(anonymous namespace)::FileReaderImpl::DecodeRowGroups(std::__1::shared_ptr<parquet::arrow::(anonymous namespace)::FileReaderImpl>, std::__1::vector<int, std::__1::allocator<int> > const&, std::__1::vector<int, std::__1::allocator<int> > const&, arrow::internal::Executor*)::$_4&, unsigned long&, std::__1::shared_ptr<parquet::arrow::ColumnReaderImpl>&>(arrow::detail::ContinueFuture&, arrow::Future<std::__1::shared_ptr<arrow::ChunkedArray> >&, parquet::arrow::(anonymous namespace)::FileReaderImpl::DecodeRowGroups(std::__1::shared_ptr<parquet::arrow::(anonymous namespace)::FileReaderImpl>, std::__1::vector<int, std::__1::allocator<int> > const&, std::__1::vector<int, std::__1::allocator<int> > const&, arrow::internal::Executor*)::$_4&, unsigned long&, std::__1::shared_ptr<parquet::arrow::ColumnReaderImpl>&) /usr/bin/../include/c++/v1/type_traits:3899:1
    #19 0x7f398efdb0a5 in std::__1::__bind_return<arrow::detail::ContinueFuture, std::__1::tuple<arrow::Future<std::__1::shared_ptr<arrow::ChunkedArray> >, parquet::arrow::(anonymous namespace)::FileReaderImpl::DecodeRowGroups(std::__1::shared_ptr<parquet::arrow::(anonymous namespace)::FileReaderImpl>, std::__1::vector<int, std::__1::allocator<int> > const&, std::__1::vector<int, std::__1::allocator<int> > const&, arrow::internal::Executor*)::$_4, unsigned long, std::__1::shared_ptr<parquet::arrow::ColumnReaderImpl> >, std::__1::tuple<>, __is_valid_bind_return<arrow::detail::ContinueFuture, std::__1::tuple<arrow::Future<std::__1::shared_ptr<arrow::ChunkedArray> >, parquet::arrow::(anonymous namespace)::FileReaderImpl::DecodeRowGroups(std::__1::shared_ptr<parquet::arrow::(anonymous namespace)::FileReaderImpl>, std::__1::vector<int, std::__1::allocator<int> > const&, std::__1::vector<int, std::__1::allocator<int> > const&, arrow::internal::Executor*)::$_4, unsigned long, std::__1::shared_ptr<parquet::arrow::ColumnReaderImpl> >, std::__1::tuple<> >::value>::type std::__1::__bind<arrow::detail::ContinueFuture, arrow::Future<std::__1::shared_ptr<arrow::ChunkedArray> >&, parquet::arrow::(anonymous namespace)::FileReaderImpl::DecodeRowGroups(std::__1::shared_ptr<parquet::arrow::(anonymous namespace)::FileReaderImpl>, std::__1::vector<int, std::__1::allocator<int> > const&, std::__1::vector<int, std::__1::allocator<int> > const&, arrow::internal::Executor*)::$_4&, unsigned long&, std::__1::shared_ptr<parquet::arrow::ColumnReaderImpl> >::operator()<>() /usr/bin/../include/c++/v1/functional:2886:20
    #20 0x7f398efdb0a5 in arrow::internal::FnOnce<void ()>::FnImpl<std::__1::__bind<arrow::detail::ContinueFuture, arrow::Future<std::__1::shared_ptr<arrow::ChunkedArray> >&, parquet::arrow::(anonymous namespace)::FileReaderImpl::DecodeRowGroups(std::__1::shared_ptr<parquet::arrow::(anonymous namespace)::FileReaderImpl>, std::__1::vector<int, std::__1::allocator<int> > const&, std::__1::vector<int, std::__1::allocator<int> > const&, arrow::internal::Executor*)::$_4&, unsigned long&, std::__1::shared_ptr<parquet::arrow::ColumnReaderImpl> > >::invoke() /arrow/cpp/src/arrow/util/functional.h:152:42
    #21 0x7f39907017d7 in arrow::internal::FnOnce<void ()>::operator()() && /arrow/cpp/src/arrow/util/functional.h:140:17
    #22 0x7f39907002f5 in arrow::internal::WorkerLoop(std::__1::shared_ptr<arrow::internal::ThreadPool::State>, std::__1::__list_iterator<std::__1::thread, void*>) /arrow/cpp/src/arrow/util/thread_pool.cc:177:11
    #23 0x7f39906ffd0b in arrow::internal::ThreadPool::LaunchWorkersUnlocked(int)::$_3::operator()() const /arrow/cpp/src/arrow/util/thread_pool.cc:344:7
    #24 0x7f39906ffd0b in decltype(std::__1::forward<arrow::internal::ThreadPool::LaunchWorkersUnlocked(int)::$_3>(fp)()) std::__1::__invoke<arrow::internal::ThreadPool::LaunchWorkersUnlocked(int)::$_3>(arrow::internal::ThreadPool::LaunchWorkersUnlocked(int)::$_3&&) /usr/bin/../include/c++/v1/type_traits:3899:1
    #25 0x7f39906ff62c in void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, arrow::internal::ThreadPool::LaunchWorkersUnlocked(int)::$_3> >(void*) /usr/bin/../include/c++/v1/thread:291:5
    #26 0x7f39a0e0c3f8 in start_thread (/lib64/libpthread.so.0+0x93f8)
    #27 0x7f39a0c4f4c2 in clone (/lib64/libc.so.6+0x1014c2)

SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /tmp/RtmpZTvzHP/file587026c727/snappy_ep-prefix/src/snappy_ep/snappy.cc:351:43 in 
> head(df)

Reporter: Nicola Crane / @thisisnic

PRs and other links:

Note: This issue was originally created as ARROW-14839. Please see the migration documentation for further details.

@asfimport
Copy link
Author

Antoine Pitrou / @pitrou:
Trying with the master branch sounds like a good idea.

@asfimport
Copy link
Author

Jonathan Keane / @jonkeane:
Unfortunately, that didn't resolve it: https://dev.azure.com/ursacomputing/crossbow/_build/results?buildId=16458&view=logs&j=0da5d1d9-276d-5173-c4c4-9d4d4ed14fdb&t=d9b15392-e4ce-5e4c-0c8c-b69645229181&l=12299

Would you have a chance to confirm that this is something in Snappy itself (as opposed to us mis-calling snappy) and raise the issue with them? I'm a bit out of my depth to explain exactly where their issue is, but they should be amenable to fixing it since clang is their (one) fully-supported compiler, yeah?

@asfimport
Copy link
Author

Antoine Pitrou / @pitrou:
I don't think this used the master branch, since the line number points to an innocuous line:
https://github.com/google/snappy/blob/master/snappy.cc#L351

@asfimport
Copy link
Author

Jonathan Keane / @jonkeane:
Odd, when I ran this locally I definitely had a complain about the hash not matching (when I hadn't yet updated it to the hash for the @Head tar.gz), anyway I've submitted it again removing all of the extra URLs that could be being accessed to get 1.1.9 (or 1.1.8 for that matter!), let's see if that fails.

@asfimport
Copy link
Author

Jonathan Keane / @jonkeane:
Here's another run + failure:

https://dev.azure.com/ursacomputing/crossbow/_build/results?buildId=16458&view=logs&j=0da5d1d9-276d-5173-c4c4-9d4d4ed14fdb&t=d9b15392-e4ce-5e4c-0c8c-b69645229181&l=12300

#0 0x7f9ebd21769c in snappy::(anonymous namespace)::Copy64BytesWithPatternExtension(char*, unsigned long) /tmp/RtmptDX1SS/file584e37df4e/snappy_ep-prefix/src/snappy_ep/snappy.cc:343:43

And a permalink to that line: https://github.com/google/snappy/blob/65dc7b383985eb4f63cd3e752136db8d9b4be8c0/snappy.cc#L343

Does that still look innocuous?

@asfimport
Copy link
Author

Antoine Pitrou / @pitrou:
It looks genuine, thank you. I think I'll report a bug to Snappy.

@asfimport
Copy link
Author

Antoine Pitrou / @pitrou:
Can you try with the following commit from my fork:
pitrou/snappy@64df9f2

@asfimport
Copy link
Author

Jonathan Keane / @jonkeane:
Issue resolved by pull request 11875
#11875

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant