Repository navigation
-Zprofile broken in nightly? #50203
Description
Activity
- changed the title
[-]Does -Zprofile broken in nightly?[/-][+]Is -Zprofile broken in nightly?[/+]on Apr 24, 2018 - changed the title
[-]Is -Zprofile broken in nightly?[/-][+]-Zprofile broken in nightly?[/+]on Apr 24, 2018 - addedT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.C-bugCategory: This is a bug.Category: This is a bug.
on Apr 26, 2018 It would be great if we could bisect this, to know what caused the regression.
Thanks. It still breaks on the latest nightly.
$ rustc -V rustc 1.28.0-nightly (4a9c58c6b 2018-06-05) $ cargo -V cargo 1.28.0-nightly (c3b09c968 2018-05-27)This feature is really important to get a proper code coverage profile.
I'm trying to bisect manually.
For now:
2018-01-01 is broken.
2017-12-15 is working.2017-12-24 is working. 2017-12-25 is broken.
Here are the commits landed between those two days: https://github.com/rust-lang/rust/compare/master@%7B2017-12-24%7D...master@%7B2017-12-25%7D.I guess we should have added parsing of gcda as part of this test: https://github.com/rust-lang/rust/blob/master/src/test/run-make-fulldeps/profile/Makefile.
@alexcrichton is the range from #50203 (comment) correct? I guess there's a precise way to tell what commit a given Nightly build correspons to?
C:\> rustc +nightly-2017-12-24 -vV rustc 1.24.0-nightly (169929308 2017-12-23) binary: rustc commit-hash: 16992930835ce3376a4aaed42307726e1fc78e45 commit-date: 2017-12-23 host: x86_64-pc-windows-msvc release: 1.24.0-nightly LLVM version: 4.0 C:\> rustc +nightly-2017-12-25 -vV rustc 1.24.0-nightly (c284f8807 2017-12-24) binary: rustc commit-hash: c284f8807eb3a1d728242bb6a767b0306d6f6bd5 commit-date: 2017-12-24 host: x86_64-pc-windows-msvc release: 1.24.0-nightly LLVM version: 4.0The regression happens between 1699293...c284f88
PRs in this range:
- incr.comp.: Cache check_match and use ensure() for coherence-related queries. #46881 (incr.comp.: Cache check_match and use ensure() for coherence-related queries.)
- Prevent unwinding past FFI boundaries #46833 (Prevent unwinding past FFI boundaries)
- Add a feature gate for nested uses of
impl Trait#46888 (Add a feature gate for nested uses ofimpl Trait) - Only mark unions as uninhabited if all of their fields are uninhabited #46859 (Only mark unions as uninhabited if all of their fields are uninhabited)
- Const-eval array lengths in rustdoc. #46894 (Const-eval array lengths in rustdoc.)
- fix debuginfo scoping of let-statements #46896 (fix debuginfo scoping of let-statements)
- Update Cargo and its dependencies #46630 (Update Cargo and its dependencies)
- Capture
Commandenvironment at spawn #46789 (CaptureCommandenvironment at spawn)
Fast PR-by-PR bisection is impossible at this point since the artifacts have been deleted.
It is caused by incremental compilation.
~:45$ rustc --crate-name hello_world src/main.rs --crate-type bin --emit=link -C debuginfo=2 -Zprofile -Copt-level=1 -Clink-dead-code -Ccodegen-units=1 -Zno-landing-pads -C metadata=e6641c514587dc22 -C extra-filename=-e6641c514587dc22 --out-dir ~/hello_world/target/debug/deps ~:46$ ./target/debug/deps/hello_world-e6641c514587dc22 Hello, world! ~:47$ rustc --crate-name hello_world src/main.rs --crate-type bin --emit=link -C debuginfo=2 -Zprofile -Copt-level=1 -Clink-dead-code -Ccodegen-units=1 -Zno-landing-pads -C metadata=e6641c514587dc22 -C extra-filename=-e6641c514587dc22 --out-dir ~/hello_world/target/debug/deps -C incremental=~/hello_world/target/debug/incremental ~:48$ ./target/debug/deps/hello_world-e6641c514587dc22 Hello, world! profiling: ~/hello_world/target/debug/deps/hello_world-e6641c514587dc22.gcda: cannot merge previous GCDA file: corrupt arc tag (0x00000001) profiling: ~/hello_world/target/debug/deps/hello_world-e6641c514587dc22.gcda: cannot merge previous GCDA file: corrupt arc tag (0x24246437) profiling: ~/hello_world/target/debug/deps/hello_world-e6641c514587dc22.gcda: cannot merge previous run count: corrupt object tag (0x24643775) profiling: ~/hello_world/target/debug/deps/hello_world-e6641c514587dc22.gcda: cannot merge previous GCDA file: corrupt arc tag (0x39383038) profiling: ~/hello_world/target/debug/deps/hello_world-e6641c514587dc22.gcda: cannot merge previous run count: corrupt object tag (0x32626265) profiling: ~/hello_world/target/debug/deps/hello_world-e6641c514587dc22.gcda: cannot merge previous GCDA file: corrupt arc tag (0x39383038) profiling: ~/hello_world/target/debug/deps/hello_world-e6641c514587dc22.gcda: cannot merge previous GCDA file: corrupt arc tag (0x00000000) profiling: ~/hello_world/target/debug/deps/hello_world-e6641c514587dc22.gcda: cannot merge previous run count: corrupt object tag (0x62333333) profiling: ~/hello_world/target/debug/deps/hello_world-e6641c514587dc22.gcda: cannot merge previous GCDA file: corrupt arc tag (0x38327472) profiling: ~/hello_world/target/debug/deps/hello_world-e6641c514587dc22.gcda: cannot merge previous GCDA file: corrupt arc tag (0x34737973) profiling: ~/hello_world/target/debug/deps/hello_world-e6641c514587dc22.gcda: cannot merge previous run count: corrupt object tag (0x78696e75) profiling: ~/hello_world/target/debug/deps/hello_world-e6641c514587dc22.gcda: cannot merge previous GCDA file: corrupt arc tag (0x246e6f69) profiling: ~/hello_world/target/debug/deps/hello_world-e6641c514587dc22.gcda: cannot merge previous run count: corrupt object tag (0x36245447) profiling: ~/hello_world/target/debug/deps/hello_world-e6641c514587dc22.gcda: cannot merge previous GCDA file: corrupt arc tag (0x38306266) profiling: ~/hello_world/target/debug/deps/hello_world-e6641c514587dc22.gcda: cannot merge previous run count: corrupt object tag (0x00004538)git bisect start # bad: [c284f8807eb3a1d728242bb6a767b0306d6f6bd5] Auto merge of #46789 - Diggsey:command-env-capture, r=dtolnay git bisect bad c284f8807eb3a1d728242bb6a767b0306d6f6bd5 # good: [16992930835ce3376a4aaed42307726e1fc78e45] Auto merge of #46864 - estebank:closure-type-err-sp, r=nikomatsakis git bisect good 16992930835ce3376a4aaed42307726e1fc78e45 # good: [16992930835ce3376a4aaed42307726e1fc78e45] Auto merge of #46864 - estebank:closure-type-err-sp, r=nikomatsakis git bisect good 16992930835ce3376a4aaed42307726e1fc78e45 # good: [11a24d9c3940f60e527c571680d64e80e0889abe] Auto merge of #46888 - cramertj:nested-impl-trait-error, r=nikomatsakis git bisect good 11a24d9c3940f60e527c571680d64e80e0889abe # good: [304717bd86e42bc9b0c45ea5a6068e7ed9d13f2f] Auto merge of #46894 - detrumi:fix-const-eval-trait, r=eddyb git bisect good 304717bd86e42bc9b0c45ea5a6068e7ed9d13f2fAlmost done.
Reacted by kennytm325d739 is the culprit.
325d739 updated Cargo from 930f9d949b384fde9b0d7b9cc590515933f194c0 to e08f310188cc0d101550c21b3d88877cfba7e5e1, here's the list of commits that landed between the two: rust-lang/cargo@930f9d9...e08f310.
So I guess it's simply rust-lang/cargo#4817.
Well so we're back to square one 😞. Maybe inc. comp. is simply incompatible with -Zprofile.
We could disable incremental compilation when profile is enabled, like for LTO.
We could disable incremental compilation when profile is enabled, like for LTO.
I've opened #51645 to do this.
- added a commit that references this issue
on Jul 2, 2018 The same problem reappeared in 1.60.0-nightly (09cb29c 2022-02-15)
ubuntu: info: default toolchain set to 'nightly-x86_64-unknown-linux-gnu' ubuntu: nightly-x86_64-unknown-linux-gnu installed - rustc 1.60.0-nightly (09cb29c64 2022-02-15) ubuntu: ubuntu: ubuntu: Rust is installed now. Great! ... failures: ---- x86_64::mpspec::bindgen_test_layout_mpc_cpu stdout ---- ---- x86_64::mpspec::bindgen_test_layout_mpc_cpu stderr ---- profiling: /vagrant/target/debug/deps/db_boot-f38d7d4bfa105ed8.gcda: cannot merge previous GCDA file: corrupt arc tag (0x00000000) profiling: /vagrant/target/debug/deps/db_boot-f38d7d4bfa105ed8.gcda: cannot merge previous GCDA file: corrupt arc tag (0x00000001) profiling: /vagrant/target/debug/deps/db_boot-f38d7d4bfa105ed8.gcda: cannot merge previous GCDA file: corrupt arc tag (0x00000001) profiling: /vagrant/target/debug/deps/db_boot-f38d7d4bfa105ed8.gcda: cannot merge previous GCDA file: corrupt arc tag (0x75747375) profiling: /vagrant/target/debug/deps/db_boot-f38d7d4bfa105ed8.gcda: cannot merge previous GCDA file: corrupt arc tag (0x3638782d) profiling: /vagrant/target/debug/deps/db_boot-f38d7d4bfa105ed8.gcda: cannot merge previous GCDA file: corrupt arc tag (0x696c2f75)See https://github.com/wllenyj/dragonball-sandbox/runs/5212083346 for details.
- addedA-code-coverageArea: Source-based code coverage (-Cinstrument-coverage)Area: Source-based code coverage (-Cinstrument-coverage)
on Nov 9, 2024
I am using
-Zprofileto use gcov. However, the results are corrupted.Here are my info.
Reproduce the issue:
It works when using older version:
I don't know if this issue related with kennytm/cov#18
Also: ping #42524