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

Bisect with --timeout panics on Mac #232

Open
jruderman opened this issue Oct 23, 2022 · 3 comments
Open

Bisect with --timeout panics on Mac #232

jruderman opened this issue Oct 23, 2022 · 3 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@jruderman
Copy link

Trying to use the --timeout flag on Mac causes the bisector to panic:

$ RUST_BACKTRACE=1 cargo-bisect-rustc --start=2022-10-03 --preserve --timeout 5

checking the start range to find a passing nightly
installing nightly-2022-10-03
testing...
thread 'main' panicked at 'thiserror::Errored to run "timeout" "5" "cargo" "+bisector-nightly-2022-10-03-x86_64-apple-darwin" "build": Os { code: 2, kind: NotFound, message: "No such file or directory" }', /Users/*/.cargo/registry/src/github.com-1ecc6299db9ec823/cargo-bisect-rustc-0.6.4/src/toolchains.rs:302:17
stack backtrace:
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

I believe cargo-bisect-rustc is assuming the presence of a utility called timeout that is common on Linux but not on Mac. The --timeout feature was added in PR #135 (@savente93, @ehuss).

Version

$ cargo-bisect-rustc --version
cargo-bisect-rustc 0.6.4
@savente93
Copy link
Contributor

I don't have access to a mac so this is not something I can diagnose. However I imagine adding a conditional cfg on line

let mut cmd = Command::new("timeout");
to use a more appropriate tool should be enough

@LingMan
Copy link
Contributor

LingMan commented Oct 24, 2022

Switching to the wait-timeout crate might also be an option.

@kornelski
Copy link

macOS doesn't ship with a timeout command. I'm surprised this is implemented using a CLI tool, rather than a timeout in Rust.

Here's a workaround:

brew install coreutils

@ehuss ehuss added bug Something isn't working help wanted Extra attention is needed labels Feb 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

5 participants