Bug: deterministic simulator stack overflow hides DB divergence

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

Maintainers usually reply within 11 days

Nobody has claimed this yet.

Assessment

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

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.

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

Dominant language
C
Stars
17.3k
Forks
562
Avg merge
10d 15h
Merged PRs (30d)
1

Getting set up

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.

More from tursodatabase/libsql

All issues in tursodatabase/libsql

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.