malloydata / malloy

Malloy is an experimental language for describing data relationships and transformations.
http://www.malloydata.dev
MIT License
1.99k stars 76 forks source link

duckdb seg fault #798

Open bporterfield opened 2 years ago

bporterfield commented 2 years ago

Perhaps not much of a problem today, but as we move towards folks using our npm libraries, it's probably worth catching these duckdb.node seg faults and dealing with them better. Writing this down so we're aware this exists.

import { Runtime } from "@malloydata/malloy";
import { DuckDBConnection } from "@malloydata/db-duckdb";

const connection = new DuckDBConnection("duckdb-example-this-name-does-not-exist");
const runtime = new Runtime(connection);

output:

> const runtime = new Runtime(connection);[1]    33416 segmentation fault  npx ts-node
cons0l3 commented 1 year ago

I am playing around with imdb example. When running the make file, the duckdb import of the titles also throws a segmentation fault.

~> make
duckdb < build_titles.sql
100% ▕████████████████████████████████████████████████████████████▏ bash: line 1:   533 Segmentation fault      duckdb < build_titles.sql
make: *** [makefile:16: data/titles.parquet] Error 139

Is this related? I will head over to the duckdb github and see what I can find there.

> duckdb --version
v0.6.1 919cad22e8
#  https://github.com/malloydata/malloy-composer/releases/download/v0.0.1670541413/
> composer --version
0.0.1
cons0l3 commented 1 year ago

I have opened an issue with duckdb: https://github.com/duckdb/duckdb/issues/5906

whscullin commented 1 year ago

Thank you for filing that issue. Although there's no Malloy code in the mix when we're doing those imports, depending on the underlying issue, it is something we could possibly encounter when running Composer and we do need to deal with that.

cons0l3 commented 1 year ago

I have just tested, that with the succefull merge of duckdb/duckdb#5875 into duckdb master by @Mytherin the bug is fixed. It should be part of the next release of duckdb>=0.62.