You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Sandbox limits increase request for stm32 family crates #1179
Requested RAM limit: 6GB Requested timeout: 15min Requested number of targets: 1
Why your crate needs the resource increases:
As with #1037 and #608, these device crates document a large number of registers and so require a lot of RAM to build. For these crates we used to just squeeze in under the 3GB limit, but I now measure 3.25, 3.29, 3.03, and 3.22GB RAM usage respectively. I think 4GB would just be enough but to line up with the other crates in this family I've requested 6GB which hopefully gives us a bit more headroom.
The stm32g0 crate won't build even with the increased memory limit because an error in its Cargo.toml documents the wrong features; this will be fixed in the next release but it still requires the increased memory limit.
As ever thanks for running this incredibly useful service!
At some point I'd like to investigate why rustdoc is taking up so much memory ... are you seeing the same memory usage when compiling normally? Or only with cargo doc?
How can I reproduce the build locally? I tried cargo +nightly doc --features rt,stm32f303,stm32f373,stm32f3x8 --target thumbv7em-none-eabihf, but that gives an error:
error: failed to run custom build command for `stm32f3 v0.12.1 (/home/joshua/stm32-rs/stm32f3)`
Caused by:
process didn't exit successfully: `/home/joshua/stm32-rs/stm32f3/target/debug/build/stm32f3-e36d420cdf6020a6/build-script-build` (exit code: 101)
--- stdout
cargo:rustc-link-search=/home/joshua/stm32-rs/stm32f3/target/thumbv7em-none-eabihf/debug/build/stm32f3-5cbe1e374562f0e9/out
--- stderr
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }', build.rs:21:53
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Just stepped away from my computer but try checking out https://github.com/stm32-rs/stm32-rs-nightlies which contains the prebuilt code and is what I used to get the memory benchmark; cargo doc should just work there.
Thanks for looking into it! If you want an even worse case, the stm32h7 crate needs over 7GB of RAM to document.. with three out of seven possible features enabled. It's exciting to hear there might be a way to make rustdoc more efficient for these types of crates, though.
I raised the sandbox limit in the meantime, since this will take a while to fix on rustdoc's end. I also requeued the failed crates so you don't need to make another release.
I'll open an issue about the rustdoc memory usage shortly and ping you on it.
Activity
jyn514 commentedon Nov 14, 2020
At some point I'd like to investigate why rustdoc is taking up so much memory ... are you seeing the same memory usage when compiling normally? Or only with
cargo doc?jyn514 commentedon Nov 14, 2020
How can I reproduce the build locally? I tried
cargo +nightly doc --features rt,stm32f303,stm32f373,stm32f3x8 --target thumbv7em-none-eabihf, but that gives an error:adamgreig commentedon Nov 14, 2020
Just stepped away from my computer but try checking out https://github.com/stm32-rs/stm32-rs-nightlies which contains the prebuilt code and is what I used to get the memory benchmark; cargo doc should just work there.
jyn514 commentedon Nov 14, 2020
I took a profile and almost a full gigabyte of that comes from
get_auto_trait_and_blanket_impls. So, similar to rust-lang/rust#78761.jyn514 commentedon Nov 14, 2020
Some more discussion of this in https://rust-lang.zulipchat.com/#narrow/stream/247081-t-compiler.2Fperformance/topic/Tools.20for.20measuring.20memory.20usage.3F in case you're curious.
adamgreig commentedon Nov 14, 2020
Thanks for looking into it! If you want an even worse case, the stm32h7 crate needs over 7GB of RAM to document.. with three out of seven possible features enabled. It's exciting to hear there might be a way to make rustdoc more efficient for these types of crates, though.
jyn514 commentedon Nov 16, 2020
I raised the sandbox limit in the meantime, since this will take a while to fix on rustdoc's end. I also requeued the failed crates so you don't need to make another release.
I'll open an issue about the rustdoc memory usage shortly and ping you on it.