Skip to content

parallel solve: serial by default until the javascript arm64 race is fenced - #1870

Closed
swapnilpaliwal-sd wants to merge 1 commit into
apps/integration-0.1.9from
fix/parallel-optin
Closed

swapnilpaliwal-sd wants to merge 1 commit into
apps/integration-0.1.9from
fix/parallel-optin

Conversation

@swapnilpaliwal-sd

Copy link
Copy Markdown
Contributor

#1861 merged with the parallel flavor as the default build wherever the toolchain takes OpenMP. The cross-language fill pass then found a crash that gate's evidence did not cover: the javascript engine under -j8 on darwin-arm64 with concurrent memory-pressure load segfaults ~3/10, each time in a different rule — a shared structure the seqlock-fix-3 overlay does not fence (#1869 has the full diagnosis and repro; concurrent solve-time symbol creation is the suspect, unique to the javascript program).

This flips the default back to serial everywhere; AXIOM_SOLVE_PARALLEL=1 remains the one-variable opt-in and still buys 1.5–3x on quiet multicore hardware with the current rules (python 122s→40s, csharp 22s→15s on an arm64 Mac; ~2x under full load). On 8-vCPU cloud instances parallel measured as a slight loss on the current rules, so the serial default costs nothing there.

Closes nothing; the fence for #1869 re-enables the default in its own gated change.

The cross-language fill pass found a residual crash the seqlock-fix-3 overlay does not
cover: the javascript engine under -j8 on darwin-arm64 with concurrent load exits on a
segmentation violation ~3/10, each time inside a DIFFERENT rule — shared-structure
corruption, not a rule defect. javascript is the only program that creates symbols at
solve time (substr/cat in its module rules), so concurrent symbol-table insertion is the
suspect; x86 runs (TSO) and quiet or debugger-slowed runs are clean, which fits a
weak-memory publication race. Until that structure is fenced like the BTree was,
the default build is serial everywhere and AXIOM_SOLVE_PARALLEL=1 opts a machine in.

Measured on identical facts with the current rules: opt-in -j8 on quiet darwin-arm64 is
worth 1.5-3x (python 122s->40s, csharp 22s->15s) and still ~2x under full load; on
8-vCPU cloud instances it is a slight loss, so nothing is given up by defaulting serial.

Co-authored-by: axiomcode-bot[bot] <334110751+axiomcode-bot[bot]@users.noreply.github.com>
@swapnilpaliwal-sd

Copy link
Copy Markdown
Contributor Author

Working on a fix instead of this rollback.

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