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

Test failure: baseservices\\threading\\interlocked\\add\\InterlockedAddInt_2\\InterlockedAddInt_2.cmd #44139

Closed
v-haren opened this issue Nov 2, 2020 · 9 comments
Assignees
Milestone

Comments

@v-haren
Copy link

v-haren commented Nov 2, 2020

failed in job: runtime-coreclr ilasm 20201031.1

CoreCLR Windows_NT arm64 Checked ilasmroundtrip @ Windows.10.Arm64v8.Open

Error message

Return code:      1
Raw output file:      D:\h\w\B2680950\w\B0410974\e\baseservices\threading\Reports\baseservices.threading\interlocked\add\InterlockedAddInt_2\InterlockedAddInt_2.output.txt
Raw output:
BEGIN EXECUTION
 cmd /c ..\InterlockedAddInt\InterlockedAddInt.cmd
BEGIN EXECUTION
D:\h\w\B2680950\p\ildasm.exe /raweh /out=InterlockedAddInt.dasm.il InterlockedAddInt.dll
D:\h\w\B2680950\p\ilasm.exe /output=InterlockedAddInt.asm.dll  InterlockedAddInt.dasm.il

Microsoft (R) .NET IL Assembler.  Version 6.0.0-ci
Copyright (c) Microsoft Corporation.  All rights reserved.
Assembling 'InterlockedAddInt.dasm.il'  to EXE --> 'InterlockedAddInt.asm.dll'
Could not open InterlockedAddInt.dasm.il

***** FAILURE ***** 
EXECUTION OF ILASM - FAILED 1
Expected: 0
Actual: 1
END EXECUTION - FAILED
FAILED
Test Harness Exitcode is : 1
To run the test:
> set CORE_ROOT=D:\h\w\B2680950\p
> D:\h\w\B2680950\w\B0410974\e\baseservices\threading\interlocked\add\InterlockedAddInt_2\InterlockedAddInt_2.cmd
Expected: True
Actual:   False


Stack trace
   at baseservices_threading._interlocked_add_InterlockedAddInt_2_InterlockedAddInt_2_._interlocked_add_InterlockedAddInt_2_InterlockedAddInt_2_cmd() in F:\workspace\_work\1\s\artifacts\tests\coreclr\Windows_NT.arm64.Checked\TestWrappers\baseservices.threading\baseservices.threading.XUnitWrapper.cs:line 18985
@v-haren v-haren added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Nov 2, 2020
@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added the untriaged New issue has not been triaged by the area owner label Nov 2, 2020
@BruceForstall BruceForstall added area-ILTools-coreclr and removed area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI labels Nov 2, 2020
@JulieLeeMSFT
Copy link
Member

CC @briansull

@JulieLeeMSFT JulieLeeMSFT added needs-further-triage Issue has been initially triaged, but needs deeper consideration or reconsideration and removed untriaged New issue has not been triaged by the area owner labels Dec 9, 2020
@briansull
Copy link
Contributor

We have a lot of similar issues:

@BruceForstall

Most likely some kind of infrastructure issue due to file locking.

@BruceForstall
Copy link
Member

Seems like we should add some more checking/retry logic. E.g., make sure the .dasm.il file exists before assembling, then retrying once or twice (after waiting) if it fails with a "Could not open" error. Maybe ildasm crashed and it actually doesn't exist?

@briansull
Copy link
Contributor

briansull commented Jan 4, 2021

@BruceForstall Do you or anyone else understand how this IlAsm/IlDasm roundtrip testing is supposed to work?
OK, I believe that you have to do this prior to running the test:

set RunningIlasmRoundTrip=1

Then this part of the script will be run:

REM IlasmRoundTrip Script
REM Disable Ilasm round-tripping for Linker tests.
REM Todo: Ilasm round-trip on linked binaries.
IF NOT DEFINED DoLink (
  IF DEFINED RunningIlasmRoundTrip (
    ECHO %CORE_ROOT%\ildasm.exe /raweh /out=ThreadStartGenerics.dasm.il ThreadStartGenerics.dll
    %CORE_ROOT%\ildasm.exe /raweh /out=ThreadStartGenerics.dasm.il ThreadStartGenerics.dll
    IF NOT "!ERRORLEVEL!"=="0" (
      ECHO EXECUTION OF ILDASM - FAILED !ERRORLEVEL!
      Exit /b 1
    )
    ECHO %CORE_ROOT%\ilasm.exe /output=ThreadStartGenerics.asm.dll  ThreadStartGenerics.dasm.il
    %CORE_ROOT%\ilasm.exe /output=ThreadStartGenerics.asm.dll  ThreadStartGenerics.dasm.il
    IF NOT "!ERRORLEVEL!"=="0" (
      ECHO EXECUTION OF ILASM - FAILED !ERRORLEVEL!
      Exit /b 1
    )
  )
)

@BruceForstall
Copy link
Member

fyi, that logic comes from https://github.com/dotnet/runtime/blob/6553a49e1b501cd3c40ef64999475fecad1c9f19/src/tests/Common/CLRTest.Execute.Batch.targets

I was thinking we add something like:

REM IlasmRoundTrip Script
REM Disable Ilasm round-tripping for Linker tests.
REM Todo: Ilasm round-trip on linked binaries.
IF NOT DEFINED DoLink (
  IF DEFINED RunningIlasmRoundTrip (
    ECHO %CORE_ROOT%\ildasm.exe /raweh /out=ThreadStartGenerics.dasm.il ThreadStartGenerics.dll
    %CORE_ROOT%\ildasm.exe /raweh /out=ThreadStartGenerics.dasm.il ThreadStartGenerics.dll
    IF NOT "!ERRORLEVEL!"=="0" (
      ECHO EXECUTION OF ILDASM - FAILED !ERRORLEVEL!
      Exit /b 1
    )
>>>> new
    IF NOT exist ThreadStartGenerics.dasm.il (
      ECHO EXECUTION OF ILDASM - FAILED ThreadStartGenerics.dasm.il is missing
      Exit /b 1
    )

   set ilasm_count=0
:start_ilasm
<<<<
    ECHO %CORE_ROOT%\ilasm.exe /output=ThreadStartGenerics.asm.dll  ThreadStartGenerics.dasm.il
    %CORE_ROOT%\ilasm.exe /output=ThreadStartGenerics.asm.dll  ThreadStartGenerics.dasm.il
    IF NOT "!ERRORLEVEL!"=="0" (
      ECHO EXECUTION OF ILASM - FAILED !ERRORLEVEL!
>>>> new
      if !ilasm_count! LEQ 3 (
        ECHO Trying again
       set /A ilasm_count=ilasm_count +1
       goto start_ilasm
      )
<<<<
      Exit /b 1
    )
  )
)

of course, it has to be implemented for both Linux/bash and Windows/cmd.

@briansull
Copy link
Contributor

briansull commented Jan 4, 2021

The issue could also be IlDasm failing for out of space or some other reason?
But with the above change we would learn that that was the reason.

@briansull
Copy link
Contributor

briansull commented Jan 4, 2021

it has to be implemented for both Linux/bash and Windows/cmd.

All of the reported failure are on Windows, I'm not sure if we are running IlDasm/IlAsm roundtrip testing on Linux.

@briansull
Copy link
Contributor

briansull commented Jan 4, 2021

I built the Priority=1 tests locally and ran this test 100 times on my system
But it didn't repro for me on my system.

@briansull
Copy link
Contributor

Fixed with #46765

@JulieLeeMSFT JulieLeeMSFT removed the needs-further-triage Issue has been initially triaged, but needs deeper consideration or reconsideration label Jan 12, 2021
@JulieLeeMSFT JulieLeeMSFT added this to the 6.0.0 milestone Jan 12, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Feb 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Archived in project
Development

No branches or pull requests

5 participants