Skip to content

system.macintosh iterative walk SEGFAULTS (exit 139); deterministic reproducer for #828/#857 dbgeteof null-deref family #864

Open

Description

@jsavin

Rationale

Walking system.macintosh with a plain iterative table walk SEGFAULTS (exit 139), reproducible on both Virgin.root and dist Frontier.root. Every other system subtree walks clean. Likely the same dbgeteof-null-deref family as #828 and #857 (name resolution over an ODB-backed value with nil databasedata). Critical value: provides a deterministic reproducible case for what is intermittent in #828/#857 — this is a reliable test harness for the underlying bug.

Current State

Verified reproduction (Unit 3.3+, deterministic):

  • Iterative table walk over system.macintosh via frontier-cli
  • sizeOf() or nameOf() on each key
  • Exit 139 (SEGFAULT)
  • Reproducible on both Virgin.root and dist Frontier.root
  • Every other system.* subtree walks cleanly

Context:

Impact:

  • Any code iterating system.macintosh crashes
  • Blocks audits, tooling, or introspection of macintosh constants
  • Deterministic crash provides reliable test case for debugging

Desired Outcome

Provide a deterministic reproducer for the dbgeteof-null-deref family of bugs. Use this to:

  1. Trace the exact call chain (LLDB backtrace)
  2. Identify which operation on system.macintosh triggers the crash
  3. Fix the root cause (likely: nil databasedata guard or context restoration)
  4. Verify against both Latent: in-memory hash node takes on-disk resolution path -> NULL deref (dbgeteof via hashresolvevalue) #828 and test_window_bridge: intermittent init-phase SIGSEGV (~66 percent of runs) before any test executes #857

Recommendation

  1. Reproduce with LLDB: frontier-cli --protocol < <script that walks system.macintosh>
  2. Capture full backtrace at SEGFAULT
  3. Identify the dbgeteof (or similar) call with nil databasedata
  4. Compare against Latent: in-memory hash node takes on-disk resolution path -> NULL deref (dbgeteof via hashresolvevalue) #828/test_window_bridge: intermittent init-phase SIGSEGV (~66 percent of runs) before any test executes #857 for shared pattern
  5. Implement fix (likely: check databasedata before calling dbgeteof, or restore context)
  6. Verify: sizeOf(@system.macintosh) and iterative walk both succeed

Exit Criteria

Related Context

Activity

  1. added
    priority/p2Medium priority - nice to have
    type/bugDefect in existing functionality, needs fix
    workstream/runtime-coreRuntime architecture, memory, lifecycle, and global context
    on Aug 10, 2026
  2. jsavin commented on Aug 11, 2026

    @jsavin
    OwnerAuthor

    ODB Census State-Dependence Finding (2026-08-11):

    system.macintosh SEGFAULTS when descended mid-walk from its parent, BUT all six children (282 values total) walk cleanly as separate fresh processes.

    Implication: The crash is SESSION/STATE-DEPENDENT, not DATA-DEPENDENT. The stored data itself is intact.

    Materially narrows the repro:

    • Issue is not value corruption or tree structure
    • Issue is in the walking/enumeration state machine when descending from parent
    • Fresh-process isolation shows values are accessible

    Next step: When reproducing with LLDB, trace the exact state at crash — focus on walk context (parent reference, depth, enumeration state) rather than on data content.

  3. jsavin commented on Aug 16, 2026

    @jsavin
    OwnerAuthor

    Corroboration: does NOT reproduce in a pure-C walk (2026-08-15)

    While building the --diff-roots equality walker (root-build Step 1), a pure-C recursive walk descended system.macintosh without crashing.

    Conditions:

    • Virgin.root, opened read-only (dbopenfile(fnum, true)), no interpreter booted, no startup scripts -- only db_format_prepare_runtime(), the same minimal init --migrate uses.
    • system.macintosh was descended from its parent, in-process, mid-walk, as part of a full-root traversal -- i.e. the condition described here as the trigger, not an isolated subtree walk.
    • 578 nodes visited under system.macintosh. No SIGSEGV, exit 0.
    • Repeated across two independent loads in the same process (open -> walk -> dbclose() -> reopen -> walk) and across the full-root self-diff runs; clean every time.

    Contrast with the census (planning/census-data/odb_census_2026-08-11.tar.gz, README CAVEAT 1): the interpreter-driven walker segfaulted on this subtree and its 282 rows had to be recovered by walking each of the 6 children in its own process (mac_*.tsv.1).

    Reading: same data, same descent-from-parent pattern, opposite outcome -- the differentiator is the interpreter, not the stored values. That agrees with this issue's own "session/state-dependent, not data-dependent" assessment and with the census's read.

    Practical consequence: whatever the root cause, it is not reachable from a pure value-level walk that never resolves names or evaluates. Anything needing to audit system.macintosh can do so today via a C walk; only interpreter-mediated traversal is blocked.

    Offered as evidence narrowing the search area, not as a fix -- the underlying dbgeteof-null-deref family (#828/#857) is untouched by this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority/p2Medium priority - nice to havescope/quick-win< 4 hours, obvious solutiontype/bugDefect in existing functionality, needs fixworkstream/runtime-coreRuntime architecture, memory, lifecycle, and global context

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions