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: JIT/Methodical/NaN/intrinsic_cs_ro/intrinsic_cs_ro.dll #88451

Closed
BruceForstall opened this issue Jul 5, 2023 · 4 comments · Fixed by #90227
Closed

Test failure: JIT/Methodical/NaN/intrinsic_cs_ro/intrinsic_cs_ro.dll #88451

BruceForstall opened this issue Jul 5, 2023 · 4 comments · Fixed by #90227
Assignees
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI JitStress CLR JIT issues involving JIT internal stress modes Priority:2 Work that is important, but not critical for the release
Milestone

Comments

@BruceForstall
Copy link
Member

runtime-coreclr jitstress-random

win-arm64:

set DOTNET_TieredCompilation=0
set DOTNET_JitStress=312

linux-x64:

export DOTNET_TieredCompilation=0
export DOTNET_JitStress=ab

https://dev.azure.com/dnceng-public/public/_build/results?buildId=329904&view=ms.vss-test-web.build-test-results-tab

20:59:12.414 Running test: JIT/Methodical/NaN/intrinsic_cs_ro/intrinsic_cs_ro.dll
...
Tanh(NaN) == NaN  OK
System.Exception: Tanh(NaN) failed: expected -∞, got -1
   at Test_intrinsic.JitTest.Test.Fail(String func, Double arg, Double exp, Double res)
   at Test_intrinsic.JitTest.Test.TestEntryPoint()
=== FAILED ===
20:59:12.938 Failed test: JIT/Methodical/NaN/intrinsic_cs_ro/intrinsic_cs_ro.dll

@dotnet/jit-contrib

@BruceForstall BruceForstall added JitStress CLR JIT issues involving JIT internal stress modes area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI labels Jul 5, 2023
@BruceForstall BruceForstall added this to the 8.0.0 milestone Jul 5, 2023
@ghost
Copy link

ghost commented Jul 5, 2023

Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.

Issue Details

runtime-coreclr jitstress-random

win-arm64:

set DOTNET_TieredCompilation=0
set DOTNET_JitStress=312

linux-x64:

export DOTNET_TieredCompilation=0
export DOTNET_JitStress=ab

https://dev.azure.com/dnceng-public/public/_build/results?buildId=329904&view=ms.vss-test-web.build-test-results-tab

20:59:12.414 Running test: JIT/Methodical/NaN/intrinsic_cs_ro/intrinsic_cs_ro.dll
...
Tanh(NaN) == NaN  OK
System.Exception: Tanh(NaN) failed: expected -∞, got -1
   at Test_intrinsic.JitTest.Test.Fail(String func, Double arg, Double exp, Double res)
   at Test_intrinsic.JitTest.Test.TestEntryPoint()
=== FAILED ===
20:59:12.938 Failed test: JIT/Methodical/NaN/intrinsic_cs_ro/intrinsic_cs_ro.dll

@dotnet/jit-contrib

Author: BruceForstall
Assignees: -
Labels:

JitStress, area-CodeGen-coreclr

Milestone: 8.0.0

@v-wenyuxu
Copy link

v-wenyuxu commented Jul 24, 2023

Failed again in: runtime-coreclr jitstress-random 20230723.1

Failed tests:

coreclr osx x64 Checked jitstress_random_2 @ OSX.1200.Amd64.Open
    - JIT/Methodical/NaN/intrinsic_cs_ro/intrinsic_cs_ro.dll
coreclr windows arm64 Checked jitstress_random_2 @ Windows.11.Arm64.Open
    - JIT/Methodical/NaN/intrinsic_cs_do/intrinsic_cs_do.dll

Error message:

Assert.Equal() Failure
Expected: 100
Actual:   101

Stack trace:

   at Xunit.Assert.Equal[T](T expected, T actual, IEqualityComparer`1 comparer) in /_/src/xunit.assert/Asserts/EqualityAsserts.cs:line 96
   at Program.<<Main>$>g__TestExecutor85|0_86(StreamWriter tempLogSw, StreamWriter statsCsvSw, <>c__DisplayClass0_0&)

@JulieLeeMSFT JulieLeeMSFT added the Priority:2 Work that is important, but not critical for the release label Jul 31, 2023
@v-wenyuxu
Copy link

Failed again in: runtime-coreclr jitstress-random 20230806.1

Failed tests:

coreclr osx arm64 Checked jitstress_random_2 @ OSX.1200.ARM64.Open
    - JIT/Methodical/NaN/intrinsic_cs_do/intrinsic_cs_do.dll

Error message:

Assert.Equal() Failure
Expected: 100
Actual:   101

Stack trace:

   at Xunit.Assert.Equal[T](T expected, T actual, IEqualityComparer`1 comparer) in /_/src/xunit.assert/Asserts/EqualityAsserts.cs:line 96
   at Program.<<Main>$>g__TestExecutor84|0_85(StreamWriter tempLogSw, StreamWriter statsCsvSw, <>c__DisplayClass0_0&)

@jakobbotsch
Copy link
Member

This looks like a bug in constant folding:

public static void Main()
{
    Console.WriteLine(Math.Tanh(double.NegativeInfinity));
    Console.WriteLine(Math.Tanh(NegativeInfinity()));
}

[MethodImpl(MethodImplOptions.NoInlining)]
private static double NegativeInfinity() => double.NegativeInfinity;

Result:

NaN
-1

JitStress causes us to inline the second TestTanh call which exposes the issue. Also, many of the Fail calls in this file are passing the wrong arguments to the wrong parameters, which gives very confusing output.

jakobbotsch added a commit to jakobbotsch/runtime that referenced this issue Aug 9, 2023
@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Aug 9, 2023
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Aug 9, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Sep 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI JitStress CLR JIT issues involving JIT internal stress modes Priority:2 Work that is important, but not critical for the release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants