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

Compiling with RUSTFLAGS="-C instrument-coverage" changes dependency tracking for doctest builds #95825

Open
scouten-adobe opened this issue Apr 8, 2022 · 12 comments
Labels
A-code-coverage Area: Source-based code coverage (-Cinstrument-coverage) A-doctests Area: Documentation tests, run by rustdoc C-bug Category: This is a bug. ICEBreaker-Cleanup-Crew Helping to "clean up" bugs with minimal examples and bisections P-medium Medium priority T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@scouten-adobe
Copy link

I have a (currently) closed-source crate. I'm trying to use the new coverage tools built into Rust 1.60 stable and I'm seeing some unexpected behavior when trying to run unit tests with coverage enabled.

When I run:

RUSTFLAGS="-C instrument-coverage" cargo test --all-features

I get hundreds of errors of the form …

error[E0463]: can't find crate for `serde_derive` which `ciborium` depends on
 --> (path redacted)
  |
4 | use ciborium::value::Value;
  |     ^^^^^^^^ can't find crate

… when it gets to the doctest portion of the test suite. (Ironically, this crate currently has no doc tests.)

If I add …

[lib]
doctest = false

… to Cargo.toml or compile without the instrument-coverage flag, I have no such errors.

Rust 1.60 stable, macOS 12.1 (Intel), closed-source (currently) crate.

Before I start digging in deeper, I would like to know if:

(a) Anyone else is seeing anything like this?
(b) Would it help the Rust core team if I could find a publicly-visible repro case?

Meta

rustc --version --verbose:

rustc 1.60.0 (7737e0b5c 2022-04-04)
binary: rustc
commit-hash: 7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c
commit-date: 2022-04-04
host: x86_64-apple-darwin
release: 1.60.0
LLVM version: 14.0.0
@scouten-adobe scouten-adobe added the C-bug Category: This is a bug. label Apr 8, 2022
@ehuss
Copy link
Contributor

ehuss commented Apr 8, 2022

(b) Would it help the Rust core team if I could find a publicly-visible repro case?

This might be a good idea. I tried in a few projects and couldn't find a way to reproduce.

@wesleywiser
Copy link
Member

Yeah, if you can point to a public crate that shows the issue that would be very helpful!

@wesleywiser wesleywiser added A-code-coverage Area: Source-based code coverage (-Cinstrument-coverage) A-doctests Area: Documentation tests, run by rustdoc labels Apr 8, 2022
@scouten-adobe
Copy link
Author

I am working on a repro case; hope to have something over the weekend.

@scouten-adobe
Copy link
Author

Creating a repro case is proving "interesting." I've lost reproducibility several times by cutting away different pieces of the original case.

scouten-adobe added a commit to scouten-adobe/rust-bug-95825 that referenced this issue Apr 12, 2022
@scouten-adobe
Copy link
Author

Please see https://github.com/scouten-adobe/rust-bug-95825. 100% reproducible for me with this project.

@estebank estebank added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. I-prioritize Issue: Indicates that prioritization has been requested for this issue. labels Apr 13, 2022
@apiraino
Copy link
Contributor

@scouten-adobe Thank you so much for providing a reproducible example. Assigning priority as discussed in the Zulip thread of the Prioritization Working Group.

@rustbot label -I-prioritize +P-medium

Can someone please bisect the regression happening on macOS?
@rustbot ping icebreakers-cleanup-crew

@rustbot rustbot added P-medium Medium priority ICEBreaker-Cleanup-Crew Helping to "clean up" bugs with minimal examples and bisections and removed I-prioritize Issue: Indicates that prioritization has been requested for this issue. labels Apr 20, 2022
@rustbot
Copy link
Collaborator

rustbot commented Apr 20, 2022

Hey Cleanup Crew ICE-breakers! This bug has been identified as a good
"Cleanup ICE-breaking candidate". In case it's useful, here are some
instructions for tackling these sorts of bugs. Maybe take a look?
Thanks! <3

cc @AminArria @ayazhafiz @camelid @chrissimpkins @contrun @elshize @h-michael @HallerPatrick @hdhoang @hellow554 @henryboisdequin @imtsuki @JamesPatrickGill @kanru @KarlK90 @matheus-consoli @mental32 @nmccarty @Noah-Kennedy @pard68 @PeytonT @pierreN @Redblueflame @RobbieClarken @RobertoSnap @robjtede @SarthakSingh31 @shekohex @sinato @smmalis37 @steffahn @Stupremee @tamuhey @turboladen @woshilapin @yerke

@duplys
Copy link

duplys commented Oct 14, 2022

Using @scouten-adobe 's https://github.com/scouten-adobe/rust-bug-95825, I can reproduce the bug on my Linux system

~$ uname -a
Linux RNG-C-000VG 5.4.0-126-generic #142-Ubuntu SMP Fri Aug 26 12:12:57 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

When I run cargo test, the output looks like this:

cargo test
   Compiling autocfg v1.1.0
   Compiling proc-macro2 v1.0.37
   Compiling unicode-xid v0.2.2
   ...
   Compiling bin v0.1.0 (/home/dup2rt/Temp/rust-bug-95825/bin)
   Finished test [unoptimized + debuginfo] target(s) in 20.40s
     Running unittests src/main.rs (target/debug/deps/bin-d8e0732fa286bd7e)

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

     Running tests/integration.rs (target/debug/deps/integration-e758c50b28aecb37)

running 1 test
test bin_errors_out ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 14.10s

     Running unittests src/lib.rs (target/debug/deps/lib-5e366658d769523f)

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

   Doc-tests lib

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

When I run RUSTFLAGS="-C instrument-coverage" cargo test --all-features, it gives the output:

   Compiling autocfg v1.1.0
   Compiling proc-macro2 v1.0.37
   Compiling unicode-xid v0.2.2
   ...
     Compiling bin v0.1.0 (/home/dup2rt/Temp/rust-bug-95825/bin)
    Finished test [unoptimized + debuginfo] target(s) in 21.96s
     Running unittests src/main.rs (target/debug/deps/bin-d8e0732fa286bd7e)

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

     Running tests/integration.rs (target/debug/deps/integration-e758c50b28aecb37)

running 1 test
test bin_errors_out ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 20.01s

     Running unittests src/lib.rs (target/debug/deps/lib-5e366658d769523f)

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

   Doc-tests lib
error[E0463]: can't find crate for `serde_derive` which `serde` depends on
 --> /home/dup2rt/Temp/rust-bug-95825/lib/src/cbor_types.rs:1:5
  |
1 | use serde::de::{Deserialize, Deserializer};
  |     ^^^^^ can't find crate

error[E0463]: can't find crate for `serde_derive` which `serde` depends on
 --> /home/dup2rt/Temp/rust-bug-95825/lib/src/cbor_types.rs:2:5
  |
2 | use serde::ser::{Serialize, Serializer};
  |     ^^^^^ can't find crate

error[E0463]: can't find crate for `serde_derive` which `serde_bytes` depends on
 --> /home/dup2rt/Temp/rust-bug-95825/lib/src/cbor_types.rs:3:5
  |
3 | use serde_bytes::ByteBuf;
  |     ^^^^^^^^^^^ can't find crate

error[E0463]: can't find crate for `serde_derive` which `serde_cbor` depends on
 --> /home/dup2rt/Temp/rust-bug-95825/lib/src/cbor_types.rs:4:5
  |
4 | use serde_cbor::tags::Tagged;
  |     ^^^^^^^^^^ can't find crate

error[E0463]: can't find crate for `serde_derive` which `serde` depends on
  --> /home/dup2rt/Temp/rust-bug-95825/lib/src/cbor_types.rs:21:28
   |
21 |             Some(_) => Err(serde::de::Error::custom("unexpected tag")),
   |                            ^^^^^ can't find crate

error[E0463]: can't find crate for `serde_derive` which `serde` depends on
  --> /home/dup2rt/Temp/rust-bug-95825/lib/src/cbor_types.rs:47:28
   |
47 |             Some(_) => Err(serde::de::Error::custom("unexpected tag")),
   |                            ^^^^^ can't find crate

error[E0463]: can't find crate for `serde_derive` which `serde` depends on
  --> /home/dup2rt/Temp/rust-bug-95825/lib/src/cbor_types.rs:72:28
   |
72 |             Some(_) => Err(serde::de::Error::custom("unexpected tag")),
   |                            ^^^^^ can't find crate

error: aborting due to 7 previous errors

For more information about this error, try `rustc --explain E0463`.
error: doctest failed, to rerun pass `-p lib --doc`

Caused by:
  process didn't exit successfully: `rustdoc --edition=2018 --crate-type cdylib --crate-type rlib --crate-name lib --test /home/dup2rt/Temp/rust-bug-95825/lib/src/lib.rs -L dependency=/home/dup2rt/Temp/rust-bug-95825/target/debug/deps -L dependency=/home/dup2rt/Temp/rust-bug-95825/target/debug/deps --extern lib=/home/dup2rt/Temp/rust-bug-95825/target/debug/deps/liblib.rlib --extern log=/home/dup2rt/Temp/rust-bug-95825/target/debug/deps/liblog-e2a90e882ca4d481.rlib --extern serde=/home/dup2rt/Temp/rust-bug-95825/target/debug/deps/libserde-2f2024fc03b2f3d2.rlib --extern serde_bytes=/home/dup2rt/Temp/rust-bug-95825/target/debug/deps/libserde_bytes-048ef4f616271d10.rlib --extern serde_cbor=/home/dup2rt/Temp/rust-bug-95825/target/debug/deps/libserde_cbor-c33d8a2e71989bfb.rlib -C embed-bitcode=no --error-format human` (exit status: 1)
make: *** [Makefile:2: red] Error 1

Meta

$ rustc --version --verbose
rustc 1.66.0-dev
binary: rustc
commit-hash: unknown
commit-date: unknown
host: x86_64-unknown-linux-gnu
release: 1.66.0-dev
LLVM version: 15.0.2

I built the Rust compiler from the source:

~/Temp/rust$ git log
commit 32717603f61a566ff0b8293ef3177cb7c4f50fa9 (HEAD -> master, origin/master, origin/HEAD)
Merge: 1755c853028 42321b01e0a
Author: bors <bors@rust-lang.org>
Date:   Fri Oct 14 07:41:55 2022 +0000

    Auto merge of #102695 - compiler-errors:int-and-float-trivial-copy, r=lcnr
    
    Int and float inference variables are trivially copy
    
    Fixes #102645

@duplys
Copy link

duplys commented Oct 20, 2022

Hey @scouten-adobe, @estebank and @wesleywiser, some more 🕵️ work here, maybe it gets us somewhere.

With the nightly 2022-03-07 (commit 03918badd), I get the same error like the one @scouten-adobe reported:

$ rustc --version
rustc 1.61.0-nightly (03918badd 2022-03-07)
$ RUSTFLAGS="-C instrument-coverage" cargo test --all-features
...
   Doc-tests lib
error[E0463]: can't find crate for `serde_derive` which `serde` depends on
 --> /home/dup2rt/Temp/rust-bug-95825/lib/src/cbor_types.rs:1:5
  |
1 | use serde::de::{Deserialize, Deserializer};
  |     ^^^^^ can't find crate
...

However, with the nightly 2022-03-06 (commit 38a0b81b1), I get a different error:

$ rustc --version
rustc 1.61.0-nightly (38a0b81b1 2022-03-06)
$ RUSTFLAGS="-C instrument-coverage" cargo test --all-features
...
   Compiling atty v0.2.14
   Compiling dirs-sys v0.3.7
   Compiling tempfile v3.3.0
   Compiling clap v2.34.0
error[E0658]: trait bounds other than `Sized` on const fn parameters are unstable
   --> /home/dup2rt/.cargo/registry/src/github.com-1ecc6299db9ec823/crossbeam-epoch-0.9.8/src/atomic.rs:314:6
    |
314 | impl<T: ?Sized + Pointable> Atomic<T> {
    |      ^
...
346 |     pub const fn null() -> Atomic<T> {
    |     -------------------------------- function declared as const here
    |
    = note: see issue #93706 <https://github.com/rust-lang/rust/issues/93706> for more information
    = help: add `#![feature(const_fn_trait_bound)]` to the crate attributes to enable

   Compiling dirs v3.0.2
For more information about this error, try `rustc --explain E0658`.
error: could not compile `crossbeam-epoch` due to previous error
warning: build failed, waiting for other jobs to finish...
error: build failed
make: *** [Makefile:2: red] Error 101

@scouten-adobe: is there a rustc version that compiles RUSTFLAGS="-C instrument-coverage" cargo test --all-features without errors? If not, is the change in the error message getting us somewhere?

For now, I tested different rustc versions by installing them via rustup. Compiling "older" Rust versions from source turned out to be rather painful (like requiring a custom libgccjit). Via git log, I can see that there are numerous commits between 03918badd and 38a0b81b1 (is there a concise README how to build these?):

03918badd33d255de806b4a9a8aa75b031ed0738 2022-03-07 Auto merge of #94706 - matthiaskrgr:rollup-l5erynr, r=matthiaskrgr
fbd4cfa0f8272a5c74d6c5ed882032a08d5b8d09 2022-03-07 diagnostics: only talk about `Cargo.toml` if running under Cargo
170b02702277229ccaae3ffed916bf6dc57548fc 2022-03-07 Add comments based on code review feedback
840dc1047112294387a7cc16536315ab306c2de2 2022-03-07 Update clippy to new ExprUseVisitor delegate
9f0f46fa4da35bea07c3bedd7bd9e6742d375a27 2022-03-07 Update clippy to new ExprUseVisitor delegate
87ad6683d6cc3c1e2597a3a37e03fe4330414fd3 2022-03-07 Distinguish borrows of copies from other borrows
ac804f27a8ce2e02fd3a9c5eff83098258b78da6 2022-03-07 Trying to detect autorefs to avoid unnecessary borrowed temporaries
513a9c67a59c0e1b9a7903d7e5fca4b6da974673 2022-03-07 Move test to right place
60f5cad6ebaa683ac58132b7bb64002a90deb343 2022-03-07 try to fix issue 57017, but not quite there yet
b3261f8ce4e0a09e0534794a30f2570abe85be63 2022-03-07 Rollup merge of #94700 - GuillaumeGomez:update-minifier, r=notriddle
77562f2350c4dbe2d19a253f70046fb3edd9baa6 2022-03-07 Rollup merge of #94696 - GuillaumeGomez:align-line-numbers-right, r=notriddle
9d7166c66f7d2cd7d2e51abae3e42a520fb359e0 2022-03-07 Rollup merge of #93827 - eholk:stabilize-const_fn-features, r=wesleywiser
1ca8d0bf8c154b0f602fadac8c38f14df5dea77a 2022-03-07 Rollup merge of #93350 - gburgessiv:master, r=Mark-Simulacrum
3f4a095d3e8166d710919e06e21fc4cbc056b0ee 2022-03-07 Merge #11647
8e3057d0a72ccea84508cca7f3faaf9531349ac7 2022-03-07 Improve inlay hint padding
165b5583e56ad6d54922a7b5117a37c2ca2c89a1 2022-03-07 Fix typos in `LintExpectationId` docs
47f3f66240eb20da1cd7583115a6ea1a2d25e388 2022-03-07 Update unstable `ExpectationId`s in stored diagnostics
c03575275a56112edacd1c5cd26a8eb2d4763b74 2022-03-07 update recommended CI snippet, add GHA example
49646b71d49cc3c94aa0105223be0ff71cbb6b7d 2022-03-07 Merge #11445
88a2141b7702a553050dc46653251550300e6269 2022-03-07 Add inlayHints cap
43ce0a94af2539f28463197010a5f4147e33a0e0 2022-03-07 Update and fix clippy tests
bb6bcaa1deaa0102ffb9fd23e27f427939de43a1 2022-03-07 Update tests
1afbf3e4b1cbe1eb466da3da2319770db8ff5e9d 2022-03-07 Bump stabilization version to 1.61.0
8700b45b67b2cc138718a17fdb606db0944d03aa 2022-03-07 Stabilize const_impl_trait as well
801be21d11806d37bacd7c7adaeb93a33871f31e 2022-03-07 Remove dead/useless code
8e93a48c32852b09f4270348883b61edba5bb068 2022-03-07 Update and fix clippy tests
8fc835831c1a84ba27d8bbafec480f02b2e29663 2022-03-07 Update tests after feature stabilization
b86620da377102a1a5e84a96910b70c9c957b810 2022-03-07 Stabilize const_fn_fn_ptr_basics and const_fn_trait_bound
7723506d13a03e3191d407aaf3709f157bf75193 2022-03-07 Stabilize const_fn_fn_ptr_basics and const_fn_trait_bound
96515f421a9efe88b46091e58533c1bfe875e09e 2022-03-07 Do not allow `#[rustc_legacy_const_generics]` on methods
3e7035fa86af022ed047e7a1b1540584e2b61234 2022-03-07 Auto merge of #94690 - nnethercote:clarify-Layout-interning, r=fee1-dead
ecb867ec3cefa97a5807453a68758392730e3ed9 2022-03-07 Auto merge of #94690 - nnethercote:clarify-Layout-interning, r=fee1-dead
64b086a8e26cbf7daddcf4581e6351a55718a913 2022-03-07 Auto merge of #2004 - RalfJung:simd, r=RalfJung
ffa59765e0114de175e2489845b06e0377c77923 2022-03-07 Gather more profile data for LLVM PGO
b87a9c90e1ca983eb81778d79b23db8c52eace54 2022-03-07 fix handling of NaNs in simd max/min
2f97eb68a0f77d3829151bc57855d42535465a6d 2022-03-07 implement simd_fmax/fmin
9851b743c1a4a1fdb62579c2c8bb6d6f543a7028 2022-03-07 implement simd_reduce_min/max
db06d4998fa8e64c290a7ae439fb2f8aefb2223e 2022-03-07 implement simd_cast, simd_as
dd42a47f0a458380a1ea03ec6ef360ece3674692 2022-03-07 Auto merge of #2005 - RalfJung:rustup, r=RalfJung
594a70a28901efa14c8119242c5692027dbd8eb9 2022-03-07 rustup
a496fa4fc15276da2a47b84bcc43824a7c0c667b 2022-03-07 Update minifier version
97109d73f89d050dd92194485374d3bd6925b3c1 2022-03-07 Add missing parameter
26d2e88b0424740edf6aad03bccb62315bd334e2 2022-03-07 Fix parameter hint position
04128de55396b256b593422315f7af87b7598190 2022-03-07 Bump esbuild
b9d74fe2ed578f0b48f7773cde432df80531bb0b 2022-03-07 Update LSP docs
d137c3a7bd3b180317044f8ccb9a8b4b3bb07db3 2022-03-07 Auto merge of #94695 - matthiaskrgr:rollup-5pi3acz, r=matthiaskrgr
5b5649fd73755eb2d9c4473efad0a1f264e3cfd0 2022-03-07 Add missing documentation for std::char types
36bb53d4978cdf1f35d1436ad77998bddbaaa5bd 2022-03-07 BTree: remove dead data needlessly complicating insert
18d0faf027a0ea2808b842f2dfbd7b7e12438f44 2022-03-07 Merge #11645
6e62d93c9541080f45c964d0afe2e2df723dede5 2022-03-07 Update manual.adoc
f23d6d3a47c15bc0fc3fbf2abdd318c3a2c09c7c 2022-03-07 Add GUI test to ensure that line numbers text is aligned to the right
e89efb8634a1ffc8e7573b6f4cf53aa9b36d92ae 2022-03-07 Remove unneeded whitespace generation and use CSS instead instead to align line numbers to the right
c0c452ba9bd66eac4e6bee9508bbf5be273f5b13 2022-03-07 Rollup merge of #94688 - compiler-errors:free-regions-in-copy-predicate-check, r=oli-obk
a795f0f5367d35c7c5e8f03228037ae0aa0fee6a 2022-03-07 Rollup merge of #94685 - RalfJung:saturating, r=oli-obk
87df3f663d302431d745172f35f34997b05945d1 2022-03-07 Rollup merge of #94614 - pierwill:localexpnid-noord, r=lcnr
2c98edaaa795d3b203052ec4d738d188598b47b4 2022-03-07 Rollup merge of #94553 - lcnr:add-tests, r=Dylan-DPC
db3fcf8df7269f9265e4643d4aa81f11d550e06b 2022-03-07 add basic code to check nop match blocks modify `manual_map_option` uitest because one test case has confliction.
31ad347b0ef7f2e98496b1cf7a99bff5e59d87c4 2022-03-07 Merge #11644
6da122889856f40bd165c68c6daf58de23def98e 2022-03-07 Emit more detailed highlighting for `%`, `>>`, `<<`
297273c45b205820a4c055082c71677197a40b55 2022-03-07 Auto merge of #94692 - matthiaskrgr:rollup-64p7ya7, r=matthiaskrgr
dad81b65db1b67be7f24b2a418c66db10aecd4b5 2022-03-07 add tests for #94502
a1119fd6999aa034d026d1d97d4acff8a2662f18 2022-03-07 Rollup merge of #94684 - compiler-errors:gat-anon-late-bound, r=notriddle
f7eb3830df557c66512bf2424cc03fa8de888c9c 2022-03-07 Rollup merge of #94681 - RalfJung:miri-cast, r=oli-obk
02539e16121a3ad81172892753a7b1ed09746acd 2022-03-07 Rollup merge of #94676 - TaKO8Ki:remove-unnecessary-pattens-for-ignoring-remaining-parts, r=Dylan-DPC
9c7ff1add7c395686831059f609efe3f530bb98b 2022-03-07 Rollup merge of #94636 - compiler-errors:issue-94599, r=davidtwco
2631aeef823a9e16d31f999d3f07001e5fcc4b3d 2022-03-07 Auto merge of #94272 - tavianator:readdir-reclen-for-real, r=cuviper
b726bfb56902eaa743f7164ce502afbdd232562c 2022-03-06 allow referencing impl substs from rustc_on_unimplemented
e4766776d24a17cc1500c8e420a00c4c0e05423b 2022-03-07 add test for trait recursion
e9ddb8f8fb6fb42d533deb9b092e34c046b45b66 2022-03-06 use impl substs in on_unimplemented
8723fe0b6b6f8563c2ca0f15c83adf309e780d2a 2022-03-07 Clarify `Layout` interning.
b36924b4ac73c4eab2fd9e4cc2486d5fa1b6bf41 2022-03-07 Clarify `Layout` interning.
d35fc85a44b99022d7e7fd506b72e2bbfe5c19bb 2022-03-07 Clarify `Layout` interning.
4f008e06c33e1ef729bce839c0899154e71902b0 2022-03-07 Clarify `Layout` interning.
0e36868bc7a94c5a282ff3598744c72e621276ca 2022-03-07 Auto merge of #94638 - erikdesjardins:noextranull, r=nagisa
3d1eaf4b6203ab0168da5b99049942385aa753e0 2022-03-07 Auto merge of #94638 - erikdesjardins:noextranull, r=nagisa
5ddaa2d5e53344ff8b88d98e61e3dd36edb803e9 2022-03-06 Erase regions when checking for missing Copy predicates
ac844986d8f5646b686e2a5619e5a90372953b38 2022-03-06 use singed_int_max/min helper methods
956659e5ced806360b726c103eb7ab1d960c163a 2022-03-06 move saturating_add/sub into (pub) helper method
890a44f66b355d40a284349a22ac82aea82f0520 2022-03-06 Fix rustdoc for GATs with with anonymous bound regions
8876ca3dd46b99fe7e6ad937f11493d37996231e 2022-03-06 Auto merge of #94597 - nnethercote:ConstAllocation, r=fee1-dead
96eb1168d177a8e37fb4866051e665e3f1988c25 2022-03-07 Introduce `ConstAllocation`.
7c1a318c7b801e7020918b238428f484f0f13aa7 2022-03-07 Introduce `ConstAllocation`.
92d1850f17f8a2f0e300e2350cc9a53463d0f23a 2022-03-07 Introduce `ConstAllocation`.
4852291417127d86c3f8404ef03cb1706d89a3e6 2022-03-07 Introduce `ConstAllocation`.
38a0b81b1c32764d6a583a5efb6f306b8c44c503 2022-03-06 Auto merge of #94679 - matthiaskrgr:rollup-9vd7w6a, r=matthiaskrgr

@CAD97
Copy link
Contributor

CAD97 commented Oct 20, 2022

@duplys the easy way to bisect is with cargo-bisect-rustc; so long as the change is recent enough1, it can automatically download the builds from each merge's CI to bisect more granularly.

Although, I've not used the tool. I know it's designed for pinpointing regressions; I don't know if it can be convinced to bisect a change in error.

Footnotes

  1. While the nightly toolchains are perpetually available through rustup, the each-merge builds are IIRC garbage collected after some amount of time.

@duplys
Copy link

duplys commented Oct 28, 2022

Thanks a lot for this useful advice, @CAD97! I remember briefly looking at cargo-bisect-rustc before, but I didn't realize that one can bisect the Rust compiler itself 🤦‍♂️ 😄

@scouten-adobe, @estebank and @wesleywiser: I ran cargo-bisect-rustc with @scouten-adobe 's minimal example https://github.com/scouten-adobe/rust-bug-95825 and obtained following result:

dup2rt@RNG-C-000VG:~/Temp$ cargo-bisect-rustc --test-dir=rust-bug-95825 --start=2022-01-01
checking the start range to find a passing nightly
installing nightly-2022-01-01
rust-std-nightly-x86_64-unknown-linux-gnu: 25.62 MB / 25.62 MB [======================================================================================================================] 100.00 % 5.57 MB/s testing...
RESULT: nightly-2022-01-01, ===> No
uninstalling nightly-2022-01-01

checking the end range to verify it does not pass
installing nightly-2022-03-07
testing...
RESULT: nightly-2022-03-07, ===> Yes
uninstalling nightly-2022-03-07

33 versions remaining to test after this (roughly 5 steps)
installing nightly-2022-02-02
rust-std-nightly-x86_64-unknown-linux-gnu: 25.85 MB / 25.85 MB [======================================================================================================================] 100.00 % 5.06 MB/s testing...
RESULT: nightly-2022-02-02, ===> No
uninstalling nightly-2022-02-02

17 versions remaining to test after this (roughly 4 steps)
installing nightly-2022-02-18
rust-std-nightly-x86_64-unknown-linux-gnu: 26.23 MB / 26.23 MB [======================================================================================================================] 100.00 % 5.74 MB/s testing...
RESULT: nightly-2022-02-18, ===> No
uninstalling nightly-2022-02-18

9 versions remaining to test after this (roughly 3 steps)
installing nightly-2022-02-26
rust-std-nightly-x86_64-unknown-linux-gnu: 26.42 MB / 26.42 MB [======================================================================================================================] 100.00 % 5.87 MB/s testing...
RESULT: nightly-2022-02-26, ===> Yes
uninstalling nightly-2022-02-26

4 versions remaining to test after this (roughly 2 steps)
installing nightly-2022-02-22
rust-std-nightly-x86_64-unknown-linux-gnu: 26.33 MB / 26.33 MB [======================================================================================================================] 100.00 % 5.84 MB/s testing...
RESULT: nightly-2022-02-22, ===> Yes
uninstalling nightly-2022-02-22

2 versions remaining to test after this (roughly 1 steps)
installing nightly-2022-02-20
rust-std-nightly-x86_64-unknown-linux-gnu: 26.18 MB / 26.18 MB [======================================================================================================================] 100.00 % 5.77 MB/s testing...
RESULT: nightly-2022-02-20, ===> Yes
uninstalling nightly-2022-02-20

1 versions remaining to test after this (roughly 1 steps)
installing nightly-2022-02-19
rust-std-nightly-x86_64-unknown-linux-gnu: 26.24 MB / 26.24 MB [======================================================================================================================] 100.00 % 5.89 MB/s testing...
RESULT: nightly-2022-02-19, ===> No
uninstalling nightly-2022-02-19

searched toolchains nightly-2022-01-01 through nightly-2022-03-07


********************************************************************************
Regression in nightly-2022-02-20
********************************************************************************

fetching https://static.rust-lang.org/dist/2022-02-19/channel-rust-nightly-git-commit-hash.txt
nightly manifest 2022-02-19: 40 B / 40 B [==========================================================================================================================================] 100.00 % 538.82 KB/s converted 2022-02-19 to b17226fcc11587fed612631be372a5b4cb89988a
fetching https://static.rust-lang.org/dist/2022-02-20/channel-rust-nightly-git-commit-hash.txt
nightly manifest 2022-02-20: 40 B / 40 B [==========================================================================================================================================] 100.00 % 483.37 KB/s converted 2022-02-20 to 3b348d932aa5c9884310d025cf7c516023fd0d9a
looking for regression commit between 2022-02-19 and 2022-02-20
opening existing repository at "/home/dup2rt/Temp/rust"
Found origin remote under name `origin`
refreshing repository at "/home/dup2rt/Temp/rust"
fetching (via local git) commits from b17226fcc11587fed612631be372a5b4cb89988a to 3b348d932aa5c9884310d025cf7c516023fd0d9a
opening existing repository at "/home/dup2rt/Temp/rust"
Found origin remote under name `origin`
refreshing repository at "/home/dup2rt/Temp/rust"
looking up first commit
looking up second commit
checking that commits are by bors and thus have ci artifacts...
finding bors merge commits
found 6 bors merge commits in the specified range
  commit[0] 2022-02-18UTC: Auto merge of #94121 - matthiaskrgr:rollup-6ps95da, r=matthiaskrgr
  commit[1] 2022-02-18UTC: Auto merge of #94050 - michaelwoerister:fix-unsized-tuple-debuginfo, r=pnkfelix
  commit[2] 2022-02-19UTC: Auto merge of #94134 - matthiaskrgr:rollup-b132kjz, r=matthiaskrgr
  commit[3] 2022-02-19UTC: Auto merge of #94105 - 5225225:destabilise-entry-insert, r=Mark-Simulacrum
  commit[4] 2022-02-19UTC: Auto merge of #94148 - matthiaskrgr:rollup-jgea68f, r=matthiaskrgr
  commit[5] 2022-02-19UTC: Auto merge of #94165 - Mark-Simulacrum:bump-version, r=Mark-Simulacrum
ERROR: no CI builds available between b17226fcc11587fed612631be372a5b4cb89988a and 3b348d932aa5c9884310d025cf7c516023fd0d9a within last 167 days
dup2rt@RNG-C-000VG:~/Temp$ 

@scouten-adobe, @estebank, @wesleywiser, @CAD97: Does this help? Is there a (good) way to further zero in on the commit where the regression was introduced?

@duplys
Copy link

duplys commented Nov 7, 2022

Hey @scouten-adobe, @estebank and @wesleywiser , does the above help?

matheus23 added a commit to fission-codes/fission-server that referenced this issue Jan 23, 2024
matheus23 added a commit to fission-codes/fission-server that referenced this issue Jan 23, 2024
Main addition: Integration tests between the CLI and server in `fission-cli/tests/main.rs`.
Also:
- Add `--ephemeral-db` parameter to the server to use an ephemeral DB while running which is destroyed on close
- Add `--close-on-stdin-close` parameter to the server to enable listening on EOF in stdin and closing appropriately
- Add `--gen-key-if-needed` parameter to the server to enable writing a new key to the fs if there is none yet
- Added `--no-colors` CLI parameter to turn of colored output
- Added hidden `--key-seed` CLI parameter to enable isolating CLI tests
- Refactor server tests a bit. More `?` and less `&`, `TestContext::request` shorthand, etc.

---

* refactor: Add `test_utils` feature and expose stuff there

* refactor: Make tests a tiny bit nicer to work with

* chore: CLI <> Server integration test setup

* refactor: Extract out ephermeral DB code

* feat: Ephemeral DB setups/teardowns

* fix: Fix types by adding the test setup under `test_utils` feature

* chore: Write account creation test

* chore: Specify exact revision for rexpect

* refactor: Make `&str` sigs more flexible

* chore: Write another integration test & run tests serially

* chore: Write all integration tests

* chore: Re-enable coverage for CLI code

* chore: Explictily allow unreleased `rexpect`

* feat: Add `--gen-key-if-needed`server param

* feat: Allow running the CLI without a preexisting settings toml

* chore: Warn about missing settings file

* chore: Let cargo test capture server stdout/stderr 💄

* chore: Try not using `--close-on-stdio-close`

* chore: Remove unused `revisions` field

* chore: Fix coverate workflow by disabling doctests

rust-lang/rust#95825
is the underlying issue.

* chore: Add comment explaining the reason for disabling doctests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-code-coverage Area: Source-based code coverage (-Cinstrument-coverage) A-doctests Area: Documentation tests, run by rustdoc C-bug Category: This is a bug. ICEBreaker-Cleanup-Crew Helping to "clean up" bugs with minimal examples and bisections P-medium Medium priority T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
Status: No status
Development

No branches or pull requests

8 participants