Repository navigation
docs: build docs on Julia 1.12 to avoid Enzyme BLAS segfault - #218
Closed
ChrisRackauckas-Claude wants to merge 4 commits into
Closed
ChrisRackauckas-Claude wants to merge 4 commits into
ChrisRackauckas-Claude wants to merge 4 commits into
Conversation
Set GKSwstype=100 before building the docs so the Plots.jl tutorial figures render without touching display state. CI docs builds segfault (exit 139) inside ExpandTemplates while running the Plots tutorials on headless runners; same pattern as EasyModelAnalysis.jl, which sets this for the same reason. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Agent-Harness: OpenCode Agent-Model: muse-spark-1.3-contributor-free Agent-Session: local session at /home/crackauc/sandbox/tmp_20260917_040834_91074 (no public conversation URL)
The comment claimed plots only "throw a bunch of warnings / errors"; the actual CI failure is a hard SIGSEGV (exit 139) with no Julia stack trace while GR probes for a display during ExpandTemplates. State that, so the override is not mistaken for cosmetic warning suppression. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Agent-Harness: OpenCode Agent-Model: muse-spark-1.3-contributor-free Agent-Session: local session at /home/crackauc/sandbox/tmp_20260917_040834_91074 (no public conversation URL)
Diagnostic-only; will be reverted before this PR is ready. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Agent-Harness: OpenCode Agent-Model: muse-spark-1.3-contributor-free Agent-Session: local session at /home/crackauc/sandbox/tmp_20260917_040834_91074 (no public conversation URL)
The Documentation job uses the reusable workflow's `julia-version: 1`, which
moved from Julia 1.12.7 to 1.13.0 between the green 2026-09-07 run and the
first red run on 2026-09-11. On Julia 1.13, Enzyme cannot differentiate
stdlib BLAS/LAPACK (`potrf!`/`gemv!`), as test/test_groups.toml already
documents, and the Enzyme reverse-mode block in
docs/src/advanced/enzyme_ad.md segfaults during ExpandTemplates (exit 139,
no Julia stack trace). Pin the docs build to Julia 1.12, the version the
package's Enzyme AD suite and the full local docs build pass on.
This also reverts the earlier `GKSwstype=100` change: the segfault is in
the Enzyme AD page, not GR, and GR already falls back to headless mode on
its own ("GKS: cannot open display").
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Agent-Harness: OpenCode
Agent-Model: muse-spark-1.3-contributor-free
Agent-Session: local session at /home/crackauc/sandbox/tmp_20260917_040834_91074 (no public conversation URL)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Please ignore until reviewed by @ChrisRackauckas.
What changed and why
The Documentation workflow segfaults (
Segmentation fault, exit 139, no Julia stack trace) duringExpandTemplates, onmainand on this branch. Root cause: the reusable docs workflow'sjulia-version: 1moved from Julia 1.12.7 (last green docs run, 2026-09-07: https://github.com/SciML/DifferenceEquations.jl/actions/runs/34149654236) to Julia 1.13.0 (first red run, 2026-09-11: https://github.com/SciML/DifferenceEquations.jl/actions/runs/34655435993), and on Julia 1.13 Enzyme v0.13 cannot differentiate stdlib BLAS/LAPACK. The repo already documents this intest/test_groups.toml: "pre" (Julia 1.13-rc): Enzyme cannot differentiate stdlib BLAS/LAPACK (gemv!/dot/potrf!->ijl_lazy_load_and_lookup/ LLVM verification errors).Documenter debug logging on CI pinpoints the crash: on
docs/src/advanced/enzyme_ad.md(expanded first, alphabetically) the joint-likelihood@exampleblock completes, then the second block — reverse-modeautodiff(Reverse, kf_loglik, …)throughKalmanFilter— segfaults 13 s after it starts. That path callscholesky!!/potrf!and BLASgemm.The fix pins the docs build to Julia 1.12 (
julia-version: "1.12"), the version the package's Enzyme AD suite is documented to pass on and on which the Sep 7 docs run was green. All@exampleblocks still execute. The earlierGKSwstype = "100"change (and the temporaryJULIA_DEBUGdiagnostic) is reverted: the crash is in Enzyme AD, not GR, and GR already falls back to headless mode on its own (GKS: cannot open display - headless operation mode active). The diff againstmainis now just the workflow pin.Verification (local, Julia 1.12.4)
Full docs build,
julia --project=docs docs/make.jlfrom the repo root (afterjulia --project=docs -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()') exits 0 with 0 failed@exampleblocks:julia -e 'using Runic; Runic.main(["--check", "docs/make.jl"])'exits 0.CI evidence for the version change: run 34149654236 (green,
julia version 1.12.7) precedes run 34655435993 (exit 139,julia version 1.13.0); the three failingmainruns all segfault inExpandTemplates.Not verified
julia-version: "1.12"was still pending when this body was updated.--code-coverage=user), so the failure is specific to the CI runner's BLAS/CPU. The version-change correlation and the repo's own documented Enzyme/1.13 limitation are the basis for the pin.🤖 Generated with OpenCode (model: muse-spark-1.3-contributor-free); no public session URL (local session at /home/crackauc/sandbox/tmp_20260917_040834_91074).