Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sandbox limits increase request for stm32 family crates #1179

Closed
adamgreig opened this issue Nov 14, 2020 · 7 comments
Closed

Sandbox limits increase request for stm32 family crates #1179

adamgreig opened this issue Nov 14, 2020 · 7 comments
Labels
A-admin Area: Administration of the production docs.rs server A-builds Area: Building the documentation for a crate C-limits-increase Category: A crate needs a limits increase to build successfully

Comments

@adamgreig
Copy link
Member

Crate name: stm32f3, stm32f7, stm32g0, stm32l5
Build failure link: stm32f3, stm32f7, stm32g0, stm32l5

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!

@jyn514 jyn514 added A-admin Area: Administration of the production docs.rs server A-builds Area: Building the documentation for a crate C-limits-increase Category: A crate needs a limits increase to build successfully labels Nov 14, 2020
@jyn514
Copy link
Member

jyn514 commented 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
Copy link
Member

jyn514 commented 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:

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

@adamgreig
Copy link
Member Author

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
Copy link
Member

jyn514 commented 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
Copy link
Member

jyn514 commented Nov 14, 2020

@adamgreig
Copy link
Member Author

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
Copy link
Member

jyn514 commented 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-admin Area: Administration of the production docs.rs server A-builds Area: Building the documentation for a crate C-limits-increase Category: A crate needs a limits increase to build successfully
Projects
None yet
Development

No branches or pull requests

2 participants