You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "David Li (Jira)" <ji...@apache.org> on 2021/10/30 18:12:00 UTC

[jira] [Updated] (ARROW-14514) [C++][R] UBSAN error on round kernel

     [ https://issues.apache.org/jira/browse/ARROW-14514?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Li updated ARROW-14514:
-----------------------------
    Summary: [C++][R] UBSAN error on round kernel  (was: [R] UBSAN error on round kernel)

> [C++][R] UBSAN error on round kernel
> ------------------------------------
>
>                 Key: ARROW-14514
>                 URL: https://issues.apache.org/jira/browse/ARROW-14514
>             Project: Apache Arrow
>          Issue Type: Improvement
>          Components: C++, R
>            Reporter: Jonathan Keane
>            Assignee: Eduardo Ponce
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 7.0.0, 6.0.1
>
>          Time Spent: 3h 20m
>  Remaining Estimate: 0h
>
> {code}
> > test_check("arrow", reporter = arrow_reporter)
> /data/gannet/ripley/R/packages/tests-clang-SAN/arrow/tools/cpp/src/arrow/compute/kernels/scalar_arithmetic.cc:1839:23: runtime error: downcast of address 0x60400055c390 which does not point to an object of type 'const State' (aka 'const RoundOptionsWrapper<arrow::compute::RoundToMultipleOptions>')
> 0x60400055c390: note: object is of type 'arrow::compute::internal::OptionsWrapper<arrow::compute::RoundToMultipleOptions>'
>  00 00 00 00  40 d4 2b 34 b9 7f 00 00  98 05 0a 34 b9 7f 00 00  48 cb 95 34 b9 7f 00 00  98 00 4b 00
>               ^~~~~~~~~~~~~~~~~~~~~~~
>               vptr for 'arrow::compute::internal::OptionsWrapper<arrow::compute::RoundToMultipleOptions>'
>     #0 0x7fb9326842a5 in arrow::Status arrow::compute::internal::(anonymous namespace)::ExecRound<arrow::DoubleType, arrow::compute::RoundToMultipleOptions, arrow::compute::internal::(anonymous namespace)::RoundToMultiple>(arrow::compute::KernelContext*, arrow::compute::ExecBatch const&, arrow::Datum*) unity_16_cxx.cxx
>     #1 0x7fb93267e8d9 in decltype(static_cast<std::__1::shared_ptr<arrow::compute::ScalarFunction> arrow::compute::internal::(anonymous namespace)::MakeUnaryRoundFunction<arrow::compute::internal::(anonymous namespace)::RoundToMultiple, arrow::compute::RoundToMultipleOptions>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, arrow::compute::FunctionDoc const*)::'lambda'(arrow::compute::KernelContext*, arrow::compute::ExecBatch const&, arrow::Datum*)&>(fp)(static_cast<arrow::compute::KernelContext*>(fp0), static_cast<arrow::compute::ExecBatch const&>(fp0), static_cast<arrow::Datum*>(fp0))) std::__1::__invoke<std::__1::shared_ptr<arrow::compute::ScalarFunction> arrow::compute::internal::(anonymous namespace)::MakeUnaryRoundFunction<arrow::compute::internal::(anonymous namespace)::RoundToMultiple, arrow::compute::RoundToMultipleOptions>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, arrow::compute::FunctionDoc const*)::'lambda'(arrow::compute::KernelContext*, arrow::compute::ExecBatch const&, arrow::Datum*)&, arrow::compute::KernelContext*, arrow::compute::ExecBatch const&, arrow::Datum*>(std::__1::shared_ptr<arrow::compute::ScalarFunction> arrow::compute::internal::(anonymous namespace)::MakeUnaryRoundFunction<arrow::compute::internal::(anonymous namespace)::RoundToMultiple, arrow::compute::RoundToMultipleOptions>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, arrow::compute::FunctionDoc const*)::'lambda'(arrow::compute::KernelContext*, arrow::compute::ExecBatch const&, arrow::Datum*)&, arrow::compute::KernelContext*&&, arrow::compute::ExecBatch const&, arrow::Datum*&&) unity_16_cxx.cxx
>     #2 0x7fb93267e815 in arrow::Status std::__1::__invoke_void_return_wrapper<arrow::Status, false>::__call<std::__1::shared_ptr<arrow::compute::ScalarFunction> arrow::compute::internal::(anonymous namespace)::MakeUnaryRoundFunction<arrow::compute::internal::(anonymous namespace)::RoundToMultiple, arrow::compute::RoundToMultipleOptions>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, arrow::compute::FunctionDoc const*)::'lambda'(arrow::compute::KernelContext*, arrow::compute::ExecBatch const&, arrow::Datum*)&, arrow::compute::KernelContext*, arrow::compute::ExecBatch const&, arrow::Datum*>(std::__1::shared_ptr<arrow::compute::ScalarFunction> arrow::compute::internal::(anonymous namespace)::MakeUnaryRoundFunction<arrow::compute::internal::(anonymous namespace)::RoundToMultiple, arrow::compute::RoundToMultipleOptions>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, arrow::compute::FunctionDoc const*)::'lambda'(arrow::compute::KernelContext*, arrow::compute::ExecBatch const&, arrow::Datum*)&, arrow::compute::KernelContext*&&, arrow::compute::ExecBatch const&, arrow::Datum*&&) unity_16_cxx.cxx
>     #3 0x7fb93267e5b3 in std::__1::__function::__func<std::__1::shared_ptr<arrow::compute::ScalarFunction> arrow::compute::internal::(anonymous namespace)::MakeUnaryRoundFunction<arrow::compute::internal::(anonymous namespace)::RoundToMultiple, arrow::compute::RoundToMultipleOptions>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, arrow::compute::FunctionDoc const*)::'lambda'(arrow::compute::KernelContext*, arrow::compute::ExecBatch const&, arrow::Datum*), std::__1::allocator<std::__1::shared_ptr<arrow::compute::ScalarFunction> arrow::compute::internal::(anonymous namespace)::MakeUnaryRoundFunction<arrow::compute::internal::(anonymous namespace)::RoundToMultiple, arrow::compute::RoundToMultipleOptions>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, arrow::compute::FunctionDoc const*)::'lambda'(arrow::compute::KernelContext*, arrow::compute::ExecBatch const&, arrow::Datum*)>, arrow::Status (arrow::compute::KernelContext*, arrow::compute::ExecBatch const&, arrow::Datum*)>::operator()(arrow::compute::KernelContext*&&, arrow::compute::ExecBatch const&, arrow::Datum*&&) unity_16_cxx.cxx
>     #4 0x7fb93008d12f in std::__1::__function::__value_func<arrow::Status (arrow::compute::KernelContext*, arrow::compute::ExecBatch const&, arrow::Datum*)>::operator()(arrow::compute::KernelContext*&&, arrow::compute::ExecBatch const&, arrow::Datum*&&) const (/data/gannet/ripley/R/packages/tests-clang-SAN/arrow.Rcheck/arrow/libs/arrow.so+0x3d9e12f)
>     #5 0x7fb93008cfda in std::__1::function<arrow::Status (arrow::compute::KernelContext*, arrow::compute::ExecBatch const&, arrow::Datum*)>::operator()(arrow::compute::KernelContext*, arrow::compute::ExecBatch const&, arrow::Datum*) const (/data/gannet/ripley/R/packages/tests-clang-SAN/arrow.Rcheck/arrow/libs/arrow.so+0x3d9dfda)
>     #6 0x7fb93017da2f in arrow::compute::detail::(anonymous namespace)::ScalarExecutor::Execute(std::__1::vector<arrow::Datum, std::__1::allocator<arrow::Datum> > const&, arrow::compute::detail::ExecListener*) unity_13_cxx.cxx
>     #7 0x7fb93014af83 in arrow::compute::ExecuteScalarExpression(arrow::compute::Expression const&, arrow::compute::ExecBatch const&, arrow::compute::ExecContext*) (/data/gannet/ripley/R/packages/tests-clang-SAN/arrow.Rcheck/arrow/libs/arrow.so+0x3e5bf83)
>     #8 0x7fb9300c686e in decltype(static_cast<arrow::compute::(anonymous namespace)::ProjectNode::InputReceived(arrow::compute::ExecNode*, arrow::compute::ExecBatch)::'lambda'(arrow::compute::ExecBatch)&>(fp)(static_cast<arrow::compute::ExecBatch>(fp0))) std::__1::__invoke<arrow::compute::(anonymous namespace)::ProjectNode::InputReceived(arrow::compute::ExecNode*, arrow::compute::ExecBatch)::'lambda'(arrow::compute::ExecBatch)&, arrow::compute::ExecBatch>(arrow::compute::(anonymous namespace)::ProjectNode::InputReceived(arrow::compute::ExecNode*, arrow::compute::ExecBatch)::'lambda'(arrow::compute::ExecBatch)&, arrow::compute::ExecBatch&&) unity_14_cxx.cxx
>     #9 0x7fb9300c617b in arrow::Result<arrow::compute::ExecBatch> std::__1::__invoke_void_return_wrapper<arrow::Result<arrow::compute::ExecBatch>, false>::__call<arrow::compute::(anonymous namespace)::ProjectNode::InputReceived(arrow::compute::ExecNode*, arrow::compute::ExecBatch)::'lambda'(arrow::compute::ExecBatch)&, arrow::compute::ExecBatch>(arrow::compute::(anonymous namespace)::ProjectNode::InputReceived(arrow::compute::ExecNode*, arrow::compute::ExecBatch)::'lambda'(arrow::compute::ExecBatch)&, arrow::compute::ExecBatch&&) unity_14_cxx.cxx
>     #10 0x7fb9300c5d9a in std::__1::__function::__func<arrow::compute::(anonymous namespace)::ProjectNode::InputReceived(arrow::compute::ExecNode*, arrow::compute::ExecBatch)::'lambda'(arrow::compute::ExecBatch), std::__1::allocator<arrow::compute::(anonymous namespace)::ProjectNode::InputReceived(arrow::compute::ExecNode*, arrow::compute::ExecBatch)::'lambda'(arrow::compute::ExecBatch)>, arrow::Result<arrow::compute::ExecBatch> (arrow::compute::ExecBatch)>::operator()(arrow::compute::ExecBatch&&) unity_14_cxx.cxx
>     #11 0x7fb9301c3d65 in std::__1::__function::__value_func<arrow::Result<arrow::compute::ExecBatch> (arrow::compute::ExecBatch)>::operator()(arrow::compute::ExecBatch&&) const (/data/gannet/ripley/R/packages/tests-clang-SAN/arrow.Rcheck/arrow/libs/arrow.so+0x3ed4d65)
>     #12 0x7fb9301c3afd in std::__1::function<arrow::Result<arrow::compute::ExecBatch> (arrow::compute::ExecBatch)>::operator()(arrow::compute::ExecBatch) const (/data/gannet/ripley/R/packages/tests-clang-SAN/arrow.Rcheck/arrow/libs/arrow.so+0x3ed4afd)
>     #13 0x7fb93013f7c1 in arrow::compute::MapNode::SubmitTask(std::__1::function<arrow::Result<arrow::compute::ExecBatch> (arrow::compute::ExecBatch)>, arrow::compute::ExecBatch)::$_1::operator()() const unity_13_cxx.cxx
>     #14 0x7fb9301a4231 in decltype(static_cast<arrow::detail::ContinueFuture&>(fp)(static_cast<arrow::Future<arrow::internal::Empty>&>(fp0), static_cast<arrow::compute::MapNode::SubmitTask(std::__1::function<arrow::Result<arrow::compute::ExecBatch> (arrow::compute::ExecBatch)>, arrow::compute::ExecBatch)::$_2::operator()() const::'lambda'()&>(fp0))) std::__1::__invoke<arrow::detail::ContinueFuture&, arrow::Future<arrow::internal::Empty>&, arrow::compute::MapNode::SubmitTask(std::__1::function<arrow::Result<arrow::compute::ExecBatch> (arrow::compute::ExecBatch)>, arrow::compute::ExecBatch)::$_2::operator()() const::'lambda'()&>(arrow::detail::ContinueFuture&, arrow::Future<arrow::internal::Empty>&, arrow::compute::MapNode::SubmitTask(std::__1::function<arrow::Result<arrow::compute::ExecBatch> (arrow::compute::ExecBatch)>, arrow::compute::ExecBatch)::$_2::operator()() const::'lambda'()&) unity_13_cxx.cxx
>     #15 0x7fb9301a40a8 in arrow::internal::FnOnce<void ()>::FnImpl<std::__1::__bind<arrow::detail::ContinueFuture, arrow::Future<arrow::internal::Empty>&, arrow::compute::MapNode::SubmitTask(std::__1::function<arrow::Result<arrow::compute::ExecBatch> (arrow::compute::ExecBatch)>, arrow::compute::ExecBatch)::$_2::operator()() const::'lambda'()> >::invoke() unity_13_cxx.cxx
>     #16 0x7fb9304e7328 in arrow::internal::FnOnce<void ()>::operator()() && (/data/gannet/ripley/R/packages/tests-clang-SAN/arrow.Rcheck/arrow/libs/arrow.so+0x41f8328)
>     #17 0x7fb9304e0326 in arrow::internal::WorkerLoop(std::__1::shared_ptr<arrow::internal::ThreadPool::State>, std::__1::__list_iterator<std::__1::thread, void*>) unity_10_cxx.cxx
>     #18 0x7fb9304dfe30 in void std::__1::__thread_execute<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, arrow::internal::ThreadPool::LaunchWorkersUnlocked(int)::$_3>(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>&, std::__1::__tuple_indices<>) unity_10_cxx.cxx
>     #19 0x7fb9304dfbc3 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*) unity_10_cxx.cxx
>     #20 0x7fb9448ca431 in start_thread pthread_create.c
>     #21 0x7fb9447dd6d2 in clone (/lib64/libc.so.6+0x1016d2)
> SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /data/gannet/ripley/R/packages/tests-clang-SAN/arrow/tools/cpp/src/arrow/compute/kernels/scalar_arithmetic.cc:1839:23 in 
> {code}
> https://www.stats.ox.ac.uk/pub/bdr/memtests/clang-UBSAN/arrow/tests/testthat.Rout 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)