Repository navigation
Test failure: TensorTests.TensorExtensionsSpanInSpanOut<Single> Exp10M1 returns +∞ instead of a finite value near float.MaxValue #135056
Description
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 Detailsis 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. ErrorMessageis a case-sensitive ordinalString.Containssubstring copied verbatim from the failing log.- Set
BuildRetrytotrueonly for a clear infrastructure retry case.ExcludeConsoleLogdisables 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 withRandom.Shared.NextSingle() * 100 - 50. When an input lands just below log10(float.MaxValue) ≈ 38.53, scalarfloat.Exp10M1returns a finite value close tofloat.MaxValue, butTensor.Exp10M1overflows 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
Tensorelementwise operations throughTensorPrimitivesand added the tolerance for this case. The failing build's merge commit includes that change, soTensor.Exp10M1probably now uses the vectorizedTensorPrimitivespath, 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
Summary
| 24-Hour Hit Count | 7-Day Hit Count | 1-Month Count |
|---|---|---|
| 3 | 10 | 22 |
Activity
dotnet-policy-service commentedon Oct 1, 2026
Tagging subscribers to this area: @dotnet/area-system-numerics-tensors
See info in area-owners.md if you want to be subscribed.
VincentBu commentedon Oct 10, 2026
Failed in: runtime-coreclr libraries-jitstress 20261008.1
Failed tests:
Error message:
Stack trace:
caraioniurie47 commentedon Oct 11, 2026
A related test,
System.Numerics.Tensors.Tests.TensorSpanTests.TensorExtensionsSpanInSpanOut<Single, Single>, fails the same way on theExp10case, which this issue'sErrorMessagedoesn't match, since it namesExp10M1andPerformSpanInSpanOut`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'sErrorMessagebe 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
ErrorMessagevalues are from the bodies of this issue and #135554.lilinus commentedon Oct 14, 2026
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.
runtime/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/TensorPrimitives.SinPi.cs
Lines 54 to 57 in 56ba1c0
VincentBu commentedon Oct 15, 2026
Failed in: runtime-coreclr crossgen2 20261013.1
Failed tests:
Error message:
Stack trace: