Environment
- OS: Ubuntu Linux x86_64 (6.8.0-101-generic)
- Node.js: v22.x
@ladybugdb/core: v0.15.4 and v0.15.4-dev.20260428
- Consumer: GitNexus v1.6.4-rc.21
Description
CREATE_FTS_INDEX segfaults (SIGSEGV, exit code 139) when called on node tables with non-trivial data volumes on Linux x86_64. The FTS extension loads successfully — the crash occurs specifically during index creation.
Works: In-memory DB with 2 rows — index creates, queries return correct results.
Crashes: On-disk DB with 1,000+ rows — segfaults immediately on CREATE_FTS_INDEX.
Minimal Reproduction
const Database = require("@ladybugdb/core/database.js");
const Connection = require("@ladybugdb/core/connection.js");
async function test() {
// This works fine:
const memDb = new Database(":memory:");
const memConn = new Connection(memDb);
await memConn.init();
await memConn.query("CREATE NODE TABLE T(id INT64, name STRING, content STRING, PRIMARY KEY(id))");
await memConn.query("CREATE (n:T {id: 1, name: 'foo', content: 'hello world'})");
await memConn.query("LOAD EXTENSION fts");
await memConn.query("CALL CREATE_FTS_INDEX('T', 'test_fts', ['name', 'content'], stemmer := 'porter')");
console.log("In-memory: OK"); // ✅ Works
// This segfaults:
const diskDb = new Database("/path/to/existing/db/with/1000+/rows");
const diskConn = new Connection(diskDb);
await diskConn.init();
await diskConn.query("LOAD EXTENSION fts");
// Next line causes SIGSEGV:
await diskConn.query("CALL CREATE_FTS_INDEX('SomeTable', 'some_fts', ['name', 'content'], stemmer := 'porter')");
}
test();
Likely Root Cause
This appears to be inherited from the upstream KuzuDB codebase:
- KuzuDB #6017: All FTS end-to-end tests were failing FSM (Free Space Manager) leak checks
- KuzuDB #5671: Assertion failure in
hash_index.cpp:174 during FTS checkpoint path when processing non-trivial data volumes
KuzuDB was archived with these bugs unresolved, and LadybugDB inherited the affected code.
Downstream Impact
- GitNexus issue #1160 tracks this — GitNexus's
query tool returns empty results on Linux because FTS indexes can never be created
- Affects all GitNexus Linux users (FTS couldn't even load before v0.15.4 due to GLIBC requirements, and now that it loads, it segfaults on index creation)
Additional Notes
- Tested with both
@ladybugdb/core@0.15.4 (stable) and @ladybugdb/core@0.15.4-dev.20260428 (today's nightly) — same crash on both
- Indexing name-only columns (excluding content) also segfaults — it's not a data size issue per row, but total row count
- The segfault is in the native binary (
lbugjs.node), not in JavaScript code
Environment
@ladybugdb/core: v0.15.4 and v0.15.4-dev.20260428Description
CREATE_FTS_INDEXsegfaults (SIGSEGV, exit code 139) when called on node tables with non-trivial data volumes on Linux x86_64. The FTS extension loads successfully — the crash occurs specifically during index creation.Works: In-memory DB with 2 rows — index creates, queries return correct results.
Crashes: On-disk DB with 1,000+ rows — segfaults immediately on
CREATE_FTS_INDEX.Minimal Reproduction
Likely Root Cause
This appears to be inherited from the upstream KuzuDB codebase:
hash_index.cpp:174during FTS checkpoint path when processing non-trivial data volumesKuzuDB was archived with these bugs unresolved, and LadybugDB inherited the affected code.
Downstream Impact
querytool returns empty results on Linux because FTS indexes can never be createdAdditional Notes
@ladybugdb/core@0.15.4(stable) and@ladybugdb/core@0.15.4-dev.20260428(today's nightly) — same crash on bothlbugjs.node), not in JavaScript code