tursodatabase / tursodatabase/libsql

Bug: deterministic simulator stack overflow hides DB divergence

Open
#2,214 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
17.2k
Forks
531
Avg merge
1h 12m
Merged PRs (30d)
1

Description

Deterministic repro. Happens 100% of runs.

Reproduction

cargo run --bin limbo_sim -- --seed 123 --maximum-time 20 --doublecheck --keep-files

Environment

Commit: 57a2e66d44da8c5a479d585e9217bdbbb958121c

Rust: rustc 1.88.0

Cargo: cargo 1.88.0

OS: Windows 10 x64

Observed Behavior

With seed 123 and --doublecheck, I consistently observe two problems:

ParseError("table affectionate_lacazeduthiers_27 already exists") appears twice (likely once per pass: main + doublecheck).

Shortly after, the process terminates with:

thread 'main' has overflowed its stack
(exit code 0xc00000fd, STATUS_STACK_OVERFLOW)

Notes

The ParseError suggests the doublecheck pass may not be starting from a clean state (or state is leaking between passes).
However, I haven’t confirmed whether the stack overflow is independent or triggered by error handling/logging.

Artifacts include:

  • seed123_full.txt
  • test.db
  • doublecheck.db
  • screenshot.png

Expected Behavior

Simulator should complete without stack overflow and report divergence cleanly.

seed123_bug_report.zip

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

Start by running the reported cargo run --bin limbo_sim command with seed 123 and --doublecheck, then inspect the limbo_sim entry point and the attached seed123_full.txt output. Trace how the main and doublecheck passes initialize state and handle the repeated ParseError. Done means the simulator completes without stack overflow and reports any divergence cleanly.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
databases, testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.