cwida / duckpgq-extension

DuckDB extension that adds support for SQL/PGQ
https://duckpgq.notion.site/b8ac652667964f958bfada1c3e53f1bb?v=3b47a8d44bdf4e0c8b503bf23f1b76f2
MIT License
86 stars 7 forks source link

get_csr_w_type test has a seg fault #81

Closed Dtenwolde closed 4 months ago

Dtenwolde commented 9 months ago

Running test/sql/scalar/get_csr_w_type.test leads to a segfault:

Member access within misaligned address 0xbebebebebebebebe for type 'std::__hash_node_base<std::__hash_node<std::__hash_value_type<int, duckdb::unique_ptr<duckdb::CSR>>, void *> *>', which requires 8 byte alignment
<memory cannot be printed>
  at 0x127c77df8 std::__1::__hash_iterator<std::__1::__hash_node<std::__1::__hash_value_type<int, duckdb::unique_ptr<duckdb::CSR, std::__1::default_delete<duckdb::CSR>, true>>, void*>*> std::__1::__hash_table<std::__1::__hash_value_type<int, duckdb::unique_ptr<duckdb::CSR, std::__1::default_delete<duckdb::CSR>, true>>, std::__1::__unordered_map_hasher<int, std::__1::__hash_value_type<int, duckdb::unique_ptr<duckdb::CSR, std::__1::default_delete<duckdb::CSR>, true>>, std::__1::hash<int>, std::__1::equal_to<int>, true>, std::__1::__unordered_map_equal<int, std::__1::__hash_value_type<int, duckdb::unique_ptr<duckdb::CSR, std::__1::default_delete<duckdb::CSR>, true>>, std::__1::equal_to<int>, std::__1::hash<int>, true>, std::__1::allocator<std::__1::__hash_value_type<int, duckdb::unique_ptr<duckdb::CSR, std::__1::default_delete<duckdb::CSR>, true>>>>::find<int>(int const&) (__hash_table:2319)
  at 0x127c76f9c std::__1::unordered_map<int, duckdb::unique_ptr<duckdb::CSR, std::__1::default_delete<duckdb::CSR>, true>, std::__1::hash<int>, std::__1::equal_to<int>, std::__1::allocator<std::__1::pair<int const, duckdb::unique_ptr<duckdb::CSR, std::__1::default_delete<duckdb::CSR>, true>>>>::find[abi:v160006](int const&) (unordered_map:1443)
  at 0x127d381dc duckdb::CreateCsrVertexFunction(duckdb::DataChunk&, duckdb::ExpressionState&, duckdb::Vector&) (csr_creation.cpp:109)
  at 0x105525190 decltype(std::declval<void (*&)(duckdb::DataChunk&, duckdb::ExpressionState&, duckdb::Vector&)>()(std::declval<duckdb::DataChunk&>(), std::declval<duckdb::ExpressionState&>(), std::declval<duckdb::Vector&>())) std::__1::__invoke[abi:v160006]<void (*&)(duckdb::DataChunk&, duckdb::ExpressionState&, duckdb::Vector&), duckdb::DataChunk&, duckdb::ExpressionState&, duckdb::Vector&>(void (*&)(duckdb::DataChunk&, duckdb::ExpressionState&, duckdb::Vector&), duckdb::DataChunk&, duckdb::ExpressionState&, duckdb::Vector&) (invoke.h:394)
  at 0x105524ee4 void std::__1::__invoke_void_return_wrapper<void, true>::__call<void (*&)(duckdb::DataChunk&, duckdb::ExpressionState&, duckdb::Vector&), duckdb::DataChunk&, duckdb::ExpressionState&, duckdb::Vector&>(void (*&)(duckdb::DataChunk&, duckdb::ExpressionState&, duckdb::Vector&), duckdb::DataChunk&, duckdb::ExpressionState&, duckdb::Vector&) (invoke.h:487)
  at 0x120a12300 std::__1::__function::__alloc_func<void (*)(duckdb::DataChunk&, duckdb::ExpressionState&, duckdb::Vector&), std::__1::allocator<void (*)(duckdb::DataChunk&, duckdb::ExpressionState&, duckdb::Vector&)>, void (duckdb::DataChunk&, duckdb::ExpressionState&, duckdb::Vector&)>::operator()[abi:v160006](duckdb::DataChunk&, duckdb::ExpressionState&, duckdb::Vector&) (function.h:185)
  at 0x120a0b384 std::__1::__function::__func<void (*)(duckdb::DataChunk&, duckdb::ExpressionState&, duckdb::Vector&), std::__1::allocator<void (*)(duckdb::DataChunk&, duckdb::ExpressionState&, duckdb::Vector&)>, void (duckdb::DataChunk&, duckdb::ExpressionState&, duckdb::Vector&)>::operator()(duckdb::DataChunk&, duckdb::ExpressionState&, duckdb::Vector&) (function.h:356)
  at 0x1249ec528 std::__1::__function::__value_func<void (duckdb::DataChunk&, duckdb::ExpressionState&, duckdb::Vector&)>::operator()[abi:v160006](duckdb::DataChunk&, duckdb::ExpressionState&, duckdb::Vector&) const (function.h:510)
  at 0x124665f08 std::__1::function<void (duckdb::DataChunk&, duckdb::ExpressionState&, duckdb::Vector&)>::operator()(duckdb::DataChunk&, duckdb::ExpressionState&, duckdb::Vector&) const (function.h:1156)
  at 0x1246657a4 duckdb::ExpressionExecutor::Execute(duckdb::BoundFunctionExpression const&, duckdb::ExpressionState*, duckdb::SelectionVector const*, unsigned long long, duckdb::Vector&) (execute_function.cpp:79)
  at 0x125572244 duckdb::ExpressionExecutor::Execute(duckdb::Expression const&, duckdb::ExpressionState*, duckdb::SelectionVector const*, unsigned long long, duckdb::Vector&) (expression_executor.cpp:211)
  at 0x12556f7b0 duckdb::ExpressionExecutor::ExecuteExpression(unsigned long long, duckdb::Vector&) (expression_executor.cpp:105)
  at 0x12556ed2c duckdb::ExpressionExecutor::Execute(duckdb::DataChunk*, duckdb::DataChunk&) (expression_executor.cpp:76)
  at 0x121121e6c duckdb::ExpressionExecutor::Execute(duckdb::DataChunk&, duckdb::DataChunk&) (expression_executor.hpp:50)
  at 0x1252621d4 duckdb::PhysicalProjection::Execute(duckdb::ExecutionContext&, duckdb::DataChunk&, duckdb::DataChunk&, duckdb::GlobalOperatorState&, duckdb::OperatorState&) const (physical_projection.cpp:31)
  at 0x125f5debc duckdb::PipelineExecutor::Execute(duckdb::DataChunk&, duckdb::DataChunk&, unsigned long long) (pipeline_executor.cpp:468)
  at 0x125f57c48 duckdb::PipelineExecutor::ExecutePushInternal(duckdb::DataChunk&, unsigned long long) (pipeline_executor.cpp:273)
  at 0x125f56a28 duckdb::PipelineExecutor::TryFlushCachingOperators() (pipeline_executor.cpp:91)
  at 0x125f5a830 duckdb::PipelineExecutor::Execute(unsigned long long) (pipeline_executor.cpp:185)
  at 0x125f5cd74 duckdb::PipelineExecutor::Execute() (pipeline_executor.cpp:243)
  at 0x12604f0d0 duckdb::PipelineTask::ExecuteTask(duckdb::TaskExecutionMode) (pipeline.cpp:50)
  at 0x125f1bf84 duckdb::ExecutorTask::Execute(duckdb::TaskExecutionMode) (executor_task.cpp:28)
  at 0x125f6564c duckdb::TaskScheduler::ExecuteForever(std::__1::atomic<bool>*) (task_scheduler.cpp:139)
  at 0x125f6844c duckdb::ThreadExecuteTasks(duckdb::TaskScheduler*, std::__1::atomic<bool>*) (task_scheduler.cpp:227)
  at 0x12609dd34 decltype(std::declval<void (*)(duckdb::TaskScheduler*, std::__1::atomic<bool>*)>()(std::declval<duckdb::TaskScheduler*>(), std::declval<std::__1::atomic<bool>*>())) std::__1::__invoke[abi:v160006]<void (*)(duckdb::TaskScheduler*, std::__1::atomic<bool>*), duckdb::TaskScheduler*, std::__1::atomic<bool>*>(void (*&&)(duckdb::TaskScheduler*, std::__1::atomic<bool>*), duckdb::TaskScheduler*&&, std::__1::atomic<bool>*&&) (invoke.h:394)
  at 0x12609dbf8 void std::__1::__thread_execute[abi:v160006]<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void (*)(duckdb::TaskScheduler*, std::__1::atomic<bool>*), duckdb::TaskScheduler*, std::__1::atomic<bool>*, 2ul, 3ul>(std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void (*)(duckdb::TaskScheduler*, std::__1::atomic<bool>*), duckdb::TaskScheduler*, std::__1::atomic<bool>*>&, std::__1::__tuple_indices<2ul, 3ul>) (thread:288)
  at 0x12609c730 void* std::__1::__thread_proxy[abi:v160006]<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void (*)(duckdb::TaskScheduler*, std::__1::atomic<bool>*), duckdb::TaskScheduler*, std::__1::atomic<bool>*>>(void*) (thread:299)
  at 0x1811b3030 _pthread_start
  at 0x1811ade38 thread_start
Dtenwolde commented 4 months ago

Does not seem the case any more, closing this