Skip to content

snowflake: adbc_ingest will fail with "double free" segmentation fault if record batch schema is incorrect #2108

Open
@pkit

Description

@pkit

What happened?

If schema of RecordBatchReader doesn't match the actual batch columns - adbc driver crashes.
It's also pretty hard to debug why, because the only lead is "double free or corruption (out)".
Needed to run under valgrind to understand what's going on.
For some reason it fails in go with a proper exception "index out of bounds" but then it's not propagated to the python code.

Stack Trace

No response

How can we reproduce the bug?

    schema = pa.schema(fields=[
        pa.field("name1", pa.string()),
        pa.field("name2", pa.string()),
    ])
    data = [
        {"name1": "aaa"},
        {"name1": "bbb"},
    ]
    reader = pa.RecordBatchReader.from_batches(schema, [pa.RecordBatch.from_pylist(data)])
    with c.cursor() as cur:
        cur.adbc_ingest("test2", reader, mode="create_append")

Environment/Setup

Latest

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions