You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "stenlarsson (via GitHub)" <gi...@apache.org> on 2023/06/01 08:55:42 UTC

[GitHub] [arrow] stenlarsson commented on issue #35819: [Ruby] Random segfault in hash join

stenlarsson commented on issue #35819:
URL: https://github.com/apache/arrow/issues/35819#issuecomment-1571631187

   It was harder to make it crash with `GC.disable` but I managed to do it in my macOS development environment. I don't think you can install debug symbols with Homebrew, sorry.
   
   ```
   * thread #11, stop reason = EXC_BAD_ACCESS (code=1, address=0x31d4d0020)
     * frame #0: 0x0000000129932f74 libarrow.1200.0.0.dylib`arrow::util::TempVectorStack::alloc(unsigned int, unsigned char**, int*) + 120
       frame #1: 0x0000000129926afc libarrow.1200.0.0.dylib`arrow::compute::KeyCompare::CompareColumnsToRows(unsigned int, unsigned short const*, unsigned int const*, arrow::compute::LightContext*, unsigned int*, unsigned short*, std::__1::vector<arrow::compute::KeyColumnArray, std::__1::allocator<arrow::compute::KeyColumnArray> > const&, arrow::compute::RowTableImpl const&, bool, unsigned char*) + 132
       frame #2: 0x000000012808a230 libarrow_acero.1200.0.0.dylib`arrow::acero::RowArray::Compare(arrow::compute::ExecBatch const&, int, int, int, unsigned short const*, unsigned int const*, unsigned int*, unsigned short*, long long, arrow::util::TempVectorStack*, std::__1::vector<arrow::compute::KeyColumnArray, std::__1::allocator<arrow::compute::KeyColumnArray> >&, unsigned char*) + 144
       frame #3: 0x000000012808c91c libarrow_acero.1200.0.0.dylib`arrow::acero::SwissTableWithKeys::EqualCallback(int, unsigned short const*, unsigned int const*, unsigned int*, unsigned short*, void*) + 260
       frame #4: 0x0000000129871cb4 libarrow.1200.0.0.dylib`std::__1::function<void (int, unsigned short const*, unsigned int const*, unsigned int*, unsigned short*, void*)>::operator()(int, unsigned short const*, unsigned int const*, unsigned int*, unsigned short*, void*) const + 72
       frame #5: 0x0000000129872004 libarrow.1200.0.0.dylib`arrow::compute::SwissTable::find(int, unsigned int const*, unsigned char*, unsigned char const*, unsigned int*, arrow::util::TempVectorStack*, std::__1::function<void (int, unsigned short const*, unsigned int const*, unsigned int*, unsigned short*, void*)> const&, void*) const + 832
       frame #6: 0x000000012808ce38 libarrow_acero.1200.0.0.dylib`arrow::acero::SwissTableWithKeys::Map(arrow::acero::SwissTableWithKeys::Input*, bool, unsigned int const*, unsigned char*, unsigned int*) + 528
       frame #7: 0x000000012808cc08 libarrow_acero.1200.0.0.dylib`arrow::acero::SwissTableWithKeys::MapReadOnly(arrow::acero::SwissTableWithKeys::Input*, unsigned int const*, unsigned char*, unsigned int*) + 36
       frame #8: 0x000000012808f638 libarrow_acero.1200.0.0.dylib`arrow::acero::JoinProbeProcessor::OnNextBatch(long long, arrow::compute::ExecBatch const&, arrow::util::TempVectorStack*, std::__1::vector<arrow::compute::KeyColumnArray, std::__1::allocator<arrow::compute::KeyColumnArray> >*) + 560
       frame #9: 0x0000000128091170 libarrow_acero.1200.0.0.dylib`arrow::acero::SwissJoin::ProbeSingleBatch(unsigned long, arrow::compute::ExecBatch) + 540
       frame #10: 0x000000012806bc1c libarrow_acero.1200.0.0.dylib`arrow::acero::HashJoinNode::OnProbeSideBatch(unsigned long, arrow::compute::ExecBatch) + 216
       frame #11: 0x000000012806ae40 libarrow_acero.1200.0.0.dylib`arrow::acero::HashJoinNode::InputReceived(arrow::acero::ExecNode*, arrow::compute::ExecBatch) + 364
       frame #12: 0x000000012806e2d4 libarrow_acero.1200.0.0.dylib`arrow::acero::HashJoinNode::OutputBatchCallback(arrow::compute::ExecBatch) + 100
       frame #13: 0x000000012806e1e0 libarrow_acero.1200.0.0.dylib`arrow::acero::HashJoinNode::Init()::'lambda'(long long, arrow::compute::ExecBatch)::operator()(long long, arrow::compute::ExecBatch) const + 116
       frame #14: 0x000000012806e0e0 libarrow_acero.1200.0.0.dylib`decltype(std::declval<arrow::acero::HashJoinNode::Init()::'lambda'(long long, arrow::compute::ExecBatch)&>()(std::declval<long long>(), std::declval<arrow::compute::ExecBatch>())) std::__1::__invoke[abi:v15006]<arrow::acero::HashJoinNode::Init()::'lambda'(long long, arrow::compute::ExecBatch)&, long long, arrow::compute::ExecBatch>(arrow::acero::HashJoinNode::Init()::'lambda'(long long, arrow::compute::ExecBatch)&, long long&&, arrow::compute::ExecBatch&&) + 84
       frame #15: 0x000000012808f8f4 libarrow_acero.1200.0.0.dylib`arrow::acero::JoinProbeProcessor::OnNextBatch(long long, arrow::compute::ExecBatch const&, arrow::util::TempVectorStack*, std::__1::vector<arrow::compute::KeyColumnArray, std::__1::allocator<arrow::compute::KeyColumnArray> >*) + 1260
       frame #16: 0x0000000128091170 libarrow_acero.1200.0.0.dylib`arrow::acero::SwissJoin::ProbeSingleBatch(unsigned long, arrow::compute::ExecBatch) + 540
       frame #17: 0x000000012806bc1c libarrow_acero.1200.0.0.dylib`arrow::acero::HashJoinNode::OnProbeSideBatch(unsigned long, arrow::compute::ExecBatch) + 216
       frame #18: 0x000000012806ae40 libarrow_acero.1200.0.0.dylib`arrow::acero::HashJoinNode::InputReceived(arrow::acero::ExecNode*, arrow::compute::ExecBatch) + 364
       frame #19: 0x000000012806e2d4 libarrow_acero.1200.0.0.dylib`arrow::acero::HashJoinNode::OutputBatchCallback(arrow::compute::ExecBatch) + 100
       frame #20: 0x000000012806e1e0 libarrow_acero.1200.0.0.dylib`arrow::acero::HashJoinNode::Init()::'lambda'(long long, arrow::compute::ExecBatch)::operator()(long long, arrow::compute::ExecBatch) const + 116
       frame #21: 0x000000012806e0e0 libarrow_acero.1200.0.0.dylib`decltype(std::declval<arrow::acero::HashJoinNode::Init()::'lambda'(long long, arrow::compute::ExecBatch)&>()(std::declval<long long>(), std::declval<arrow::compute::ExecBatch>())) std::__1::__invoke[abi:v15006]<arrow::acero::HashJoinNode::Init()::'lambda'(long long, arrow::compute::ExecBatch)&, long long, arrow::compute::ExecBatch>(arrow::acero::HashJoinNode::Init()::'lambda'(long long, arrow::compute::ExecBatch)&, long long&&, arrow::compute::ExecBatch&&) + 84
       frame #22: 0x000000012808f8f4 libarrow_acero.1200.0.0.dylib`arrow::acero::JoinProbeProcessor::OnNextBatch(long long, arrow::compute::ExecBatch const&, arrow::util::TempVectorStack*, std::__1::vector<arrow::compute::KeyColumnArray, std::__1::allocator<arrow::compute::KeyColumnArray> >*) + 1260
       frame #23: 0x0000000128091170 libarrow_acero.1200.0.0.dylib`arrow::acero::SwissJoin::ProbeSingleBatch(unsigned long, arrow::compute::ExecBatch) + 540
       frame #24: 0x000000012806bc1c libarrow_acero.1200.0.0.dylib`arrow::acero::HashJoinNode::OnProbeSideBatch(unsigned long, arrow::compute::ExecBatch) + 216
       frame #25: 0x000000012806ae40 libarrow_acero.1200.0.0.dylib`arrow::acero::HashJoinNode::InputReceived(arrow::acero::ExecNode*, arrow::compute::ExecBatch) + 364
       frame #26: 0x000000012806e2d4 libarrow_acero.1200.0.0.dylib`arrow::acero::HashJoinNode::OutputBatchCallback(arrow::compute::ExecBatch) + 100
       frame #27: 0x000000012806e1e0 libarrow_acero.1200.0.0.dylib`arrow::acero::HashJoinNode::Init()::'lambda'(long long, arrow::compute::ExecBatch)::operator()(long long, arrow::compute::ExecBatch) const + 116
       frame #28: 0x000000012806e0e0 libarrow_acero.1200.0.0.dylib`decltype(std::declval<arrow::acero::HashJoinNode::Init()::'lambda'(long long, arrow::compute::ExecBatch)&>()(std::declval<long long>(), std::declval<arrow::compute::ExecBatch>())) std::__1::__invoke[abi:v15006]<arrow::acero::HashJoinNode::Init()::'lambda'(long long, arrow::compute::ExecBatch)&, long long, arrow::compute::ExecBatch>(arrow::acero::HashJoinNode::Init()::'lambda'(long long, arrow::compute::ExecBatch)&, long long&&, arrow::compute::ExecBatch&&) + 84
       frame #29: 0x00000001280904c8 libarrow_acero.1200.0.0.dylib`arrow::acero::JoinProbeProcessor::OnFinished() + 316
       frame #30: 0x0000000128094468 libarrow_acero.1200.0.0.dylib`arrow::acero::SwissJoin::OnScanHashTableFinished() + 52
       frame #31: 0x0000000128094d40 libarrow_acero.1200.0.0.dylib`arrow::acero::SwissJoin::StartScanHashTable(long long) + 148
       frame #32: 0x0000000128091338 libarrow_acero.1200.0.0.dylib`arrow::acero::SwissJoin::ProbingFinished(unsigned long) + 48
       frame #33: 0x000000012806af40 libarrow_acero.1200.0.0.dylib`arrow::acero::HashJoinNode::InputReceived(arrow::acero::ExecNode*, arrow::compute::ExecBatch) + 620
       frame #34: 0x00000001280867e0 libarrow_acero.1200.0.0.dylib`std::__1::__function::__func<arrow::acero::(anonymous namespace)::SourceNode::SliceAndDeliverMorsel(arrow::compute::ExecBatch const&)::'lambda'(), std::__1::allocator<arrow::acero::(anonymous namespace)::SourceNode::SliceAndDeliverMorsel(arrow::compute::ExecBatch const&)::'lambda'()>, arrow::Status ()>::operator()() + 500
       frame #35: 0x000000012807c940 libarrow_acero.1200.0.0.dylib`std::__1::enable_if<!std::is_void<arrow::Status>::value && !is_future<arrow::Status>::value && (!arrow::Future<arrow::internal::Empty>::is_empty || std::is_same<arrow::Status, arrow::Status>::value), void>::type arrow::detail::ContinueFuture::operator()<std::__1::function<arrow::Status ()>&, arrow::Status, arrow::Future<arrow::internal::Empty> >(arrow::Future<arrow::internal::Empty>, std::__1::function<arrow::Status ()>&) const + 44
       frame #36: 0x000000012807c8bc libarrow_acero.1200.0.0.dylib`std::__1::__bind_return<arrow::detail::ContinueFuture, std::__1::tuple<arrow::Future<arrow::internal::Empty>, std::__1::function<arrow::Status ()> >, std::__1::tuple<>, __is_valid_bind_return<arrow::detail::ContinueFuture, std::__1::tuple<arrow::Future<arrow::internal::Empty>, std::__1::function<arrow::Status ()> >, std::__1::tuple<> >::value>::type std::__1::__bind<arrow::detail::ContinueFuture, arrow::Future<arrow::internal::Empty>&, std::__1::function<arrow::Status ()> >::operator()[abi:v15006]<>() + 52
       frame #37: 0x0000000129764b18 libarrow.1200.0.0.dylib`void* std::__1::__thread_proxy[abi:v15006]<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, arrow::internal::ThreadPool::LaunchWorkersUnlocked(int)::$_6> >(void*) + 392
       frame #38: 0x0000000198153fa8 libsystem_pthread.dylib`_pthread_start + 148
   ```
   
   It is still very random, and with `OMP_NUM_THREADS=1` I've never gotten it to crash.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org