View all comments
Starting on the nightly build from August 3rd, 2026, cargo doc has been freezing when trying to build documentation for large projects.
To see this happen, try running cargo +nightly-2026-08-03 doc --workspace --no-deps on a project like rust-lang/libc. This is especially noticeable if the project has a lot of items that are re-exported or modules marked with #[doc(hidden)].
It should finish without issues, just like it did on the nightly build from August 2nd. Instead, the rustdoc/rustc process gets stuck, uses a ton of CPU and memory, and is eventually killed after about 3.5 minutes with a SIGTERM signal (exit code 143). This problem is also causing the libc continuous integration tests to fail: https://github.com/rust-lang/libc/actions/runs/30800111327/job/91642485751
The documentation build worked fine with:
nightly-2026-08-02 (1.99.0-nightly, commit 73dc916)
The issue started with:
rustc --version --verbose: rustc 1.99.0-nightly (11177f2 2026-08-02)
I can't provide a backtrace because the process just hangs; it doesn't crash.
I suspect the problem might be related to pull request #159881. This change modified how the visible_parent_map uses a Breadth-First Search (BFS) to go into children of #[doc(hidden)] modules. However, it seems fallback items are never marked as "visited." This means they get added back into the queue from every parent path, causing a huge increase in processing, especially with libc's module structure. I confirmed this by looking at the nightly build manifests:
View all comments
Starting on the nightly build from August 3rd, 2026,
cargo dochas been freezing when trying to build documentation for large projects.To see this happen, try running
cargo +nightly-2026-08-03 doc --workspace --no-depson a project like rust-lang/libc. This is especially noticeable if the project has a lot of items that are re-exported or modules marked with#[doc(hidden)].It should finish without issues, just like it did on the nightly build from August 2nd. Instead, the
rustdoc/rustcprocess gets stuck, uses a ton of CPU and memory, and is eventually killed after about 3.5 minutes with a SIGTERM signal (exit code 143). This problem is also causing the libc continuous integration tests to fail: https://github.com/rust-lang/libc/actions/runs/30800111327/job/91642485751The documentation build worked fine with:
nightly-2026-08-02 (1.99.0-nightly, commit 73dc916)
The issue started with:
rustc --version --verbose: rustc 1.99.0-nightly (11177f2 2026-08-02)
I can't provide a backtrace because the process just hangs; it doesn't crash.
I suspect the problem might be related to pull request #159881. This change modified how the
visible_parent_mapuses a Breadth-First Search (BFS) to go into children of#[doc(hidden)]modules. However, it seems fallback items are never marked as "visited." This means they get added back into the queue from every parent path, causing a huge increase in processing, especially with libc's module structure. I confirmed this by looking at the nightly build manifests: