Skip to content

windows: x.py test failure from codegen test suite  #96464

Description

@pnkfelix

I tried this code (on Windows, in powershell)

PS D:\pnkfelix\RustLang\rust.git\objdir> python ..\x.py test > capture-test-failure.txt

I got this output:

[...]
failures:

---- [codegen] src/test\codegen\vec-shrink-panik.rs stdout ----

error: verification with 'FileCheck' failed
status: exit code: 1
command: PATH=";D:\pnkfelix\RustLang\rust.git\objdir\build\x86_64-pc-windows-msvc\stage0-bootstrap-tools\x86_64-pc-windows-msvc\release\deps;D:\pnkfelix\RustLang\rust.git\objdir\build\x86_64-pc-windows-msvc\stage0\bin;C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\\Extensions\Microsoft\IntelliCode\CLI;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.31.31103\bin\HostX64\x64;C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\VC\VCPackages;C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\TestWindow;C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer;C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\bin\Roslyn;C:\Program Files\Microsoft Visual Studio\2022\Community\Team Tools\Performance Tools\x64;C:\Program Files\Microsoft Visual Studio\2022\Community\Team Tools\Performance Tools;C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools\x64\;C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\FSharp\Tools;C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\\x64;C:\Program Files (x86)\Windows Kits\10\bin\\x64;C:\Program Files\Microsoft Visual Studio\2022\Community\\MSBuild\Current\Bin\amd64;C:\Windows\Microsoft.NET\Framework64\v4.0.30319;C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\;C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\Tools\;C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\\Extensions\Microsoft\IntelliCode\CLI;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.31.31103\bin\HostX86\x86;C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\VC\VCPackages;C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\TestWindow;C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer;C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\bin\Roslyn;C:\Program Files\Microsoft Visual Studio\2022\Community\Team Tools\Performance Tools;C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools\;C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\FSharp\Tools;C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\\x86;C:\Program Files (x86)\Windows Kits\10\bin\\x86;C:\Program Files\Microsoft Visual Studio\2022\Community\\MSBuild\Current\Bin\amd64;C:\Windows\Microsoft.NET\Framework\v4.0.30319;C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\;C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\Tools\;C:\Program Files\Python310\Scripts\;C:\Program Files\Python310\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\Amazon\cfn-bootstrap\;C:\Program Files\Microsoft SQL Server\150\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files\dotnet\;C:\Program Files\Git\cmd;C:\Users\pnkfelix\AppData\Local\Microsoft\WindowsApps;;C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin;C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\Ninja;C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\VC\Linux\bin\ConnectionManagerExe;C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin;C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\Ninja;C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\VC\Linux\bin\ConnectionManagerExe" "D:\\pnkfelix\\RustLang\\rust.git\\objdir\\build\\x86_64-pc-windows-msvc\\llvm\\build\\bin\\FileCheck.exe" "--input-file" "D:\\pnkfelix\\RustLang\\rust.git\\objdir\\build\\x86_64-pc-windows-msvc\\test\\codegen\\vec-shrink-panik\\vec-shrink-panik.ll" "D:\\pnkfelix\\RustLang\\rust.git\\src/test\\codegen\\vec-shrink-panik.rs" "--allow-unused-prefixes" "--check-prefixes" "CHECK,MSVC"
stdout: none
--- stderr -------------------------------
D:\pnkfelix\RustLang\rust.git\src/test\codegen\vec-shrink-panik.rs:24:17: error: CHECK-NEXT: expected string not found in input
 // CHECK-NEXT: ; call core::panicking::panic_no_unwind
                ^
D:\pnkfelix\RustLang\rust.git\objdir\build\x86_64-pc-windows-msvc\test\codegen\vec-shrink-panik\vec-shrink-panik.ll:195:10: note: scanning from here
 %cleanuppad.i = cleanuppad within none []
         ^
D:\pnkfelix\RustLang\rust.git\objdir\build\x86_64-pc-windows-msvc\test\codegen\vec-shrink-panik\vec-shrink-panik.ll:196:1: note: possible intended match here
; call core::ptr::drop_in_place<alloc::vec::Vec<u32>>
^
D:\pnkfelix\RustLang\rust.git\src/test\codegen\vec-shrink-panik.rs:39:17: error: CHECK-NEXT: expected string not found in input
 // CHECK-NEXT: ; call core::panicking::panic_no_unwind
                ^
D:\pnkfelix\RustLang\rust.git\objdir\build\x86_64-pc-windows-msvc\test\codegen\vec-shrink-panik\vec-shrink-panik.ll:318:10: note: scanning from here
 %cleanuppad.i.i.i = cleanuppad within none []
         ^
D:\pnkfelix\RustLang\rust.git\objdir\build\x86_64-pc-windows-msvc\test\codegen\vec-shrink-panik\vec-shrink-panik.ll:319:1: note: possible intended match here
; call core::ptr::drop_in_place<alloc::vec::Vec<&str>>
^

Input file: D:\pnkfelix\RustLang\rust.git\objdir\build\x86_64-pc-windows-msvc\test\codegen\vec-shrink-panik\vec-shrink-panik.ll
Check file: D:\pnkfelix\RustLang\rust.git\src/test\codegen\vec-shrink-panik.rs

-dump-input=help explains the following input dump.

Input was:
<<<<<<
           .
           .
           .
         190:  
         191: .noexc.i: ; preds = %bb6.i2.i.i.i 
         192:  unreachable 
         193:  
         194: funclet_bb13.i: ; preds = %bb6.i2.i.i.i 
         195:  %cleanuppad.i = cleanuppad within none [] 
next:24'0              X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
         196: ; call core::ptr::drop_in_place<alloc::vec::Vec<u32>> 
next:24'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
next:24'1     ?                                                      possible intended match
         197:  call fastcc void @"_ZN4core3ptr47drop_in_place$LT$alloc..vec..Vec$LT$u32$GT$$GT$17h185632e1510f6779E"(%"alloc::vec::Vec<u32>"* nonnull %_2) #12 [ "funclet"(token %cleanuppad.i) ] 
next:24'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         198:  cleanupret from %cleanuppad.i unwind to caller 
next:24'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         199:  
next:24'0     ~
         200: "_ZN5alloc3vec16Vec$LT$T$C$A$GT$16into_boxed_slice17h006bd4b550d6b630E.exit": ; preds = %start.bb8_crit_edge.i, %bb13.i.i.i.i 
next:24'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         201:  %_5.sroa.0.0.copyload12.i = phi [0 x i32]* [ %_5.sroa.0.0.copyload12.pre.i, %start.bb8_crit_edge.i ], [ %16, %bb13.i.i.i.i ] 
next:24'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           .
           .
           .
         313:  
         314: .noexc.i.i.i: ; preds = %bb6.i2.i.i.i.i.i 
         315:  unreachable 
         316:  
         317: funclet_bb13.i.i.i: ; preds = %bb6.i2.i.i.i.i.i 
         318:  %cleanuppad.i.i.i = cleanuppad within none [] 
next:39'0              X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
         319: ; call core::ptr::drop_in_place<alloc::vec::Vec<&str>> 
next:39'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
next:39'1     ?                                                       possible intended match
         320:  call fastcc void @"_ZN4core3ptr51drop_in_place$LT$alloc..vec..Vec$LT$$RF$str$GT$$GT$17h112bc9fce5ca56c3E"(%"alloc::vec::Vec<&str>"* nonnull %_2.i.i) #12 [ "funclet"(token %cleanuppad.i.i.i) ] 
next:39'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         321:  cleanupret from %cleanuppad.i.i.i unwind to caller 
next:39'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         322:  
next:39'0     ~
         323: _ZN4core4iter6traits8iterator8Iterator7collect17h7546795dad841ea0E.exit: ; preds = %_ZN4core4iter6traits8iterator8Iterator7collect17h38b30846c8fa863fE.exit.i.i, %bb13.i.i.i.i.i.i 
next:39'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         324:  %_5.sroa.0.0.copyload1213.i.i.i = phi [0 x { [0 x i8]*, i64 }]* [ %27, %bb13.i.i.i.i.i.i ], [ %10, %_ZN4core4iter6traits8iterator8Iterator7collect17h38b30846c8fa863fE.exit.i.i ] 
next:39'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           .
           .
           .
>>>>>>
------------------------------------------



failures:
    [codegen] src/test\codegen\vec-shrink-panik.rs

Here's a gist with more complete output: https://gist.github.com/pnkfelix/343528a3da2000880b370a22b6010b99

This all might be an artifact of weirdnesses in how I work, like putting the build products into their own subdirectory, objdir, of the rust.git source repo. Not sure yet.

Activity

  1. added
    C-bugCategory: This is a bug.
    O-windowsOperating system: Windows
    O-windows-msvcToolchain: MSVC, Operating system: Windows
    A-codegenArea: Code generation
    A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.
    A-testsuiteArea: The testsuite used to check the correctness of rustc
    on Apr 27, 2022
  2. luqmana commented on May 31, 2022

    @luqmana
    Contributor

    I think this might be a mis-merge in #94402 which was reverting #92419. The failing test wasn't modified in the original but it was in the revert. (cc @erikdesjardins) EDIT: Not a mis-merge but apparently just a flaky test depending on how much inlining happens.

    Also reproduces on Linux too so not Windows specific.

    As for why it didn't fail in CI but does locally: the test is marked with:

    // ignore-debug: the debug assertions get in the way
    

    and far as I can tell most targets are built with debug assertions in CI and hence will ignore the test altogether. e.g. here:

    test [codegen] src/test\codegen\vec-shrink-panik.rs ... ignored

    Looks like both the "compiler" and "codegen" config.toml profiles by default don't enable debug-assertions which may be why you ran into it.

    @rustbot label: -O-windows -O-windows-msvc

  3. removed
    O-windowsOperating system: Windows
    O-windows-msvcToolchain: MSVC, Operating system: Windows
    on May 31, 2022
  4. erikdesjardins commented on May 31, 2022

    @erikdesjardins
    Contributor

    Those changes were deliberate, since reverting #92419 introduced additional panics which made the test fail locally.

    Before #92419, I believe the test passed by accident--the string panic did not occur in the function because it didn't panic itself, it just called a function that could panic (making the test vacuous).

    It looks like the test has now returned to that original state. Less inlining is occuring, and again panic_no_unwind doesn't occur in the function, so the check lines that were necessary to avoid the initial failure are now causing failures.

  5. luqmana commented on May 31, 2022

    @luqmana
    Contributor

    Those changes were deliberate, since reverting #92419 introduced additional panics which made the test fail locally.

    Ah ok, thanks for clarifying!

  6. added
    T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
    on Apr 5, 2023
  7. danakj commented on May 9, 2023

    @danakj
    Contributor

    This test has started failing on Linux and Mac with TOT LLVM (again?)

    Linux

    https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket/8781582054982754321/+/u/package_rust/stdout#L19104_3

    --- stderr -------------------------------
      /b/s/w/ir/cache/builder/src/third_party/rust_src/src/tests/codegen/vec-shrink-panik.rs:28:12: error: CHECK: expected string not found in input
       // CHECK: filter
                 ^
      /b/s/w/ir/cache/builder/src/third_party/rust_src/src/build/x86_64-unknown-linux-gnu/test/codegen/vec-shrink-panik.new/vec-shrink-panik.ll:95:32: note: scanning from here
      define { ptr, i64 } @issue71861(ptr noalias nocapture noundef dereferenceable(24) %vec) unnamed_addr #1 personality ptr @rust_eh_personality {
                                     ^
      /b/s/w/ir/cache/builder/src/third_party/rust_src/src/build/x86_64-unknown-linux-gnu/test/codegen/vec-shrink-panik.new/vec-shrink-panik.ll:95:47: note: possible intended match here
      define { ptr, i64 } @issue71861(ptr noalias nocapture noundef dereferenceable(24) %vec) unnamed_addr #1 personality ptr @rust_eh_personality {
                                                    ^
      /b/s/w/ir/cache/builder/src/third_party/rust_src/src/tests/codegen/vec-shrink-panik.rs:43:12: error: CHECK: expected string not found in input
       // CHECK: filter
                 ^
      /b/s/w/ir/cache/builder/src/third_party/rust_src/src/build/x86_64-unknown-linux-gnu/test/codegen/vec-shrink-panik.new/vec-shrink-panik.ll:158:32: note: scanning from here
      define { ptr, i64 } @issue75636(ptr noalias noundef nonnull readonly align 8 %iter.0, i64 noundef %iter.1) unnamed_addr #1 personality ptr @rust_eh_personality {
                                     ^
      /b/s/w/ir/cache/builder/src/third_party/rust_src/src/build/x86_64-unknown-linux-gnu/test/codegen/vec-shrink-panik.new/vec-shrink-panik.ll:158:78: note: possible intended match here
      define { ptr, i64 } @issue75636(ptr noalias noundef nonnull readonly align 8 %iter.0, i64 noundef %iter.1) unnamed_addr #1 personality ptr @rust_eh_personality {
                                                                                   ^
    

    Mac

    https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket/8781582054982754273/+/u/package_rust/stdout#L22619_3

    /opt/s/w/ir/cache/builder/src/third_party/rust_src/src/tests/codegen/vec-shrink-panik.rs:28:12: error: CHECK: expected string not found in input
       // CHECK: filter
                 ^
      /opt/s/w/ir/cache/builder/src/third_party/rust_src/src/build/x86_64-apple-darwin/test/codegen/vec-shrink-panik.new/vec-shrink-panik.ll:95:32: note: scanning from here
      define { ptr, i64 } @issue71861(ptr noalias nocapture noundef dereferenceable(24) %vec) unnamed_addr #1 personality ptr @rust_eh_personality {
                                     ^
      /opt/s/w/ir/cache/builder/src/third_party/rust_src/src/build/x86_64-apple-darwin/test/codegen/vec-shrink-panik.new/vec-shrink-panik.ll:95:47: note: possible intended match here
      define { ptr, i64 } @issue71861(ptr noalias nocapture noundef dereferenceable(24) %vec) unnamed_addr #1 personality ptr @rust_eh_personality {
                                                    ^
      /opt/s/w/ir/cache/builder/src/third_party/rust_src/src/tests/codegen/vec-shrink-panik.rs:43:12: error: CHECK: expected string not found in input
       // CHECK: filter
                 ^
      /opt/s/w/ir/cache/builder/src/third_party/rust_src/src/build/x86_64-apple-darwin/test/codegen/vec-shrink-panik.new/vec-shrink-panik.ll:158:32: note: scanning from here
      define { ptr, i64 } @issue75636(ptr noalias noundef nonnull readonly align 8 %iter.0, i64 noundef %iter.1) unnamed_addr #1 personality ptr @rust_eh_personality {
                                     ^
      /opt/s/w/ir/cache/builder/src/third_party/rust_src/src/build/x86_64-apple-darwin/test/codegen/vec-shrink-panik.new/vec-shrink-panik.ll:158:78: note: possible intended match here
      define { ptr, i64 } @issue75636(ptr noalias noundef nonnull readonly align 8 %iter.0, i64 noundef %iter.1) unnamed_addr #1 personality ptr @rust_eh_personality {
    
  8. erikdesjardins commented on May 9, 2023

    @erikdesjardins
    Contributor

    @danakj #111385 is open to fix that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.A-codegenArea: Code generationA-testsuiteArea: The testsuite used to check the correctness of rustcC-bugCategory: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions