rapidsai / cudf

cuDF - GPU DataFrame Library
https://docs.rapids.ai/api/cudf/stable/
Apache License 2.0
8.43k stars 904 forks source link

[BUG] AST_TEST TransformTest.DeeplyNestedArithmeticLogicalExpression fails when run in a debug build #17274

Closed davidwendt closed 53 minutes ago

davidwendt commented 5 days ago

The following fails when run with 24.12 libcudf debug build

$ gtests/AST_TEST --gtest_filter=TransformTest.DeeplyNestedArithmeticLogicalExpression
Note: Google Test filter = TransformTest.DeeplyNestedArithmeticLogicalExpression
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from TransformTest
[ RUN      ] TransformTest.DeeplyNestedArithmeticLogicalExpression
pure virtual method called
terminate called without an active exception
Aborted (core dumped)

The partial stack trace looks like the following

#8  0x00007fc4a5969003 in __cxxabiv1::__cxa_pure_virtual () at ../../../../libstdc++-v3/libsupc++/pure.cc:50
#9  0x00007fc471fae7ce in cudf::ast::operation::may_evaluate_null(cudf::table_view const&, cudf::table_view const&, rmm::cuda_stream_view) const::{lambda(std::reference_wrapper<cudf::ast::expression const>)#1}::operator()(std::reference_wrapper<cudf::ast::expression const>) const (
    __closure=0x7ffe253a7270, subexpr=...) at /cudf/cpp/include/cudf/ast/expressions.hpp:506
#10 0x00007fc471fb0448 in __gnu_cxx::__ops::_Iter_pred<cudf::ast::operation::may_evaluate_null(cudf::table_view const&, cudf::table_view const&, rmm::cuda_stream_view) const::{lambda(std::reference_wrapper<cudf::ast::expression const>)#1}>::operator()<__gnu_cxx::__normal_iterator<std::reference_wrapper<cudf::ast::expression const> const*, std::vector<std::reference_wrapper<cudf::ast::expression const>, std::allocator<std::reference_wrapper<cudf::ast::expression const> > > > >(__gnu_cxx::__normal_iterator<std::reference_wrapper<cudf::ast::expression const> const*, std::vector<std::reference_wrapper<cudf::ast::expression const>, std::allocator<std::reference_wrapper<cudf::ast::expression const> > > >) (this=0x7ffe253a7270, __it=...)
    at /conda/envs/rapids/lib/gcc/x86_64-conda-linux-gnu/11.4.0/include/c++/bits/predefined_ops.h:318
#11 0x00007fc471fb02a1 in std::__find_if<__gnu_cxx::__normal_iterator<std::reference_wrapper<cudf::ast::expression const> const*, std::vector<std::reference_wrapper<cudf::ast::expression const>, std::allocator<std::reference_wrapper<cudf::ast::expression const> > > >, __gnu_cxx::__ops::_Iter_pred<cudf::ast::operation::may_evaluate_null(cudf::table_view const&, cudf::table_view const&, rmm::cuda_stream_view) const::{lambda(std::reference_wrapper<cudf::ast::expression const>)#1}> >(__gnu_cxx::__normal_iterator<std::reference_wrapper<cudf::ast::expression const> const*, std::vector<std::reference_wrapper<cudf::ast::expression const>, std::allocator<std::reference_wrapper<cudf::ast::expression const> > > >, __gnu_cxx::__normal_iterator<std::reference_wrapper<cudf::ast::expression const> const*, std::vector<std::reference_wrapper<cudf::ast::expression const>, std::allocator<std::reference_wrapper<cudf::ast::expression const> > > >, __gnu_cxx::__ops::_Iter_pred<cudf::ast::operation::may_evaluate_null(cudf::table_view const&, cudf::table_view const&, rmm::cuda_stream_view) const::{lambda(std::reference_wrapper<cudf::ast::expression const>)#1}>, std::random_access_iterator_tag) (
    __first=..., __last=..., __pred=...) at /conda/envs/rapids/lib/gcc/x86_64-conda-linux-gnu/11.4.0/include/c++/bits/stl_algobase.h:2094
#12 0x00007fc471faffdf in std::__find_if<__gnu_cxx::__normal_iterator<std::reference_wrapper<cudf::ast::expression const> const*, std::vector<std::reference_wrapper<cudf::ast::expression const>, std::allocator<std::reference_wrapper<cudf::ast::expression const> > > >, __gnu_cxx::__ops::_Iter_pred<cudf::ast::operation::may_evaluate_null(cudf::table_view const&, cudf::table_view const&, rmm::cuda_stream_view) const::{lambda(std::reference_wrapper<cudf::ast::expression const>)#1}> >(__gnu_cxx::__normal_iterator<std::reference_wrapper<cudf::ast::expression const> const*, std::vector<std::reference_wrapper<cudf::ast::expression const>, std::allocator<std::reference_wrapper<cudf::ast::expression const> > > >, __gnu_cxx::__normal_iterator<std::reference_wrapper<cudf::ast::expression const> const*, std::vector<std::reference_wrapper<cudf::ast::expression const>, std::allocator<std::reference_wrapper<cudf::ast::expression const> > > >, __gnu_cxx::__ops::_Iter_pred<cudf::ast::operation::may_evaluate_null(cudf::table_view const&, cudf::table_view const&, rmm::cuda_stream_view) const::{lambda(std::reference_wrapper<cudf::ast::expression const>)#1}>) (__first=..., __last=..., __pred=...)
    at /conda/envs/rapids/lib/gcc/x86_64-conda-linux-gnu/11.4.0/include/c++/bits/stl_algobase.h:2114
#13 0x00007fc471fafdb5 in std::find_if<__gnu_cxx::__normal_iterator<std::reference_wrapper<cudf::ast::expression const> const*, std::vector<std::reference_wrapper<cudf::ast::expression const>, std::allocator<std::reference_wrapper<cudf::ast::expression const> > > >, cudf::ast::operation::may_evaluate_null(cudf::table_view const&, cudf::table_view const&, rmm::cuda_stream_view) const::{lambda(std::reference_wrapper<cudf::ast::expression const>)#1}>(__gnu_cxx::__normal_iterator<std::reference_wrapper<cudf::ast::expression const> const*, std::vector<std::reference_wrapper<cudf::ast::expression const>, std::allocator<std::reference_wrapper<cudf::ast::expression const> > > >, __gnu_cxx::__normal_iterator<std::reference_wrapper<cudf::ast::expression const> const*, std::vector<std::reference_wrapper<cudf::ast::expression const>, std::allocator<std::reference_wrapper<cudf::ast::expression const> > > >, cudf::ast::operation::may_evaluate_null(cudf::table_view const&, cudf::table_view const&, rmm::cuda_stream_view) const::{lambda(std::reference--Type <RET> for more, q to quit, c to continue without paging--
_wrapper<cudf::ast::expression const>)#1}) (__first=..., __last=..., __pred=...)
    at /conda/envs/rapids/lib/gcc/x86_64-conda-linux-gnu/11.4.0/include/c++/bits/stl_algo.h:3910
#14 0x00007fc471faf692 in std::none_of<__gnu_cxx::__normal_iterator<std::reference_wrapper<cudf::ast::expression const> const*, std::vector<std::reference_wrapper<cudf::ast::expression const>, std::allocator<std::reference_wrapper<cudf::ast::expression const> > > >, cudf::ast::operation::may_evaluate_null(cudf::table_view const&, cudf::table_view const&, rmm::cuda_stream_view) const::{lambda(std::reference_wrapper<cudf::ast::expression const>)#1}>(__gnu_cxx::__normal_iterator<std::reference_wrapper<cudf::ast::expression const> const*, std::vector<std::reference_wrapper<cudf::ast::expression const>, std::allocator<std::reference_wrapper<cudf::ast::expression const> > > >, __gnu_cxx::__normal_iterator<std::reference_wrapper<cudf::ast::expression const> const*, std::vector<std::reference_wrapper<cudf::ast::expression const>, std::allocator<std::reference_wrapper<cudf::ast::expression const> > > >, cudf::ast::operation::may_evaluate_null(cudf::table_view const&, cudf::table_view const&, rmm::cuda_stream_view) const::{lambda(std::reference_wrapper<cudf::ast::expression const>)#1}) (__first=..., __last=..., __pred=...)
    at /conda/envs/rapids/lib/gcc/x86_64-conda-linux-gnu/11.4.0/include/c++/bits/stl_algo.h:471
#15 0x00007fc471faedc7 in std::any_of<__gnu_cxx::__normal_iterator<std::reference_wrapper<cudf::ast::expression const> const*, std::vector<std::reference_wrapper<cudf::ast::expression const>, std::allocator<std::reference_wrapper<cudf::ast::expression const> > > >, cudf::ast::operation::may_evaluate_null(cudf::table_view const&, cudf::table_view const&, rmm::cuda_stream_view) const::{lambda(std::reference_wrapper<cudf::ast::expression const>)#1}>(__gnu_cxx::__normal_iterator<std::reference_wrapper<cudf::ast::expression const> const*, std::vector<std::reference_wrapper<cudf::ast::expression const>, std::allocator<std::reference_wrapper<cudf::ast::expression const> > > >, __gnu_cxx::__normal_iterator<std::reference_wrapper<cudf::ast::expression const> const*, std::vector<std::reference_wrapper<cudf::ast::expression const>, std::allocator<std::reference_wrapper<cudf::ast::expression const> > > >, cudf::ast::operation::may_evaluate_null(cudf::table_view const&, cudf::table_view const&, rmm::cuda_stream_view) const::{lambda(std::reference_wrapper<cudf::ast::expression const>)#1}) (__first=..., __last=..., __pred=...)
    at /conda/envs/rapids/lib/gcc/x86_64-conda-linux-gnu/11.4.0/include/c++/bits/stl_algo.h:490
#16 0x00007fc471fae83c in cudf::ast::operation::may_evaluate_null (this=0x5c5d2a389120, left=..., right=..., stream=...)
    at /cudf/cpp/include/cudf/ast/expressions.hpp:503
#17 0x00007fc471fae7ce in cudf::ast::operation::may_evaluate_null(cudf::table_view const&, cudf::table_view const&, rmm::cuda_stream_view) const::{lambda(std::reference_wrapper<cudf::ast::expression const>)#1}::operator()(std::reference_wrapper<cudf::ast::expression const>) const (
    __closure=0x7ffe253a74a0, subexpr=...) at /cudf/cpp/include/cudf/ast/expressions.hpp:506
#18 0x00007fc471fb0448 in __gnu_cxx::__ops::_Iter_pred<cudf::ast::operation::may_evaluate_null(cudf::table_view const&, cudf::table_view const&, rmm::cuda_stream_view) const::{lambda(std::reference_wrapper<cudf::ast::expression const>)#1}>::operator()<__gnu_cxx::__normal_iterator<std::reference_wrapper<cudf::ast::expression const> const*, std::vector<std::reference_wrapper<cudf::ast::expression const>, std::allocator<std::reference_wrapper<cudf::ast::expression const> > > > >(__gnu_cxx::__normal_iterator<std::reference_wrapper<cudf::ast::expression const> const*, std::vector<std::reference_wrapper<cudf::ast::expression const>, std::allocator<std::reference_wrapper<cudf::ast::expression const> > > >) (this=0x7ffe253a74a0, __it=...)
    at /conda/envs/rapids/lib/gcc/x86_64-conda-linux-gnu/11.4.0/include/c++/bits/predefined_ops.h:318
#19 0x00007fc471fb02a1 in std::__find_if<__gnu_cxx::__normal_iterator<std::reference_wrapper<cudf::ast::expression const> const*, std::vector<std::reference_wrapper<cudf::ast::expression const>, std::allocator<std::reference_wrapper<cudf::ast::expression const> > > >, __gnu_cxx::__ops::_Iter_pred<cudf::ast::operation::may_evaluate_null(cudf::table_view const&, cudf::table_view const&, rmm::cuda_stream_view) const::{lambda(std::reference_wrapper<cudf::ast::expression const>)#1}> >(__gnu_cxx::__normal_iterator<std::reference_wrapper<cudf::ast::expression const> const*, std::vector<std::reference_wrapper<cudf::ast::expression const>, std::allocator<std::reference_wrapper<cudf::ast::expression const> > > >, __gnu_cxx::__normal_iterator<std::reference_wrapper<cudf::ast::expression const> const*, std::vector<std::reference_wrapper<cudf::ast::expression const>, std::allocator<std::reference_wrapper<cudf::ast::expression const> > > >, __gnu_cxx::__ops::_Iter_pred<cudf::ast::operation::may_evaluate_null(cudf::table_view const&, cudf::table_view const&, rmm::cuda_stream_view) const::{lambda(std::reference_wrapper<cudf::ast::expression const>)#1}>, std::random_access_iterator_tag) (
    __first=..., __last=..., __pred=...) at /conda/envs/rapids/lib/gcc/x86_64-conda-linux-gnu/11.4.0/include/c++/bits/stl_algobase.h:2094
#20 0x00007fc471faffdf in std::__find_if<__gnu_cxx::__normal_iterator<std::reference_wrapper<cudf::ast::expression const> const*, std::vector<std::reference_wrapper<cudf::ast::expression const>, std::allocator<std::reference_wrapper<cudf::ast::expression const> > > >, __gnu_cxx::__ops::_Iter_pred<cudf::ast::operation::may_evaluate_null(cudf::table_view const&, cudf::table_view const&, rmm::cuda_stream_view) const::{lambda(std::reference_wrapper<cudf::ast::expression const>)#1}> >(__gnu_cxx::__normal_iterator<std::reference_wrapper<cudf::ast::expression const> const*, std::vector<std::reference_wrapper<cudf::ast::expression const>, std::allocator<std::reference_wrapper<cudf::ast::expression const> > > >, __gnu_cxx::__normal_iterator<std::reference_wrapper<cudf::ast::expression const> const*, std::vector<std::reference_wrapper<cudf::ast::expression const>, std::allocator<std::reference_wrapper<cudf::ast::expression const> > > >, __gnu_cxx::__ops::_Iter_pred<cudf::ast::operation::may_evaluate_null(cudf::table_view const&, cudf::table_view const&, rmm::cuda_stream_view) const::{lambda(std::reference_wrapper<cudf::ast::expression const>)#1}>) (__first=..., __last=..., __pred=...)
    at /conda/envs/rapids/lib/gcc/x86_64-conda-linux-gnu/11.4.0/include/c++/bits/stl_algobase.h:2114
#21 0x00007fc471fafdb5 in std::find_if<__gnu_cxx::__normal_iterator<std::reference_wrapper<cudf::ast::expression const> const*, std::vector<std::reference_wrapper<cudf::ast::expression const>, std::allocator<std::reference_wrapper<cudf::ast::expression const> > > >, cudf::ast::operation::may_evaluate_null(cudf::table_view const&, cudf::table_view const&, rmm::cuda_stream_view) const::{lambda(std::reference_wrapper<cudf::ast::expression const>)#1}>(__gnu_cxx::__normal_iterator<std::reference_wrapper<cudf::ast::expression const> const*, std::vector<std::reference_wrapper<cudf::ast::expression const>, std::allocator<std::reference_wrapper<cudf::ast::expression const> > > >, __gnu_cxx::__normal_iterator<std::reference_wrapper<cudf::ast::expression const> const*, std::vector<std::reference_wrapper<cudf::ast::expression const>, std::allocator<std::reference_wrapper<cudf::ast::expression const> > > >, cudf::ast::operation::may_evaluate_null(cudf::table_view const&, cudf::table_view const&, rmm::cuda_stream_view) const::{lambda(std::reference_wrapper<cudf::ast::expression const>)#1}) (__first=..., __last=..., __pred=...)
    at /conda/envs/rapids/lib/gcc/x86_64-conda-linux-gnu/11.4.0/include/c++/bits/stl_algo.h:3910
#22 0x00007fc471faf692 in std::none_of<__gnu_cxx::__normal_iterator<std::reference_wrapper<cudf::ast::expression const> const*, std::vector<std::reference_wrapper<cudf::ast::expression const>, std::allocator<std::reference_wrapper<cudf::ast::expression const> > > >, cudf::ast::operation::may_evaluat--Type <RET> for more, q to quit, c to continue without paging--
e_null(cudf::table_view const&, cudf::table_view const&, rmm::cuda_stream_view) const::{lambda(std::reference_wrapper<cudf::ast::expression const>)#1}>(__gnu_cxx::__normal_iterator<std::reference_wrapper<cudf::ast::expression const> const*, std::vector<std::reference_wrapper<cudf::ast::expression const>, std::allocator<std::reference_wrapper<cudf::ast::expression const> > > >, __gnu_cxx::__normal_iterator<std::reference_wrapper<cudf::ast::expression const> const*, std::vector<std::reference_wrapper<cudf::ast::expression const>, std::allocator<std::reference_wrapper<cudf::ast::expression const> > > >, cudf::ast::operation::may_evaluate_null(cudf::table_view const&, cudf::table_view const&, rmm::cuda_stream_view) const::{lambda(std::reference_wrapper<cudf::ast::expression const>)#1}) (__first=..., __last=..., __pred=...)
    at /conda/envs/rapids/lib/gcc/x86_64-conda-linux-gnu/11.4.0/include/c++/bits/stl_algo.h:471
#23 0x00007fc471faedc7 in std::any_of<__gnu_cxx::__normal_iterator<std::reference_wrapper<cudf::ast::expression const> const*, std::vector<std::reference_wrapper<cudf::ast::expression const>, std::allocator<std::reference_wrapper<cudf::ast::expression const> > > >, cudf::ast::operation::may_evaluate_null(cudf::table_view const&, cudf::table_view const&, rmm::cuda_stream_view) const::{lambda(std::reference_wrapper<cudf::ast::expression const>)#1}>(__gnu_cxx::__normal_iterator<std::reference_wrapper<cudf::ast::expression const> const*, std::vector<std::reference_wrapper<cudf::ast::expression const>, std::allocator<std::reference_wrapper<cudf::ast::expression const> > > >, __gnu_cxx::__normal_iterator<std::reference_wrapper<cudf::ast::expression const> const*, std::vector<std::reference_wrapper<cudf::ast::expression const>, std::allocator<std::reference_wrapper<cudf::ast::expression const> > > >, cudf::ast::operation::may_evaluate_null(cudf::table_view const&, cudf::table_view const&, rmm::cuda_stream_view) const::{lambda(std::reference_wrapper<cudf::ast::expression const>)#1}) (__first=..., __last=..., __pred=...)
    at /conda/envs/rapids/lib/gcc/x86_64-conda-linux-gnu/11.4.0/include/c++/bits/stl_algo.h:490
#24 0x00007fc471fae83c in cudf::ast::operation::may_evaluate_null (this=0x7ffe253a7a90, left=..., right=..., stream=...)
    at /cudf/cpp/include/cudf/ast/expressions.hpp:503
#25 0x00007fc477711666 in cudf::ast::expression::may_evaluate_null (this=0x7ffe253a7a90, left=..., stream=...)
    at /cudf/cpp/include/cudf/ast/expressions.hpp:75
#26 0x00007fc47770fe50 in cudf::detail::compute_column (table=..., expr=..., stream=..., mr=...) at /cudf/cpp/src/transform/compute_column.cu:92
#27 0x00007fc477710544 in cudf::compute_column (table=..., expr=..., stream=..., mr=...) at /cudf/cpp/src/transform/compute_column.cu:145
#28 0x00005c5d28a64164 in TransformTest_DeeplyNestedArithmeticLogicalExpression_Test::TestBody (this=0x5c5d295e58e0)
davidwendt commented 5 days ago

cc @bdice @lamarrr

bdice commented 5 days ago

Can we verify if this is new since https://github.com/rapidsai/cudf/pull/17156 was merged?

davidwendt commented 5 days ago

Can we verify if this is new since #17156 was merged?

Sorry. I've not been able to determine that. I tried going all the way back to 24.10 and still see the error. And I know this was passing up to about maybe two weeks ago.

lamarrr commented 1 day ago

I've pushed a fix for it. I feel it would be worth it to use the new ast tree in #17156 to manage the expressions instead of manually creating the expressions.