Skip to content

D_ASSERT triggered in row_group.cpp #683

@milla-henriksson-tgr-wrt

Description

Hello,

What would cause D_ASSERT(!FlatVector::IsNull(result_vector, result_idx)); (line 788) inside RowGroup::FetchRow in row_group.cpp, to fire during a TRUNCATE/DELETE command?

I see my program crash at this assertion whenever TRUNCATE is ran. No clear explanation rises from constraints (the data itself is valid).

This crashing sometimes exists with error "TransactionContext Error: Failed to commit: resource deadlock would occur" but I am unable to connect these two separate issues with each other.

I am developing a Tauri (multi-process) application with duckdb as the database.

As per chapter 'Writing to DuckDB from Multiple Processes' in DuckDB documentation, I control access to the database file with application logic (with RwLock instead of a Mutex).

After acquiring write access from the lock, I have code that runs first TRUNCATEs on my tables, then inserts polars dataframes from a parquet file. The crash happens during the TRUNCATE command.

I was able to do a workaround by dropping the tables and recreating them and inserting the dataframes to empty tables. My schema follows a traditional star schema so I have foreign keys and indexes on them.

I'm assuming the crash is related somehow to foreign keys, as dropping the foreign keys stops the crashing.

Any guidance or insight on what might cause this assertion to trigger in this context would be greatly appreciated.

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