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

Log often shows lots of irrelevant build messages #80

Open
RalfJung opened this issue Mar 14, 2024 · 2 comments · Fixed by rust-lang/rust#122496
Open

Log often shows lots of irrelevant build messages #80

RalfJung opened this issue Mar 14, 2024 · 2 comments · Fixed by rust-lang/rust#122496

Comments

@RalfJung
Copy link
Member

RalfJung commented Mar 14, 2024

Consider e.g. this: the actually relevant error is

2024-03-14T08:02:45.9904842Z failures:
2024-03-14T08:02:45.9905007Z 
2024-03-14T08:02:45.9906975Z ---- [ui] tests/ui/generics/post_monomorphization_error_backtrace.rs stdout ----
2024-03-14T08:02:45.9907581Z diff of stderr:
2024-03-14T08:02:45.9907742Z 
2024-03-14T08:02:45.9907827Z 6	   |
2024-03-14T08:02:45.9908550Z 7	   = note: this error originates in the macro `assert` (in Nightly builds, run with -Z macro-backtrace for more info)
2024-03-14T08:02:45.9909539Z 8	
2024-03-14T08:02:45.9909782Z +	note: erroneous constant encountered
2024-03-14T08:02:45.9910305Z +	  --> $DIR/post_monomorphization_error_backtrace.rs:14:5
2024-03-14T08:02:45.9910713Z +	   |
2024-03-14T08:02:45.9914947Z +	LL |     F::<T>::V;
2024-03-14T08:02:45.9915253Z +	   |     ^^^^^^^^^
2024-03-14T08:02:45.9915626Z +	
2024-03-14T08:02:45.9916110Z 9	note: the above error was encountered while instantiating `fn assert_zst::<u32>`
2024-03-14T08:02:45.9916904Z 10	  --> $DIR/post_monomorphization_error_backtrace.rs:18:5
2024-03-14T08:02:45.9917516Z 11	   |
2024-03-14T08:02:45.9917652Z 
2024-03-14T08:02:45.9918749Z 19	   |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the evaluated program panicked at 'assertion failed: std::mem::size_of::<T>() == 0', $DIR/post_monomorphization_error_backtrace.rs:6:23
2024-03-14T08:02:45.9919579Z 20	   |
2024-03-14T08:02:45.9920369Z 21	   = note: this error originates in the macro `assert` (in Nightly builds, run with -Z macro-backtrace for more info)
2024-03-14T08:02:45.9921439Z +	
2024-03-14T08:02:45.9921823Z +	note: erroneous constant encountered
2024-03-14T08:02:45.9922627Z +	  --> $DIR/post_monomorphization_error_backtrace.rs:14:5
2024-03-14T08:02:45.9923287Z +	   |
2024-03-14T08:02:45.9923514Z +	LL |     F::<T>::V;
2024-03-14T08:02:45.9923773Z +	   |     ^^^^^^^^^
2024-03-14T08:02:45.9924014Z +	   |
2024-03-14T08:02:45.9924491Z +	   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
2024-03-14T08:02:45.9925018Z 22	
2024-03-14T08:02:45.9925545Z 23	note: the above error was encountered while instantiating `fn assert_zst::<i32>`
2024-03-14T08:02:45.9926259Z 24	  --> $DIR/post_monomorphization_error_backtrace.rs:18:5
2024-03-14T08:02:45.9926595Z 
2024-03-14T08:02:45.9926625Z 
2024-03-14T08:02:45.9926804Z The actual stderr differed from the expected stderr.
2024-03-14T08:02:45.9928017Z Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/generics/post_monomorphization_error_backtrace/post_monomorphization_error_backtrace.stderr
2024-03-14T08:02:45.9929234Z To update references, rerun the tests and pass the `--bless` flag
2024-03-14T08:02:45.9930149Z To only update this specific test, also pass `--test-args generics/post_monomorphization_error_backtrace.rs`
2024-03-14T08:02:45.9930729Z 
2024-03-14T08:02:45.9937039Z error: 1 errors occurred comparing output.
2024-03-14T08:02:45.9937479Z status: exit status: 1
2024-03-14T08:02:45.9942691Z command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/generics/post_monomorphization_error_backtrace.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/generics/post_monomorphization_error_backtrace" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/generics/post_monomorphization_error_backtrace/auxiliary"
2024-03-14T08:02:45.9947953Z stdout: none
2024-03-14T08:02:45.9948292Z --- stderr -------------------------------
2024-03-14T08:02:45.9948785Z error[E0080]: evaluation of `assert_zst::F::<u32>::V` failed
2024-03-14T08:02:45.9963235Z ##[error]  --> /checkout/tests/ui/generics/post_monomorphization_error_backtrace.rs:6:23
2024-03-14T08:02:45.9970135Z    |
2024-03-14T08:02:45.9970513Z LL |         const V: () = assert!(std::mem::size_of::<T>() == 0);
2024-03-14T08:02:45.9971762Z    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the evaluated program panicked at 'assertion failed: std::mem::size_of::<T>() == 0', /checkout/tests/ui/generics/post_monomorphization_error_backtrace.rs:6:23
2024-03-14T08:02:45.9972581Z    |
2024-03-14T08:02:45.9973227Z    = note: this error originates in the macro `assert` (in Nightly builds, run with -Z macro-backtrace for more info)
2024-03-14T08:02:45.9973817Z 
2024-03-14T08:02:45.9973938Z note: erroneous constant encountered
2024-03-14T08:02:45.9974545Z   --> /checkout/tests/ui/generics/post_monomorphization_error_backtrace.rs:14:5
2024-03-14T08:02:45.9975060Z    |
2024-03-14T08:02:45.9975268Z LL |     F::<T>::V;
2024-03-14T08:02:45.9975509Z    |     ^^^^^^^^^
2024-03-14T08:02:45.9975658Z 
2024-03-14T08:02:45.9975943Z note: the above error was encountered while instantiating `fn assert_zst::<u32>`
2024-03-14T08:02:45.9976862Z   --> /checkout/tests/ui/generics/post_monomorphization_error_backtrace.rs:18:5
2024-03-14T08:02:45.9977415Z    |
2024-03-14T08:02:45.9977624Z LL |     assert_zst::<U>()
2024-03-14T08:02:45.9977884Z    |     ^^^^^^^^^^^^^^^^^
2024-03-14T08:02:45.9978056Z 
2024-03-14T08:02:45.9978295Z error[E0080]: evaluation of `assert_zst::F::<i32>::V` failed
2024-03-14T08:02:45.9979606Z ##[error]  --> /checkout/tests/ui/generics/post_monomorphization_error_backtrace.rs:6:23
2024-03-14T08:02:45.9980659Z    |
2024-03-14T08:02:45.9980974Z LL |         const V: () = assert!(std::mem::size_of::<T>() == 0);
2024-03-14T08:02:45.9982286Z    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the evaluated program panicked at 'assertion failed: std::mem::size_of::<T>() == 0', /checkout/tests/ui/generics/post_monomorphization_error_backtrace.rs:6:23
2024-03-14T08:02:45.9983180Z    |
2024-03-14T08:02:45.9983843Z    = note: this error originates in the macro `assert` (in Nightly builds, run with -Z macro-backtrace for more info)
2024-03-14T08:02:45.9984429Z 
2024-03-14T08:02:45.9984550Z note: erroneous constant encountered
2024-03-14T08:02:45.9985164Z   --> /checkout/tests/ui/generics/post_monomorphization_error_backtrace.rs:14:5
2024-03-14T08:02:45.9985677Z    |
2024-03-14T08:02:45.9985886Z LL |     F::<T>::V;
2024-03-14T08:02:45.9986124Z    |     ^^^^^^^^^
2024-03-14T08:02:45.9986348Z    |
2024-03-14T08:02:45.9986800Z    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
2024-03-14T08:02:45.9987219Z 
2024-03-14T08:02:45.9987520Z note: the above error was encountered while instantiating `fn assert_zst::<i32>`
2024-03-14T08:02:45.9988316Z   --> /checkout/tests/ui/generics/post_monomorphization_error_backtrace.rs:18:5
2024-03-14T08:02:45.9988913Z    |
2024-03-14T08:02:45.9989132Z LL |     assert_zst::<U>()
2024-03-14T08:02:45.9989414Z    |     ^^^^^^^^^^^^^^^^^
2024-03-14T08:02:45.9989588Z 
2024-03-14T08:02:45.9989752Z error: aborting due to 2 previous errors
2024-03-14T08:02:45.9990019Z 
2024-03-14T08:02:45.9990324Z For more information about this error, try `rustc --explain E0080`.
2024-03-14T08:02:45.9990828Z ------------------------------------------
2024-03-14T08:02:45.9991065Z 
2024-03-14T08:02:45.9991071Z 
2024-03-14T08:02:45.9991076Z 
2024-03-14T08:02:45.9991163Z failures:
2024-03-14T08:02:45.9991514Z     [ui] tests/ui/generics/post_monomorphization_error_backtrace.rs

However, the bot shows huge amounts of irrelevant noise above that, and it cuts off the interesting part at the end that lists the failed testcases.

I don't know whether the right answer is to make CI logging less verbose or the log analysis better. I think all that noise in the CI logs is from the GCC backend tests? At least it seems to be about building GCC. I have no idea why those tests are so extremely noisy when compared with everything else we have on CI. Looing at the raw logs, it seems like the GCC build is responsible for >80% of all log output! (That's from the first mention of "gcc-src" until the last.) Having all that noise in the log makes it harder to find the real problems.

cc @antoyo, @GuillaumeGomez

@GuillaumeGomez
Copy link
Member

It actually comes from building GCC itself. It's a make command, so let's hope there is a way to tell it to stop being so verbose...

rust-timer added a commit to rust-lang-ci/rust that referenced this issue Mar 15, 2024
Rollup merge of rust-lang#122496 - GuillaumeGomez:reduce-gcc-build-logs, r=Mark-Simulacrum

Greatly reduce GCC build logs

Fixes rust-lang/rust-log-analyzer#80.

Based on [makefile documentation](https://www.gnu.org/software/make/manual/html_node/Options-Summary.html#index-_002d_002dquiet-1) and [configure documentation](https://www.gnu.org/software/autoconf/manual/autoconf-2.68/html_node/configure-Invocation.html).

cc `@RalfJung` `@antoyo`
@shepmaster
Copy link
Member

shepmaster closed this as completed in shepmaster/rust@5325c2b 2 weeks ago

Uhh, no...

@shepmaster shepmaster reopened this Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants