Skip to content

docs.rs builder crashes if a build for a non-host target fails #1035

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

Closed
richardeoin opened this issue Sep 4, 2020 · 8 comments · Fixed by #1036
Closed

docs.rs builder crashes if a build for a non-host target fails #1035

richardeoin opened this issue Sep 4, 2020 · 8 comments · Fixed by #1036
Labels
A-builds Area: Building the documentation for a crate C-bug Category: This is a bug

Comments

@richardeoin
Copy link

Crate name: stm32h7xx-hal
Build failure link: None, but this links to the previous version from ~2 months ago https://docs.rs/crate/stm32h7xx-hal

Additional details: Latest version appeared in the build queue after publishing to crates.io, but had disappeared ~30 minutes later. It's quite possible that this crate is hitting the resource limits.

@jyn514
Copy link
Member

jyn514 commented Sep 4, 2020

Well this is interesting.

 [ERROR] cratesfyi::web::builds: called cexpect!() on a `None` value while attempting to fetch the route Url { generic_url: "http://docs.rs/crate/stm32h7xx-hal/latest/builds" }
    0: <F as iron::middleware::Handler>::handle
    1: <alloc::boxed::Box<dyn iron::middleware::Handler> as iron::middleware::Handler>::handle
    2: <cratesfyi::web::metrics::RequestRecorder as iron::middleware::Handler>::handle
    3: <alloc::boxed::Box<dyn iron::middleware::Handler> as iron::middleware::Handler>::handle
    4: <alloc::boxed::Box<dyn iron::middleware::Handler> as iron::middleware::Handler>::handle
    5: router::router::Router::handle_method
    6: <router::router::Router as iron::middleware::Handler>::handle
    7: iron::middleware::Chain::continue_from_before
    8: <iron::middleware::Chain as iron::middleware::Handler>::handle
    9: <alloc::boxed::Box<dyn iron::middleware::Handler> as iron::middleware::Handler>::handle
   10: <cratesfyi::web::CratesfyiHandler as iron::middleware::Handler>::handle
   11: <iron::iron::RawHandler<H> as hyper::server::Handler>::handle
   12: hyper::server::Worker<H>::handle_connection
   13: hyper::server::listener::spawn_with::{{closure}}
   14: std::sys_common::backtrace::__rust_begin_short_backtrace
   15: core::ops::function::FnOnce::call_once{{vtable.shim}}
   16: <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once
              at /rustc/d3fb005a39e62501b8b0b356166e515ae24e2e54/src/liballoc/boxed.rs:1076
       <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once
              at /rustc/d3fb005a39e62501b8b0b356166e515ae24e2e54/src/liballoc/boxed.rs:1076
       std::sys::unix::thread::Thread::new::thread_start
              at /rustc/d3fb005a39e62501b8b0b356166e515ae24e2e54/src/libstd/sys/unix/thread.rs:87
   17: start_thread
   18: __clone

@jyn514
Copy link
Member

jyn514 commented Sep 4, 2020

Looks like it never made it into the database.

cratesfyi=> select name, version from crates inner join releases on crates.id = releases.crate_id where name = 'stm32h7xx-hal';
     name      | version 
---------------+---------
 stm32h7xx-hal | 0.1.0
 stm32h7xx-hal | 0.2.0
 stm32h7xx-hal | 0.2.1
 stm32h7xx-hal | 0.3.0
 stm32h7xx-hal | 0.4.0
 stm32h7xx-hal | 0.5.0
 stm32h7xx-hal | 0.6.0
(7 rows)

@jyn514
Copy link
Member

jyn514 commented Sep 4, 2020

No other relevant logging that I see.

@jyn514 jyn514 added A-builds Area: Building the documentation for a crate C-bug Category: This is a bug labels Sep 4, 2020
@jyn514
Copy link
Member

jyn514 commented Sep 4, 2020

Aha, here we go:

 2020/09/03 20:15:49 [DEBUG] cratesfyi::docbuilder::rustwide_builder: rename /home/cratesfyi/workspace/builds/stm32h7xx-hal-0.7.0/target/thumbv7em-none-eabihf/doc to /home/cratesfyi/workspace/builds/stm32h7xx-hal-0.7.0/target/doc
 2020/09/03 20:15:49 [ERROR] cratesfyi::build_queue: Failed to build package stm32h7xx-hal-0.7.0 from queue: No such file or directory (os error 2)
 Backtrace:    0: failure::backtrace::internal::InternalBacktrace::new
    1: <failure::backtrace::Backtrace as core::default::Default>::default
    2: cratesfyi::docbuilder::rustwide_builder::RustwideBuilder::execute_build
    3: rustwide::build::BuildBuilder::run
    4: cratesfyi::docbuilder::rustwide_builder::RustwideBuilder::build_package
    5: cratesfyi::build_queue::BuildQueue::process_next_crate
    6: <std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
    7: cratesfyi::utils::queue_builder::queue_builder
    8: std::sys_common::backtrace::__rust_begin_short_backtrace
    9: core::ops::function::FnOnce::call_once{{vtable.shim}}
   10: <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once
              at /rustc/d3fb005a39e62501b8b0b356166e515ae24e2e54/src/liballoc/boxed.rs:1076
       <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once
              at /rustc/d3fb005a39e62501b8b0b356166e515ae24e2e54/src/liballoc/boxed.rs:1076
       std::sys::unix::thread::Thread::new::thread_start
              at /rustc/d3fb005a39e62501b8b0b356166e515ae24e2e54/src/libstd/sys/unix/thread.rs:87
   11: start_thread
   12: __clone

@jyn514
Copy link
Member

jyn514 commented Sep 4, 2020

... apparently target/ is a completely empty directory??

@jyn514
Copy link
Member

jyn514 commented Sep 4, 2020

This is likely fallout from #1016 or #1000. I'll try reverting those locally and see which fixes it.

@jyn514 jyn514 changed the title Build on docs.rs didn't succeed or fail docs.rs builder crashes if a build for a non-host target fails Sep 4, 2020
@jyn514
Copy link
Member

jyn514 commented Sep 4, 2020

Queued a rebuild, which failed as expected: https://docs.rs/crate/stm32h7xx-hal/0.7.0

[INFO] [stderr] error: Package `stm32h7xx-hal v0.7.0 (/opt/rustwide/workdir)` does not have these features: `lan8742a`

@richardeoin
Copy link
Author

Amazing work, thanks for investigating this

richardeoin added a commit to stm32-rs/stm32h7xx-hal that referenced this issue Sep 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-builds Area: Building the documentation for a crate C-bug Category: This is a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants