Skip to content

INTERNAL Error: Attempted to dereference shared_ptr that is NULL! #134

@xl2powerbi-oldmac

Description

@xl2powerbi-oldmac

What happens?

When running a CREATE TABLE script using Python hosted in an Azure Function I receive an INTERNAL ERROR. I've tried upgrading to the latest version and rolling back to earlier versions. The bug only appears when executing in Linux Debian 11 and runs locally on Windows 11.

To Reproduce

Running the following SQL in an Azure Function:

BEGIN
    ;
    CREATE OR REPLACE TABLE stg.area AS 
    SELECT *
    FROM 'az://stg/area.parquet'
    ;
END    

Leads to the following error:

INTERNAL Error: Attempted to dereference shared_ptr that is NULL!
This error signals an assertion failure within DuckDB. This usually occurs due to unexpected conditions or errors in the program's logic.
For more information, see https://duckdb.org/docs/stable/dev/internal_errors

Stack Trace:

/home/site/wwwroot/.python_packages/lib/site-packages/_duckdb.cpython-312-x86_64-linux-gnu.so(_ZN6duckdb9Exception6ToJSONENS_13ExceptionTypeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x56) [0x7fcf22778446]
/home/site/wwwroot/.python_packages/lib/site-packages/_duckdb.cpython-312-x86_64-linux-gnu.so(_ZN6duckdb9ExceptionC2ENS_13ExceptionTypeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x14) [0x7fcf227784f4]
/home/site/wwwroot/.python_packages/lib/site-packages/_duckdb.cpython-312-x86_64-linux-gnu.so(_ZN6duckdb17InternalExceptionC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x11) [0x7fcf2277b5f1]
/home/site/wwwroot/.python_packages/lib/site-packages/_duckdb.cpython-312-x86_64-linux-gnu.so(+0x7ac575) [0x7fcf21dac575]
/home/site/wwwroot/.python_packages/lib/site-packages/_duckdb.cpython-312-x86_64-linux-gnu.so(+0xc034b3) [0x7fcf222034b3]
/home/site/wwwroot/.python_packages/lib/site-packages/_duckdb.cpython-312-x86_64-linux-gnu.so(+0xc25a17) [0x7fcf22225a17]
/home/site/wwwroot/.python_packages/lib/site-packages/_duckdb.cpython-312-x86_64-linux-gnu.so(+0xb95cd5) [0x7fcf22195cd5]
/opt/python/3/lib/libpython3.12.so.1.0(+0x225911) [0x7fcf754cc911]
/opt/python/3/lib/libpython3.12.so.1.0(_PyObject_MakeTpCall+0x2fb) [0x7fcf754af2eb]
/opt/python/3/lib/libpython3.12.so.1.0(+0x115538) [0x7fcf753bc538]
/opt/python/3/lib/libpython3.12.so.1.0(+0x24febb) [0x7fcf754f6ebb]
/opt/python/3/lib/libpython3.12.so.1.0(+0x203f44) [0x7fcf754aaf44]
/opt/python/3/lib/libpython3.12.so.1.0(+0x309274) [0x7fcf755b0274]
/opt/python/3/lib/libpython3.12.so.1.0(PyObject_Vectorcall+0x4f) [0x7fcf754c231f]
/opt/python/3/lib/libpython3.12.so.1.0(+0x115538) [0x7fcf753bc538]
/opt/python/3/lib/libpython3.12.so.1.0(+0x24febb) [0x7fcf754f6ebb]
/opt/python/3/lib/libpython3.12.so.1.0(+0x1161af) [0x7fcf753bd1af]
/opt/python/3/lib/libpython3.12.so.1.0(+0x250386) [0x7fcf754f7386]
/opt/python/3/lib/libpython3.12.so.1.0(+0x24ff47) [0x7fcf754f6f47]
/opt/python/3/lib/libpython3.12.so.1.0(+0x333493) [0x7fcf755da493]
/opt/python/3/lib/libpython3.12.so.1.0(+0x320a24) [0x7fcf755c7a24]
/lib/x86_64-linux-gnu/libc.so.6(+0x891f5) [0x7fcf751491f5]
/lib/x86_64-linux-gnu/libc.so.6(+0x1098dc) [0x7fcf751c98dc]

As I said, I've rolled back DuckDB to versions back to 1.0 and up to 1.4 with the same result. I've also tried Python 3.11 and 3.12.

OS:

Linux Debian 11

DuckDB Version:

1.4

DuckDB Client:

Python

Hardware:

4 vCPU, 8GB Ram

Full Name:

David Swann

Affiliation:

Hostview

Did you include all relevant configuration (e.g., CPU architecture, Linux distribution) to reproduce the issue?

  • Yes, I have

Did you include all code required to reproduce the issue?

  • Yes, I have

Did you include all relevant data sets for reproducing the issue?

No - I cannot share the data sets because they are confidential

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions