tursodatabase / tursodatabase/libsql-client-ts

BUN Segfault with @libsql/client >=0.15.0-pre.1 (Works with 0.14.0) - Looped Awaits in Transaction

Open
#313 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
576
Forks
69
PR merge metrics
No merged PRs in 30d

Description

Bun segfaults with @libsql/client >=0.15.0-pre.1 when executing a series of transactions, each containing a loop of awaited SQL update operations, with pauses between transaction bursts. version 0.14.0 works fine.

Bun v1.2.12 (32a47ae4) Windows x64
Windows v.win10_cu
CPU: sse42 avx avx2
Args: "C:\Users\max\.bun\bin\bun.exe" "bun_libsql_bug.ts"
Features: jsc process_dlopen
Builtins: "bun:main" "node:buffer" "node:child_process" "node:fs" "node:path"
Elapsed: 1135ms | User: 156ms | Sys: 78ms
RSS: 0.16GB | Peak: 0.16GB | Commit: 0.24GB | Faults: 39342

panic(main thread): Segmentation fault at address 0x24
oh no: Bun has crashed. This indicates a bug in Bun, not your code.

Bun bug report link here

How can we reproduce the crash?
clone bug repo:
git@github.com:Max-Villafranca/bun-libsql-segfault.git

execute in terminal:
bun run bug

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Clone Max-Villafranca/bun-libsql-segfault and run bun run bug with Bun v1.2.12, comparing @libsql/client 0.14.0 against 0.15.0-pre.1 or later. Read the linked Bun issue #19548 and determine whether the reproducible crash is in the client or Bun; done means the regression and ownership are established.

Written by the indexing model from the issue text.

Assessment

Tech stack
bun, sqlite, typescript
Domain
backend-api-design, databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.