westonpace commented on issue #35649:
URL: https://github.com/apache/arrow/issues/35649#issuecomment-1584992797
Normally when I see a stack usage warning like that it's because of
excessive (or infinite) recursion. However, that doesn't seem to be the case
here:
It's a (refreshingly) readable stack trace:
```
Thread 40 "R" hit Catchpoint 1 (exception thrown), __cxxabiv1::__cxa_throw
(obj=0x7fff3114da20, tinfo=0x7fff56e79ac8 <typeinfo for
cpp11::unwind_exception>, dest=0x7fff55c8dcb0
<cpp11::unwind_exception::~unwind_exception()>) at
../../../../libstdc++-v3/libsupc++/eh_throw.cc:80
80 ../../../../libstdc++-v3/libsupc++/eh_throw.cc: No such file or
directory.
(gdb) bt
#0 __cxxabiv1::__cxa_throw (obj=0x7fff3114da20, tinfo=0x7fff56e79ac8
<typeinfo for cpp11::unwind_exception>, dest=0x7fff55c8dcb0
<cpp11::unwind_exception::~unwind_exception()>)
at ../../../../libstdc++-v3/libsupc++/eh_throw.cc:80
#1 0x00007fff55c961a7 in SEXPREC*
cpp11::unwind_protect<cpp11::detail::closure<SEXPREC* (SEXPREC*, SEXPREC*),
cpp11::sexp&, SEXPREC*&>, void>(cpp11::detail::closure<SEXPREC* (SEXPREC*,
SEXPREC*), cpp11::sexp&, SEXPREC*&>&&) () from
/home/pace/miniconda3/envs/conbench3/lib/R/library/duckdb/libs/duckdb.so
#2 0x00007fff55ca599d in RArrowTabularStreamFactory::Produce(unsigned long,
duckdb::ArrowStreamParameters&) () from
/home/pace/miniconda3/envs/conbench3/lib/R/library/duckdb/libs/duckdb.so
#3 0x00007fff565bbd15 in
duckdb::ProduceArrowScan(duckdb::ArrowScanFunctionData const&,
duckdb::vector<unsigned long, true> const&, duckdb::TableFilterSet*) ()
from
/home/pace/miniconda3/envs/conbench3/lib/R/library/duckdb/libs/duckdb.so
#4 0x00007fff565bc82c in
duckdb::ArrowTableFunction::ArrowScanInitGlobal(duckdb::ClientContext&,
duckdb::TableFunctionInitInput&) ()
from
/home/pace/miniconda3/envs/conbench3/lib/R/library/duckdb/libs/duckdb.so
#5 0x00007fff563a7255 in
duckdb::PhysicalTableScan::GetGlobalSourceState(duckdb::ClientContext&) const
() from /home/pace/miniconda3/envs/conbench3/lib/R/library/duckdb/libs/duckdb.so
#6 0x00007fff566e87df in duckdb::Pipeline::ResetSource(bool) () from
/home/pace/miniconda3/envs/conbench3/lib/R/library/duckdb/libs/duckdb.so
#7 0x00007fff566e898b in duckdb::Pipeline::Reset() () from
/home/pace/miniconda3/envs/conbench3/lib/R/library/duckdb/libs/duckdb.so
#8 0x00007fff566f7d29 in duckdb::Executor::NextExecutor() () from
/home/pace/miniconda3/envs/conbench3/lib/R/library/duckdb/libs/duckdb.so
#9 0x00007fff566f8064 in duckdb::Executor::FetchChunk() () from
/home/pace/miniconda3/envs/conbench3/lib/R/library/duckdb/libs/duckdb.so
#10 0x00007fff56642f0e in
duckdb::ClientContext::FetchInternal(duckdb::ClientContextLock&,
duckdb::Executor&, duckdb::BaseQueryResult&) ()
from
/home/pace/miniconda3/envs/conbench3/lib/R/library/duckdb/libs/duckdb.so
#11 0x00007fff56642fcf in
duckdb::ClientContext::Fetch(duckdb::ClientContextLock&,
duckdb::StreamQueryResult&) () from
/home/pace/miniconda3/envs/conbench3/lib/R/library/duckdb/libs/duckdb.so
#12 0x00007fff5664307d in duckdb::StreamQueryResult::FetchRaw() () from
/home/pace/miniconda3/envs/conbench3/lib/R/library/duckdb/libs/duckdb.so
#13 0x00007fff56614a82 in duckdb::QueryResult::Fetch() () from
/home/pace/miniconda3/envs/conbench3/lib/R/library/duckdb/libs/duckdb.so
#14 0x00007fff55d913d5 in
duckdb::QueryResult::TryFetch(duckdb::unique_ptr<duckdb::DataChunk,
std::default_delete<duckdb::DataChunk>, true>&, duckdb::PreservedError&) ()
from
/home/pace/miniconda3/envs/conbench3/lib/R/library/duckdb/libs/duckdb.so
#15 0x00007fff55d9857b in
duckdb::ArrowUtil::TryFetchChunk(duckdb::QueryResult*, unsigned long,
ArrowArray*, unsigned long&, duckdb::PreservedError&) ()
from
/home/pace/miniconda3/envs/conbench3/lib/R/library/duckdb/libs/duckdb.so
#16 0x00007fff55d989a1 in
duckdb::ResultArrowArrayStreamWrapper::MyStreamGetNext(ArrowArrayStream*,
ArrowArray*) () from
/home/pace/miniconda3/envs/conbench3/lib/R/library/duckdb/libs/duckdb.so
#17 0x00007fff6875961e in arrow::(anonymous
namespace)::ArrayStreamBatchReader::ReadNext (this=0x555557df4d50,
batch=0x7fff3f7ee7e0) at /home/pace/dev/arrow/cpp/src/arrow/c/bridge.cc:1797
#18 0x00007fff6c264bfb in arrow::RecordBatchReader::Next
(this=0x555557df4d50) at /home/pace/dev/arrow/cpp/src/arrow/record_batch.h:257
#19 0x00007fff6c26dd0f in
arrow::MakeIteratorFromReader<arrow::RecordBatchReader>(std::shared_ptr<arrow::RecordBatchReader>
const&)::{lambda()#1}::operator()() const (__closure=0x55555bbc39d0)
at /home/pace/dev/arrow/cpp/src/arrow/util/iterator.h:565
#20 0x00007fff6c2863a8 in
arrow::FunctionIterator<arrow::MakeIteratorFromReader<arrow::RecordBatchReader>(std::shared_ptr<arrow::RecordBatchReader>
const&)::{lambda()#1}, std::shared_ptr<arrow::RecordBatch> >::Next()
(this=0x55555bbc39d0) at /home/pace/dev/arrow/cpp/src/arrow/util/iterator.h:346
#21 0x00007fff6c28257f in
arrow::Iterator<std::shared_ptr<arrow::RecordBatch>
>::Next<arrow::FunctionIterator<arrow::MakeIteratorFromReader<arrow::RecordBatchReader>(std::shared_ptr<arrow::RecordBatchReader>
const&)::{lambda()#1}, std::shared_ptr<arrow::RecordBatch> > >(void*)
(ptr=0x55555bbc39d0) at /home/pace/dev/arrow/cpp/src/arrow/util/iterator.h:200
#22 0x00007fff6c26d787 in
arrow::Iterator<std::shared_ptr<arrow::RecordBatch> >::Next
(this=0x55555b96d898) at /home/pace/dev/arrow/cpp/src/arrow/util/iterator.h:110
#23 0x00007fff6c32e09b in arrow::MapIterator<arrow::acero::(anonymous
namespace)::RecordBatchReaderSourceNode::MakeGenerator(const
std::shared_ptr<arrow::RecordBatchReader>&,
arrow::internal::Executor*)::<lambda(const
std::shared_ptr<arrow::RecordBatch>&)>, std::shared_ptr<arrow::RecordBatch>,
std::optional<arrow::compute::ExecBatch> >::Next(void) (this=0x55555b96d890)
at /home/pace/dev/arrow/cpp/src/arrow/util/iterator.h:428
#24 0x00007fff6c32cf1d in
arrow::Iterator<std::optional<arrow::compute::ExecBatch>
>::Next<arrow::MapIterator<arrow::acero::(anonymous
namespace)::RecordBatchReaderSourceNode::MakeGenerator(const
std::shared_ptr<arrow::RecordBatchReader>&,
arrow::internal::Executor*)::<lambda(const
std::shared_ptr<arrow::RecordBatch>&)>, std::shared_ptr<arrow::RecordBatch>,
std::optional<arrow::compute::ExecBatch> > >(void *) (
ptr=0x55555b96d890) at
/home/pace/dev/arrow/cpp/src/arrow/util/iterator.h:200
#25 0x00007fff6c269a85 in
arrow::Iterator<std::optional<arrow::compute::ExecBatch> >::Next
(this=0x555558b2fbe0) at /home/pace/dev/arrow/cpp/src/arrow/util/iterator.h:110
#26 0x00007fff6c290c44 in
arrow::BackgroundGenerator<std::optional<arrow::compute::ExecBatch>
>::WorkerTask (
state=std::shared_ptr<arrow::BackgroundGenerator<std::optional<arrow::compute::ExecBatch>
>::State> (use count 3, weak count 0) = {...}) at
/home/pace/dev/arrow/cpp/src/arrow/util/async_generator.h:1759
#27 0x00007fff6c28fd78 in
arrow::BackgroundGenerator<std::optional<arrow::compute::ExecBatch>
>::State::DoRestartTask(std::shared_ptr<arrow::BackgroundGenerator<std::optional<arrow::compute::ExecBatch>
>::State>, arrow::util::Mutex::Guard)::{lambda()#1}::operator()() const
(__closure=0x7fff38001ca8) at
/home/pace/dev/arrow/cpp/src/arrow/util/async_generator.h:1666
#28 0x00007fff6c293b96 in arrow::internal::FnOnce<void
()>::FnImpl<arrow::BackgroundGenerator<std::optional<arrow::compute::ExecBatch>
>::State::DoRestartTask(std::shared_ptr<arrow::BackgroundGenerator<std::optional<arrow::compute::ExecBatch>
>::State>, arrow::util::Mutex::Guard)::{lambda()#1}>::invoke()
(this=0x7fff38001ca0) at
/home/pace/dev/arrow/cpp/src/arrow/util/functional.h:152
#29 0x00007fff688a90a7 in arrow::internal::FnOnce<void ()>::operator()() &&
(this=0x7fff3f7eec70) at
/home/pace/dev/arrow/cpp/src/arrow/util/functional.h:140
#30 0x00007fff688a37c0 in arrow::internal::WorkerLoop
(state=std::shared_ptr<arrow::internal::ThreadPool::State> (use count 5, weak
count 1) = {...}, it={_M_id = {_M_thread = 140734258734656}})
at /home/pace/dev/arrow/cpp/src/arrow/util/thread_pool.cc:269
#31 0x00007fff688a46ee in operator() (__closure=0x7fff38001ce8) at
/home/pace/dev/arrow/cpp/src/arrow/util/thread_pool.cc:430
#32 0x00007fff688a871e in std::__invoke_impl<void,
arrow::internal::ThreadPool::LaunchWorkersUnlocked(int)::<lambda()>
>(std::__invoke_other, struct {...} &&) (__f=...) at
/usr/include/c++/11/bits/invoke.h:61
#33 0x00007fff688a86e1 in
std::__invoke<arrow::internal::ThreadPool::LaunchWorkersUnlocked(int)::<lambda()>
>(struct {...} &&) (__fn=...) at /usr/include/c++/11/bits/invoke.h:96
#34 0x00007fff688a868e in
std::thread::_Invoker<std::tuple<arrow::internal::ThreadPool::LaunchWorkersUnlocked(int)::<lambda()>
> >::_M_invoke<0>(std::_Index_tuple<0>) (this=0x7fff38001ce8)
at /usr/include/c++/11/bits/std_thread.h:253
#35 0x00007fff688a8662 in
std::thread::_Invoker<std::tuple<arrow::internal::ThreadPool::LaunchWorkersUnlocked(int)::<lambda()>
> >::operator()(void) (this=0x7fff38001ce8)
at /usr/include/c++/11/bits/std_thread.h:260
#36 0x00007fff688a8646 in
std::thread::_State_impl<std::thread::_Invoker<std::tuple<arrow::internal::ThreadPool::LaunchWorkersUnlocked(int)::<lambda()>
> > >::_M_run(void) (this=0x7fff38001ce0)
at /usr/include/c++/11/bits/std_thread.h:211
--Type <RET> for more, q to quit, c to continue without paging--
#37 0x00007ffff4919a93 in std::execute_native_thread_routine (__p=<optimized
out>) at ../../../../../libstdc++-v3/src/c++11/thread.cc:82
#38 0x00007ffff7694b43 in start_thread (arg=<optimized out>) at
./nptl/pthread_create.c:442
#39 0x00007ffff7726a00 in clone3 () at
../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
```
There are 1 or 2 other active threads and none of them seem to have any deep
stack either.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]