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

hits llvm assertion "Cannot start a running timer" when timing passes #53136

Open
matthiaskrgr opened this issue Aug 6, 2018 · 0 comments
Open
Labels
A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@matthiaskrgr
Copy link
Member

build config:

--- config.toml.example 2018-08-06 21:33:10.482203459 +0200
+++ config.toml 2018-08-06 21:33:07.098838544 +0200
@@ -25,7 +25,7 @@
 #release-debuginfo = false
 # Indicates whether the LLVM assertions are enabled or not
-#assertions = false
+assertions = true
 # Indicates whether ccache is used when building LLVM
 #ccache = false
@@ -253,7 +253,7 @@
 # Whether or not debug assertions are enabled for the compiler and standard
 # library. Also enables compilation of debug! and trace! logging macros.
-#debug-assertions = false
+debug-assertions = true
 # Whether or not debuginfo is emitted
 #debuginfo = false

I built llvm with assertions enabled and debug assertions.
When building projects with RUSTFLAGS="-Ztime-passes -Ztime-llvm-passes" I often hit an assertion:

rustc: /home/matthias/RUST/rust_build/src/llvm/lib/Support/Timer.cpp:135: void llvm::Timer::startTimer(): Assertion `!Running && "Cannot start a running timer"' failed.
    time: 0.125; rss: 142MB LTO passes
error: Could not compile `num-traits`.
warning: build failed, waiting for other jobs to finish...
    time: 0.039; rss: 142MB codegen passes [build_script_build1-efc1c31eeff815f1eaec24de83c99086.rs]
    time: 0.322; rss: 147MB LTO passes
    time: 0.102; rss: 148MB LTO passes
rustc: /home/matthias/RUST/rust_build/src/llvm/lib/Support/Timer.cpp:135: void llvm::Timer::startTimer(): Assertion `!Running && "Cannot start a running timer"' failed.
error: Could not compile `version_check`.
warning: build failed, waiting for other jobs to finish...
    time: 0.103; rss: 143MB LTO passes
    time: 0.032; rss: 143MB LTO passes
rustc: /home/matthias/RUST/rust_build/src/llvm/lib/Support/Timer.cpp:135: void llvm::Timer::startTimer(): Assertion `!Running && "Cannot start a running timer"' failed.
error: Could not compile `num-integer`.

https://github.com/rust-lang/llvm/blob/rust-llvm-release-7-0-0-v2/lib/Support/Timer.cpp#L135

It looks like the assertion is triggered by one of the -Ztime-passes -Ztime-llvm-passes flags

@memoryruins memoryruins added the A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. label Sep 15, 2018
@Noratrieb Noratrieb added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Apr 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants