-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Closed as duplicate of#13910
Labels
Description
How can we reproduce the crash?
If only:
await connection.run(
`
CREATE or REPLACE TABLE ticks (
datetime TIMESTAMP_MS,
open DECIMAL(10, 4),
);
...
ticks.map((t) => timestampMillisValue(BigInt(t[0]))), // Kline open time
ticks.map((t) => decimalValue(Number(t[1]), 10, 4)), // Open price
...Works, but with 3 rows it crashes
import {
DOUBLE,
DuckDBDataChunk,
DuckDBInstance,
TIMESTAMP_MS,
timestampMillisValue,
} from '@duckdb/node-api'
import { decimalValue } from '@duckdb/node-api/lib/values'
import { loadTicks } from '../service/BinanceClient'
const runDb = async () => {
const ticks = await loadTicks({
symb: 'BTCUSDT',
interval: '1h',
limit: 200,
})
const instance = await DuckDBInstance.create('my_duckdb.db')
const connection = await instance.connect()
await connection.run(
`
CREATE or REPLACE TABLE ticks (
datetime TIMESTAMP_MS,
open DECIMAL(10, 4),
high DECIMAL(10, 4),
);
`,
)
/*
low DECIMAL(10, 4),
close DECIMAL(10, 4),
volume DECIMAL(10, 4),
*/
const appender = await connection.createAppender('ticks')
const chunk = DuckDBDataChunk.create([TIMESTAMP_MS, DOUBLE])
chunk.setColumns([
ticks.map((t) => timestampMillisValue(BigInt(t[0]))), // Kline open time
ticks.map((t) => decimalValue(Number(t[1]), 10, 4)), // Open price
ticks.map((t) => decimalValue(Number(t[2]), 10, 4)), // High price
// ticks.map((t) => decimalValue(Number(t[3]), 10, 4)), // Low price
// ticks.map((t) => decimalValue(Number(t[4]), 10, 4)), // Close price
// ticks.map((t) => decimalValue(Number(t[5]), 10, 4)), // Volume
])
appender.appendDataChunk(chunk)
appender.flushSync()
}
runDb()Relevant log output
Stack Trace (bun.report)
Bun v1.3.2 (b131639) on macos aarch64 [RunCommand]
Segmentation fault at address 0x00000000
- 7 unknown/js code
NapiClass.cpp:68:long long Zig::NapiClass_ConstructorFunction<false>- 1 unknown/js code
jsc_llint_commonCallOp__llintOpWithMetadata__llintOpWithReturn__llintOp__commonOp__fn__fn__makeReturn__fn__fn__fn__666_callHelper__dispatch_LowLevelInterpreter64_asm_2527llint_call_javascriptInterpreter.cpp:1385:JSC::Interpreter::executeCallGetterSetter.cpp:60:JSC::GetterSetter::callGetterPropertySlot.h:412:JSC::LLInt::performLLIntGetByIDLLIntSlowPaths.cpp:974:llint_slow_path_get_by_idjsc_llint_llintOpWithMetadata__llintOpWithReturn__llintOp__commonOp__fn__fn__makeReturn__fn__fn__fn__opGetByIdSlow_LowLevelInterpreter_asm_655jsc_llint_commonCallOp__llintOpWithMetadata__llintOpWithReturn__llintOp__commonOp__fn__fn__makeReturn__fn__fn__fn__666_callHelper__dispatch_LowLevelInterpreter64_asm_2527jsc_llint_commonCallOp__llintOpWithMetadata__llintOpWithReturn__llintOp__commonOp__fn__fn__makeReturn__fn__fn__fn__666_callHelper__dispatch_LowLevelInterpreter64_asm_2527jsc_llint_commonCallOp__llintOpWithMetadata__llintOpWithReturn__llintOp__commonOp__fn__fn__makeReturn__fn__fn__fn__666_callHelper__dispatch_LowLevelInterpreter64_asm_2527jsc_llint_commonCallOp__llintOpWithMetadata__llintOpWithReturn__llintOp__commonOp__fn__fn__makeReturn__fn__fn__fn__684_callHelper__dispatch_LowLevelInterpreter64_asm_2527
Features: transpiler_cache, tsconfig, tsconfig_paths, process_dlopen, Bun.stderr, Bun.stdout, bunfig, dotenv, fetch, jsc
Sentry Issue: BUN-110Y