rust-lang / cargo-bisect-rustc

Bisects rustc, either nightlies or CI artifacts
https://rust-lang.github.io/cargo-bisect-rustc/
Apache License 2.0
174 stars 55 forks source link

bisecting broken: `Script returned error` #343

Open matthiaskrgr opened 1 week ago

matthiaskrgr commented 1 week ago

I have a script like

#!/bin/sh
! rustc /tmp/crash.rs  |& grep -Ii "query stack"

which returns 1 or 0 depending on whether rustc says "query stack" while processing a file.

When I try to run this after the update cargo-bisect-rustc --preserve --script=/home/matthias/vcs/github/rust_bisect/script.sh --test-dir=/home/matthias/vcs/github/rust_bisect/foo --start 2024-06-15 CBR just quits:

fetching https://static.rust-lang.org/dist/channel-rust-nightly-date.txt
nightly date: 10 B / 10 B [===========================================================================================================] 100.00 % 755.04 KB/s determined the latest nightly is 2024-06-23
checking the start range to find a passing nightly
installing nightly-2024-06-15
testing...
RESULT: nightly-2024-06-15, ===> Script returned error

ERROR: the start of the range (nightly-2024-06-15) must not reproduce the regression

cc @ehuss

cargo-bisect-rustc 0.6.9

ehuss commented 1 week ago

Can you say more about what the issue is? It looks like the start of your range is either failing to compile, or emitting the "query stack" message. What are the contents of crash.rs? What is the output with -vv?

matthiaskrgr commented 1 week ago

Ooh, did only the CBR output change? This looked like cbr could not proceed because of some error related to the script.

ehuss commented 1 week ago

Yea, instead of saying "Yes" or "No", it tells you what happened at each step.

matthiaskrgr commented 1 week ago

would be clearer if it would also say the exit code imo, something like Script returned error (exit code: 1)

ehuss commented 1 week ago

Yea, it would be nice to include the exit code. I'm not sure how difficult that will be since the code that renders the message may not have access to the exit code.