-
Notifications
You must be signed in to change notification settings - Fork 15
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Graphite's CI is breaking with cargo-gpu being stuck in a crash loop due to some weird state in the caches. New runs don't seem to fix it, clearing the cache dir (~/.cache/rust-gpu/
) likely will. But it shouldn't break in the first place.
Using this as my investigation log.
First fail
https://github.com/GraphiteEditor/Graphite/actions/runs/17897543708/job/50886145782
- failed during tests, after it just successfully build with rust-gpu?
- branch does not modify any rust-gpu code, compared to master
Error: resolving toolchain version: get `rustc_codegen_spirv_dummy` metadata
Caused by:
`cargo metadata` exited with an error: error: could not find `Cargo.toml` in `/var/lib/github-actions/.cache/rust-gpu/codegen/https___github_com_rust-gpu_rust-gpu+c12f2161` or any parent directory
Second fail
https://github.com/GraphiteEditor/Graphite/actions/runs/17897543708/job/50886472691
- fail during build instead of test
- same branch, same error
Third fail
https://github.com/GraphiteEditor/Graphite/actions/runs/17903750942
- different branch, same error
With debug logging
GraphiteEditor/Graphite#3207
https://github.com/GraphiteEditor/Graphite/actions/runs/17909065917/job/50916157172?pr=3207
- install was aborted: the
rustc_codegen_spirv.so
dylib exists - cargo metadata fails
- actually from resolving the toolchain version, not from within the install action
- the dummy project files seems to be missing, deleted?
- we only ever clear
./target
, but never the entire project, that stays on disk
[2025-09-22T08:18:01Z INFO cargo_gpu::install] cache directory is '/var/lib/github-actions/.cache/rust-gpu'
[2025-09-22T08:18:01Z DEBUG cargo_gpu::spirv_source] Running `cargo metadata` on `/var/lib/github-actions/_work/Graphite/Graphite/node-graph/graster-nodes/shaders/entrypoint`
[2025-09-22T08:18:02Z DEBUG cargo_gpu::spirv_source] Parsed `rust-gpu` source and version: Git { url: "https://github.com/rust-gpu/rust-gpu", rev: "c12f216121820580731440ee79ebc7403d6ea04f" }
[2025-09-22T08:18:02Z DEBUG cargo_gpu::spirv_source] Parsed `SpirvSource` from crate `/var/lib/github-actions/_work/Graphite/Graphite/node-graph/graster-nodes/shaders/entrypoint`: Git { url: "https://github.com/rust-gpu/rust-gpu", rev: "c12f216121820580731440ee79ebc7403d6ea04f" }
[2025-09-22T08:18:02Z INFO cargo_gpu::install] cargo-gpu artifacts are already installed in '/var/lib/github-actions/.cache/rust-gpu/codegen/https___github_com_rust-gpu_rust-gpu+c12f2161'
[2025-09-22T08:18:02Z INFO cargo_gpu::install] ...and so we are aborting the install step.
[2025-09-22T08:18:02Z DEBUG cargo_gpu::install] resolving toolchain version to use
[2025-09-22T08:18:02Z DEBUG cargo_gpu::spirv_source] Running `cargo metadata` on `/var/lib/github-actions/.cache/rust-gpu/codegen/https___github_com_rust-gpu_rust-gpu+c12f2161`
Error: resolving toolchain version: get `rustc_codegen_spirv_dummy` metadata
Caused by:
`cargo metadata` exited with an error: error: could not find `Cargo.toml` in `/var/lib/github-actions/.cache/rust-gpu/codegen/https___github_com_rust-gpu_rust-gpu+c12f2161` or any parent directory
Guess on disk state
/var/lib/github-actions/.cache/rust-gpu/codegen/https___github_com_rust-gpu_rust-gpu+c12f2161/
rustc_codegen_spirv.so
exists, so it is not rebuildCargo.toml
is missing for some reason, we never delete itCargo.lock
unknowntarget/
should have been deleted by us
Action
- Graphite should probably just clear the cache dir
- would be nice to have the disk state to confirm assumptions
- we should probably not keep the project around to reresolve the toolchain version
- just write it in a file during install, which is also faster than executing cargo metadata
- I considered it in refactor: use SpirvBuilder directly, just manage
rustc_backend_spirv
dylibs #69, but moved it off for later follow ups, which never happened
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working