SEGFAULT (0xC0000005) on Windows x64 when executing LOAD VECTOR
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 52/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Stack tecnologico
- cpp, node.js
- Ambito
- databases, operating-systems
Direzione di ricerca
Start by running the provided test.mjs on Windows x64 to reproduce the deterministic crash. Trace initLbug() through doInitLbug() and loadVectorExtension(), focusing on the VECTOR extension's native initialization and Windows loading path. Done means LOAD VECTOR no longer terminates the Node.js process, with the chosen behavior verified for the database when extension loading fails.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
LOAD VECTOR triggers a native access violation (segfault) on Windows x64, crashing the entire Node.js process. INSTALL VECTOR succeeds, but LOAD VECTOR immediately causes STATUS_ACCESS_VIOLATION (0xC0000005).
Environment
| Item | Value |
|---|---|
| OS | Windows 11 x64 |
| Node.js | v22.15.0 |
@ladybugdb/core |
0.15.4 |
lbugjs.node |
13,227,008 bytes |
| CPU | (available on request) |
Reproduction
// test.mjs — place inside any project with @ladybugdb/core installed
import lbug from '@ladybugdb/core';
import fs from 'fs/promises';
import path from 'path';
const dbPath = './test.lbug';
await fs.mkdir(path.dirname(dbPath), { recursive: true });
const db = new lbug.Database(dbPath);
const conn = new lbug.Connection(db);
// This works fine
await conn.query('CREATE NODE TABLE Test (id STRING, PRIMARY KEY(id))');
console.log('Schema OK');
// This works fine
await conn.query('INSTALL VECTOR');
console.log('INSTALL VECTOR: OK');
// This crashes the process with 0xC0000005
await conn.query('LOAD VECTOR');
console.log('This line is never reached');
await conn.close();
node test.mjs
# Output:
# Schema OK
# INSTALL VECTOR: OK
# LOAD VECTOR...
# <process exits with code -1073741819>
Exit code -1073741819 = 0xC0000005 = STATUS_ACCESS_VIOLATION.
Isolation Tests
All of the following work without any crash:
| Test | Result |
|---|---|
require('@ladybugdb/core') native addon load |
✅ |
new lbug.Database(path) |
✅ |
new lbug.Connection(db) |
✅ |
| 33 schema creation queries (tables, indexes, etc.) | ✅ all pass |
INSTALL VECTOR |
✅ |
LOAD VECTOR |
💥 SEGFAULT |
tree-sitter native + @ladybugdb/core co-loaded |
✅ |
onnxruntime-node + @ladybugdb/core co-loaded |
✅ |
The crash is deterministic and occurs on every LOAD VECTOR call, regardless of:
- Database content (empty or populated)
- Other native addons loaded before/after
--max-old-space-sizeor--stack-sizeNode.js flags- Working directory or path length
Downstream Impact
This crash makes gitnexus analyze completely unusable on Windows, because gitnexus calls initLbug() → doInitLbug() → loadVectorExtension() → conn.query('LOAD VECTOR') during every repository indexing operation.
GitNexus issue: (pending)
Suggested Fix
- Investigate the VECTOR extension's native initialization on Windows x64 — likely an uninitialized pointer, missing SIMD fallback, or DLL dependency issue in the extension loading path.
- As a workaround, consider making VECTOR extension loading optional/catchable so that the database remains usable (without vector search) even if the extension fails to load.
- Lingua principale
- C++
- Stelle
- 1.8k
- Fork
- 148
- Merge medio
- 1g 8h
- PR unite (30g)
- 187
Preparare l'ambiente
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di LadybugDB/ladybug
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 52/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 54/100
LadybugDB/ladybug#1512 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 56/100
I maintainer di solito rispondono entro 1 giorno
-
Bug: COPY into an empty STRING-PK node table, after other tables in the same process, deterministically drops one key from the primary-key indexForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 38/100
LadybugDB/ladybug#1510 · 5 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di LadybugDB/ladybug
Issue simili
-
bug javascript
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
enhancement third-party
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
pocoproject/poco#5656 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
-
Type: Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
Qiskit/qiskit-aer#2525 ·
I maintainer di solito rispondono entro 1 giorno