Skip to content

Fix 32-bit Core CI failures - #354

Draft
ChrisRackauckas-Claude wants to merge 3 commits into
mainfrom
agent/353-green-ci
Draft

ChrisRackauckas-Claude wants to merge 3 commits into
mainfrom
agent/353-green-ci

Conversation

@ChrisRackauckas-Claude

@ChrisRackauckas-Claude ChrisRackauckas-Claude commented Nov 22, 2026 •

Copy link
Copy Markdown
Member

🚧 UNREVIEWED — awaiting review by @ChrisRackauckas. Filed by an AI agent running as @ChrisRackauckas; Chris has not seen this.
Harness: Codex CLI 0.170.0 · Model: gpt-6.2-sol
Conversation: local session 01a20359-5251-7513-b44c-d53b08e08abc (no session URL)

Please ignore this draft until reviewed by @ChrisRackauckas.

Bayesian likelihood evaluations pass a concrete buffer for fixed scalar ModelingToolkit parameters, which reuses initialization structure during Turing sampling and reduces memory use on x86. Parameters solved during initialization and other parameter forms use symbolic remaking. The sensitivity test compares the exact dictionary key set, and the threshold tests run in a dedicated process on each architecture.

Verification

The default-branch x86 job passed Core/basics.jl (18/18), then ran out of memory during bayesian_ensemble in test/ensemble.jl:94. Its stack shows Turing differentiating the likelihood while ModelingToolkitBase rebuilt initialization data. The same stack appears on the earliest matching job I found, on a commit that added benchmarking.

On unmodified code, with 32-bit Julia 1.13.2 and the package versions recorded in the failing job, I ran:

env -u JULIA_HEAP_SIZE_HINT GROUP=Core JULIA_NUM_THREADS=1 JULIA_NUM_PRECOMPILE_TASKS=8 julia --project -e 'import Pkg; Pkg.test(; julia_args=["--check-bounds=yes", "--compiled-modules=yes", "--depwarn=yes"], allow_reresolve=false, coverage=true, force_latest_compatible_version=false)'
     Testing Running tests...
Internal error: during type inference of
trigger_test_failure_break(Any)
Encountered unexpected error in runtime:
OutOfMemoryError()
ERROR: Package EasyModelAnalysis errored during testing (received signal: 6)

I ran the same test/ensemble.jl on 32-bit Julia 1.13.3 before and after the patch. TEST_PROJECT selects the corresponding project with the same dependency versions.

env -u JULIA_HEAP_SIZE_HINT JULIA_NUM_THREADS=1 JULIA_NUM_PRECOMPILE_TASKS=4 JULIA_LOAD_PATH='@:@stdlib' julia +1.13.3~x86 --startup-file=no --project="$TEST_PROJECT" --depwarn=yes --check-bounds=yes --code-coverage=@. test/ensemble.jl

Unmodified, the process reported fatal: error thrown and no exception handler available. and OutOfMemoryError(). I stopped its repeated fatal finalizer errors. With the patch, the output was:

[ Info: Calibrations are complete
[ Info: 303 total models
Elapsed (wall clock) time (h:mm:ss or m:ss): 7:05.31
Maximum resident set size (kbytes): 1889400
Exit status: 0

The first patched Core run passed the ensemble, then failed at test/sensitivity.jl:38. The dictionary contained every expected key, but on 32-bit Julia its hash-table traversal returned a different order. The assertion now checks exact key equality with a set. Julia's Dict API.

Core/ensemble.jl |    1      1  2m37.9s
Core/sensitivity.jl: Test Failed at test/sensitivity.jl:38
  Expression: collect(keys(sensres)) == [:ρ_first_order, :β_first_order, :ρ_total_order, :β_total_order, :ρ_β_second_order]
   Evaluated: [:ρ_total_order, :β_total_order, :ρ_β_second_order, :ρ_first_order, :β_first_order] == [:ρ_first_order, :β_first_order, :ρ_total_order, :β_total_order, :ρ_β_second_order]

The combined x86 group then passed all 40 assertions and encountered a Julia runtime finalizer error during shutdown. The first diagnostic was error in running finalizer: Core.MethodError(f=Base.close, args=(Core.Task(.... The process had 4,185,776 KiB of virtual mappings and spent several minutes dumping the task's symbolic cache, so I stopped it after recording the error. The owner of that finalizer is unverified. The threshold file runs in a fresh SciMLTesting group on x86 and x64, and remains part of Pkg.test() with the default group selection. Julia runtime source.

I reran Core on 32-bit Julia and Threshold on both architectures with CI's runtime flags:

env GROUP=Core JULIA_NUM_THREADS=1 JULIA_NUM_PRECOMPILE_TASKS=4 julia +1.13.3~x86 --project -e 'import Pkg; Pkg.test(; julia_args=["--check-bounds=yes", "--compiled-modules=yes", "--depwarn=yes"], allow_reresolve=true, coverage=true, force_latest_compatible_version=false)'
env GROUP=Threshold JULIA_NUM_THREADS=1 JULIA_NUM_PRECOMPILE_TASKS=4 julia +1.13.3~x86 --project -e 'import Pkg; Pkg.test(; julia_args=["--check-bounds=yes", "--compiled-modules=yes", "--depwarn=yes"], allow_reresolve=true, coverage=true, force_latest_compatible_version=false)'
env GROUP=Threshold JULIA_NUM_THREADS=4 JULIA_NUM_PRECOMPILE_TASKS=4 julia +1.13.3 --project -e 'import Pkg; Pkg.test(; julia_args=["--check-bounds=yes", "--compiled-modules=yes", "--depwarn=yes"], allow_reresolve=true, coverage=true, force_latest_compatible_version=false)'
Core/basics.jl |   18     18  1m27.7s
Core/ensemble.jl |    1      1  2m40.9s
Core/examples.jl |    4      4  5.0s
Core/precompile_workload.jl |    1      1  0.1s
Core/sensitivity.jl |    4      4  26m38.3s
     Testing EasyModelAnalysis tests passed
Threshold/threshold.jl |   12     12  4m20.7s
     Testing EasyModelAnalysis tests passed
Threshold/threshold.jl |   12     12  2m41.2s
     Testing EasyModelAnalysis tests passed

All three processes exited 0. The matrix generator emitted Core and Threshold on both architectures with continue_on_error=false.

env GROUP=Datafit JULIA_NUM_THREADS=4 JULIA_NUM_PRECOMPILE_TASKS=4 julia +1.13.3 --project -e 'using Pkg; Pkg.test()'
env GROUP=QA JULIA_NUM_THREADS=1 JULIA_NUM_PRECOMPILE_TASKS=4 julia +1.13.3 --project -e 'using Pkg; Pkg.test()'
julia +1.13.3 --startup-file=no --project="$RUNIC_ENV" -e 'using Runic; println("Runic ", pkgversion(Runic)); Runic.main(ARGS)' -- --check src/EasyModelAnalysis.jl src/datafit.jl test/Datafit/datafit.jl test/sensitivity.jl test/Threshold/threshold.jl
git diff HEAD --name-only -z --diff-filter=ACMR | xargs -0 typos
git diff HEAD --check
Datafit/datafit.jl |   11     11  6m38.9s
     Testing EasyModelAnalysis tests passed
QA/qa.jl      |   21     21  2m01.0s
     Testing EasyModelAnalysis tests passed
Runic 1.10.0

Both formatting and spelling checks exited 0. A separate ForwardDiff probe for a parameter-dependent initialization recovered the analytic gradient [2, 1] by either route. The second gradient call allocated 449,656 bytes with the symbolic map and 45,416 bytes with the parameter buffer.

CI

The CI workflow completed successfully on the PR head. Core passed 28/28 on both architectures, Threshold passed 12/12 on both architectures, Datafit passed 11/11, and QA passed 21/21. All six jobs used Julia 1.13.4. Formatting, spelling, and both benchmark checks also passed. CI run · 32-bit Core job.

The Downgrade job on Ubuntu 26.04 stopped before package tests when the dynamic loader tried to load GR's libGRM.so. The log reports libxml2.so.2: cannot open shared object file: No such file or directory. The passing baseline resolved the same Plots 1.38.13, GR 0.72.10, GR_jll 0.72.10+0, and Qt6Base_jll 6.5.3+1 versions. PR Downgrade log · Baseline Downgrade log.

In a standalone Julia 1.10.12 environment with GR, GR_jll, and Qt6Base_jll pinned to those versions, GR.version() returned "0.72.10". The downloaded GR artifact hash matched the PR log, and readelf -d showed NEEDED Shared library: [libxml2.so.2] for libGRM.so. The local system provides that SONAME. This points to a system-library dependency in the GR binary on the new runner image. GR_jll repository · Ubuntu 26.04 runner image.

The separate Documentation workflow was still running when these results were recorded. The default-branch documentation run logged a Carcione example error and a missing AlgebraicPetri dependency, then was cancelled after six hours. PR Documentation job · Baseline Documentation job.

Review scope

Review the guard for initialization-dependent parameters and the case where a solver receives a parameter buffer containing dual values. ModelingToolkitBase and SymbolicIndexingInterface are existing transitive dependencies and are both MIT-licensed. Local verification covers the reported Linux x86 lane and the package's Datafit and QA groups. The full Documentation and Downgrade workflows and other operating systems were outside local verification. The guarded parameter probe passed 6/6 on Julia 1.10.12 with the Downgrade dependency versions.

Closes #353

Risk assessment

  • Risk: medium
  • Blast radius: Both Bayesian likelihood paths and callers of bayesian_datafit and bayesian_ensemble. Public signatures are unchanged.
  • Evidence: Unmodified x86 ensemble exhausts memory. The patched fixture completes all 303 calibrated models. The sensitivity assertion checks all five key names. Datafit and QA pass locally. All six test jobs passed on the PR head.
  • Independent review: Pending.
  • Merge: Needs human review of the initialization guard.

🤖 Posted by an AI agent — harness: Codex CLI 0.170.0 · model: gpt-6.2-sol
Conversation: local session 01a20359-5251-7513-b44c-d53b08e08abc (no session URL)

ChrisRackauckas and others added 3 commits November 22, 2026 11:23
Update fixed symbolic parameters through a copied parameter buffer. Use symbolic remaking for initialized parameters and other parameter forms.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Codex <noreply@openai.com>
Agent-Harness: Codex CLI 0.170.0
Agent-Model: gpt-6.2-sol
Agent-Job: 353-codex
Agent-Session: local session 01a20359-5251-7513-b44c-d53b08e08abc (no session URL)
Verify the exact Sobol key names independently of hash-table traversal order.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Codex <noreply@openai.com>
Agent-Harness: Codex CLI 0.170.0
Agent-Model: gpt-6.2-sol
Agent-Job: 353-codex
Agent-Session: local session 01a20359-5251-7513-b44c-d53b08e08abc (no session URL)
Schedule Threshold on both Julia architectures so its tests use a fresh process after Core.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Codex <noreply@openai.com>
Agent-Harness: Codex CLI 0.170.0
Agent-Model: gpt-6.2-sol
Agent-Job: 353-codex
Agent-Session: local session 01a20359-5251-7513-b44c-d53b08e08abc (no session URL)

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.

Default-branch CI is red: get the tests green

2 participants