Skip to content

Sandbox limits increase request for stm32 family crates #1179

Closed

Description

@adamgreig

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!

Activity

  1. added
    A-adminArea: Administration of the production docs.rs server
    A-buildsArea: Building the documentation for a crate
    C-limits-increaseCategory: A crate needs a limits increase to build successfully
    on Nov 14, 2020
  2. jyn514 commented on Nov 14, 2020

    @jyn514
    Member

    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?

  3. jyn514 commented on Nov 14, 2020

    @jyn514
    Member

    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
    
  4. adamgreig commented on Nov 14, 2020

    @adamgreig
    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.

  5. jyn514 commented on Nov 14, 2020

    @jyn514
    Member

    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.

  6. jyn514 commented on Nov 14, 2020

    @jyn514
    Member
  7. adamgreig commented on Nov 14, 2020

    @adamgreig
    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.

  8. jyn514 commented on Nov 16, 2020

    @jyn514
    Member

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-adminArea: Administration of the production docs.rs serverA-buildsArea: Building the documentation for a crateC-limits-increaseCategory: A crate needs a limits increase to build successfully

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions