Skip to content

Octatrack base: a crash record names the modules behind it - #1321

Draft
repeat98 wants to merge 5 commits into
mainfrom
claude/crash-names-module
Draft

repeat98 wants to merge 5 commits into
mainfrom
claude/crash-names-module

Conversation

@repeat98

@repeat98 repeat98 commented Nov 8, 2026

Copy link
Copy Markdown
Owner

Draft: waits for the owner's unit test (a dev twin's crashtest). Not mergeable before that.

What

A crash record today holds registers and the stack but no module (crash.c), and diagnostics:pull prints only pc 0x…. Modules are placed at run time, so an address alone names nothing.

  • The lookup. After crash.s writes the record, it calls crash.c's modwerk_crash_owners on a stack of its own (the faulting one may be what broke). That looks up the PC and the eight stack longs, in both SDRAM aliases, with a new loader function, modwerk_runtime_owner_module. It reads only the base's own owner records, never the pool. It writes {"MWCO", count, PC's module, eight stack modules} right after the record at 0x100ff8b4 (44 bytes, below the stall record at 0x100ff900).
  • If the lookup itself faults, crash.s comes back for the next count, finds the block marked busy and restarts without names. It never faults again.
  • At the next start, diag.c puts the PC's module in the CRASH incident's screen field and the distinct stack modules in its 56-byte id run, as a set record does. So the names travel with the incidents the Worker has always taken.
  • Printing. diagnostics:pull prints crash pc 0x… in Mini Verb, stack through SC Ringmod, and device.mjs crash prints the owners. An older base's crash prints as before.

Base rebuilt with --beta --write. Base-bound packages relinked; the write-lease entries did not move, so Analog BD's reviewed recipe stays. docs/OCTATRACK_DRIVING.md lists the new battery RAM range.

How I checked

  • test_crash.c (new): owners in both aliases, for the record's count, and re-entry skipped.
  • test_diag.c: the CRASH incident carries the ids, and stale owners from another count are ignored.
  • host_test.c (loader): any byte of the extent matches, nothing past it, and nothing once the module is discarded.
  • diagnostics-pull.test.mjs: names, and an older base's crash.
  • npm run pr:ready: Ready.

Not tested

  • Hardware: not tested. No unit was available. The plan: RAM-boot a --dev twin, run crashtest, then crash. It should show the record and modules: PC 00000000 (crashtest runs base code), and the restart must still work. The owner power-cycles after the crash restart.
  • A crash inside a module can't be made on purpose today, so naming on hardware is proven by the first real one.

Base batch

#1320 (the module store) also regenerates the base files. Whichever merges second merges main, then rebuilds the base and the base-bound packages.

Guides

docs/OCTATRACK_DRIVING.md names the owners' range. Nothing else was missing.

🤖 Generated with Claude Code

repeat98 and others added 5 commits November 8, 2026 09:42
crash.s calls crash.c on its own stack after the record is written: it looks
the PC and the eight stack longs up in the loader's owner records (both SDRAM
aliases) and writes the ids after the record, at 0x100ff8b4, for that count.
The new loader lookup reads only the base's own owner table, never the pool.
A lookup that faults comes back for the next count and restarts without
names. At the next start diag.c puts the PC's module in the CRASH incident's
screen and the stack's distinct modules in its id run, as a set record does,
so the names travel with the incidents the Worker already takes.
diagnostics:pull and device.mjs crash print them.

Base rebuilt with --beta --write.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
npm run octatrack:module-packages -- --base-only. The write-lease entries did
not move, so Analog BD's reviewed recipe stays.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant