Skip to content

Test failure: TensorTests.TensorExtensionsSpanInSpanOut<Single> Exp10M1 returns +∞ instead of a finite value near float.MaxValue #135056

Description

@lewing

Build Information

Build: https://dev.azure.com/dnceng-public/public/_build/results?buildId=1619756
Build error leg or test failing: net11.0-linux-Debug-arm64-Mono_Minijit_Debug-(AzureLinux.3.0.ArmArch.Open)-System.Numerics.Tensors.Tests.TensorTests.TensorExtensionsSpanInSpanOut
Pull request: #134959

KBE authoring guidance (ci-failure-scan)
  • Error Details is for readers. Paste the full exception, stack trace, or build error excerpt so the failure is understandable without opening the raw log.
  • Build Analysis parses only the single JSON block under Error Message.
  • ErrorMessage is a case-sensitive ordinal String.Contains substring copied verbatim from the failing log.
  • Set BuildRetry to true only for a clear infrastructure retry case. ExcludeConsoleLog disables Helix console-log scanning.

Error Details

System.Numerics.Tensors.Tests.TensorTests.TensorExtensionsSpanInSpanOut<Single>(tensorPrimitivesOperation: PerformCalculationSpanInSpanOut`1 { Method = Single Exp10M1(Single), Target = null }, tensorOperation: PerformSpanInSpanOut`1 { Method = System.Numerics.Tensors.Tensor`1[System.Single] Exp10M1[Single](System.Numerics.Tensors.ReadOnlyTensorSpan`1[System.Single] ByRef), Target = null }, tolerance: 9.99999975E-06) [FAIL]
  Assert.All() Failure: 1 out of 12 items in the collection did not pass.
  [10]: Item:  [4, 4, 4, 4, 4]
        Error: Assert.Equal() Failure: Values differ
               Expected: 3.40280805E+38
               Actual:           +∞
  Stack Trace:
    /_/src/libraries/System.Numerics.Tensors/tests/TensorTests.cs(102,0): at System.Numerics.Tensors.Tests.TensorTests.TensorExtensionsSpanInSpanOut[Single](PerformCalculationSpanInSpanOut`1 tensorPrimitivesOperation, PerformSpanInSpanOut`1 tensorOperation, Nullable`1 tolerance)
       at System.Object.InvokeStub_TensorTests.TensorExtensionsSpanInSpanOut(Object, Span`1)
    /_/src/libraries/System.Private.CoreLib/src/System/Reflection/MethodBaseInvoker.cs(136,0): at System.Reflection.MethodBaseInvoker.InvokeWithFewArgs(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)

Analysis:

  • FillTensor<T> fills the inputs with Random.Shared.NextSingle() * 100 - 50. When an input lands just below log10(float.MaxValue) ≈ 38.53, scalar float.Exp10M1 returns a finite value close to float.MaxValue, but Tensor.Exp10M1 overflows to +∞. A tolerance doesn't help when one side is infinite.
  • Fix Tensor correctness and accelerate contiguous operations #134914, merged 2026-09-30, routes dense Tensor elementwise operations through TensorPrimitives and added the tolerance for this case. The failing build's merge commit includes that change, so Tensor.Exp10M1 probably now uses the vectorized TensorPrimitives path, which overflows slightly earlier than the scalar implementation.
  • The failure is rare because the input is random; Build Analysis reports a 0.02% failure rate.
  • It isn't related to [wasi] Make File.Copy metadata copy best effort #134959, which only changes WASI code in pal_io.c.

Error Message

{
  "ErrorMessage": [
    "Method = Single Exp10M1(Single), Target = null }, tensorOperation: PerformSpanInSpanOut`1",
    "Actual:           +∞"
  ],
  "ErrorPattern": "",
  "BuildRetry": false,
  "ExcludeConsoleLog": false
}
Agentic workflow metadata (ci-failure-scan)

Workflow artifact: ci-failure-scan
Artifact kind: kbe-verification
Verified match count: 1 hits in failure.log

Note

This issue was created with the help of GitHub Copilot.

Known issue validation

Build: 🔎 https://dev.azure.com/dnceng-public/public/_build/results?buildId=1619756
Error message validated: [Method = Single Exp10M1(Single), Target = null }, tensorOperation: PerformSpanInSpanOut1 Actual: +∞`]
Result validation: ✅ Known issue matched with the provided build.
Validation performed at: 10/1/2026 9:16:58 PM UTC

Report

Build Repository Test Pull Request
1646087 dotnet/runtime System.Numerics.Tensors.Tests.TensorTests.TensorExtensionsSpanInSpanOut #131431
1645722 dotnet/runtime System.Numerics.Tensors.Tests.TensorTests.TensorExtensionsSpanInSpanOut #136308
1645218 dotnet/runtime System.Numerics.Tensors.Tests.TensorTests.TensorExtensionsSpanInSpanOut #136206
1644706 dotnet/runtime System.Numerics.Tensors.Tests.TensorTests.TensorExtensionsSpanInSpanOut #136185
1643350 dotnet/runtime System.Numerics.Tensors.Tests.TensorTests.TensorExtensionsSpanInSpanOut #136185
1643318 dotnet/runtime System.Numerics.Tensors.Tests.TensorTests.TensorExtensionsSpanInSpanOut #136214
1642778 dotnet/runtime System.Numerics.Tensors.Tests.TensorTests.TensorExtensionsSpanInSpanOut #136001
1642009 dotnet/runtime System.Numerics.Tensors.Tests.TensorTests.TensorExtensionsSpanInSpanOut #136132
1639647 dotnet/runtime System.Numerics.Tensors.Tests.TensorTests.TensorExtensionsSpanInSpanOut #136013
1638095 dotnet/runtime System.Numerics.Tensors.Tests.TensorTests.TensorExtensionsSpanInSpanOut #135944
1637580 dotnet/runtime System.Numerics.Tensors.Tests.TensorTests.TensorExtensionsSpanInSpanOut #135906
1637268 dotnet/runtime System.Numerics.Tensors.Tests.TensorTests.TensorExtensionsSpanInSpanOut #135881
1637149 dotnet/runtime System.Numerics.Tensors.Tests.TensorTests.TensorExtensionsSpanInSpanOut #135276
1635775 dotnet/runtime System.Numerics.Tensors.Tests.TensorTests.TensorExtensionsSpanInSpanOut #132425
1632073 dotnet/runtime System.Numerics.Tensors.Tests.TensorTests.TensorExtensionsSpanInSpanOut
1627267 dotnet/runtime System.Numerics.Tensors.Tests.TensorTests.TensorExtensionsSpanInSpanOut #135375
1627217 dotnet/runtime System.Numerics.Tensors.Tests.TensorTests.TensorExtensionsSpanInSpanOut #135373
1626316 dotnet/runtime System.Numerics.Tensors.Tests.TensorTests.TensorExtensionsSpanInSpanOut #135278
1626097 dotnet/runtime System.Numerics.Tensors.Tests.TensorTests.TensorExtensionsSpanInSpanOut #135277
1622992 dotnet/runtime System.Numerics.Tensors.Tests.TensorTests.TensorExtensionsSpanInSpanOut #135167
1620583 dotnet/runtime System.Numerics.Tensors.Tests.TensorTests.TensorExtensionsSpanInSpanOut #134260
1619756 dotnet/runtime System.Numerics.Tensors.Tests.TensorTests.TensorExtensionsSpanInSpanOut #134959

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
3 10 22

Activity

  1. dotnet-policy-service commented on Oct 1, 2026

    @dotnet-policy-service
    Contributor

    Tagging subscribers to this area: @dotnet/area-system-numerics-tensors
    See info in area-owners.md if you want to be subscribed.

  2. VincentBu commented on Oct 10, 2026

    @VincentBu
    Contributor

    Failed in: runtime-coreclr libraries-jitstress 20261008.1

    Failed tests:

    net11.0-linux-Release-arm64-jitstress2-AzureLinux.3.Arm64.Open
    - System.Numerics.Tensors.Tests.TensorSpanTests.TensorExtensionsSpanInSpanOut<Single, Single>(tensorPrimitivesOperation: TensorPrimitivesSpanInSpanOut`2 { HasSingleTarget = True, Method = Single Exp10M1(Single), Target = null }, tensorOperation: TensorSpanInSpanOut`2 { HasSingleTarget = True, Method = System.Numerics.Tensors.TensorSpan`1[System.Single]& Exp10M1[Single](System.Numerics.Tensors.ReadOnlyTensorSpan`1[System.Single] ByRef, System.Numerics.Tensors.TensorSpan`1[System.Single] ByRef), Target = null }, tolerance: 9.99999975E-06)
    
    

    Error message:

    Assert.All() Failure: 1 out of 12 items in the collection did not pass.\n[11]: Item:  [1, 2, 3, 4, 5, ···]\n      Error: Assert.Equal() Failure: Values differ\n             Expected: 3.40280805E+38\n             Actual:           +∞
    

    Stack trace:

    at InvokeStub_TensorSpanTests.TensorExtensionsSpanInSpanOut(Object, Span`1)
       at System.Reflection.MethodBaseInvoker.InvokeWithFewArgs(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) in /_/src/libraries/System.Private.CoreLib/src/System/Reflection/MethodBaseInvoker.cs:line 136
    
  3. caraioniurie47 commented on Oct 11, 2026

    @caraioniurie47
    Contributor

    A related test, System.Numerics.Tensors.Tests.TensorSpanTests.TensorExtensionsSpanInSpanOut<Single, Single>, fails the same way on the Exp10 case, which this issue's ErrorMessage doesn't match, since it names Exp10M1 and PerformSpanInSpanOut`1. Build 1630706 (PR #135567, net11.0-windows-Debug-x64-coreclr_release-Windows.Amd64.Open.rt): Method = Single Exp10(Single), Expected: 3.40280805E+38, Actual: +∞.

    Closed as a duplicate, #135554 had "ErrorMessage": "Expected: 3.40280805E+38", validated against build 1630374. Could this issue's ErrorMessage be widened to that string, so both cases match?

    Note

    AI-generated, written at my direction and reviewed by me before posting. The failure text is from build 1630706's Build Analysis check output; the two ErrorMessage values are from the bodies of this issue and #135554.

  4. lilinus commented on Oct 14, 2026

    @lilinus
    Contributor

    In the assertions we use a tolerance to assert that expected-tolerance<=actual<=expected+tolerance (given actual and expected is finite).

    If it is deemed to be ok that the threshold of inputs that gives infite results depend on what path the impl takes (scalar / vectorized), we could fix it by also allowing actual to be positive infinity if expected+tolerance overflows to positive infinity etc...

    Another option would be to fallback to scalar path for inputs above a certain limit (e.g.

    if (Vector128.GreaterThanAny(xpi.AsUInt32() & Vector128.Create(SinOperatorSingle.SignMask), Vector128.Create(SinOperatorSingle.MaxVectorizedValue)))
    {
    return ApplyScalar<SinPiOperator<float>>(x.AsSingle()).As<float, T>();
    }
    )

  5. VincentBu commented on Oct 15, 2026

    @VincentBu
    Contributor

    Failed in: runtime-coreclr crossgen2 20261013.1

    Failed tests:

    net11.0-windows-Release-x64-TestReadyToRun_Release-Windows.Amd64.Open.rt
    - System.Numerics.Tensors.Tests.TensorSpanTests.TensorExtensionsSpanInSpanOut<Single, Single>(tensorPrimitivesOperation: TensorPrimitivesSpanInSpanOut`2 { HasSingleTarget = True, Method = Single Exp10(Single), Target = null }, tensorOperation: TensorSpanInSpanOut`2 { HasSingleTarget = True, Method = System.Numerics.Tensors.TensorSpan`1[System.Single]& Exp10[Single](System.Numerics.Tensors.ReadOnlyTensorSpan`1[System.Single] ByRef, System.Numerics.Tensors.TensorSpan`1[System.Single] ByRef), Target = null }, tolerance: 9.99999975E-06)
    
    

    Error message:

    Assert.All() Failure: 1 out of 12 items in the collection did not pass.\r\n[11]: Item:  [1, 2, 3, 4, 5, ···]\r\n      Error: Assert.Equal() Failure: Values differ\r\n             Expected: 3.40280805E+38\r\n             Actual:           +∞
    

    Stack trace:

    at System.Numerics.Tensors.Tests.TensorSpanTests.TensorExtensionsSpanInSpanOut[TIn,TOut](TensorPrimitivesSpanInSpanOut`2 tensorPrimitivesOperation, TensorSpanInSpanOut`2 tensorOperation, Nullable`1 tolerance) in /_/src/libraries/System.Numerics.Tensors/tests/TensorSpanTests.cs:line 267
       at InvokeStub_TensorSpanTests.TensorExtensionsSpanInSpanOut(Object, Span`1)
       at System.Reflection.MethodBaseInvoker.InvokeWithFewArgs(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
    
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

    Known Build ErrorUse this to report build issues in the .NET Helix tabarea-System.Numerics.Tensorsblocking-clean-ciBlocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms'untriagedNew issue has not been triaged by the area owner

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions