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

System numerics abort at System.Numerics.BigIntegerCalculator.Multiply #94610

Closed
lewing opened this issue Nov 10, 2023 · 5 comments · Fixed by #96744
Closed

System numerics abort at System.Numerics.BigIntegerCalculator.Multiply #94610

lewing opened this issue Nov 10, 2023 · 5 comments · Fixed by #96744
Assignees
Labels
area-System.Numerics blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms' Known Build Error Use this to report build issues in the .NET Helix tab
Milestone

Comments

@lewing
Copy link
Member

lewing commented Nov 10, 2023

Build Information

Build: https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=465756
Build error leg or test failing: System.Runtime.Numerics.Tests.WorkItemExecution
Pull request: #94599

Error Message

Fill the error message using step by step known issues guidance.

{
  "ErrorMessage": "at System.Numerics.BigIntegerCalculator.Multiply",
  "ErrorPattern": "",
  "BuildRetry": false,
  "ExcludeConsoleLog": false
}

Known issue validation

Build: 🔎 https://dev.azure.com/dnceng-public/public/_build/results?buildId=465756
Error message validated: at System.Numerics.BigIntegerCalculator.Multiply
Result validation: ✅ Known issue matched with the provided build.
Validation performed at: 11/10/2023 5:14:11 PM UTC

Report

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
0 0 0
@lewing lewing added blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms' Known Build Error Use this to report build issues in the .NET Helix tab labels Nov 10, 2023
@ghost ghost added the untriaged New issue has not been triaged by the area owner label Nov 10, 2023
@ghost
Copy link

ghost commented Nov 10, 2023

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

Issue Details

Build Information

Build: https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=465756
Build error leg or test failing: System.Runtime.Numerics.Tests.WorkItemExecution
Pull request: #94599

Error Message

Fill the error message using step by step known issues guidance.

{
  "ErrorMessage": "at System.Numerics.BigIntegerCalculator.Multiply",
  "ErrorPattern": "",
  "BuildRetry": false,
  "ExcludeConsoleLog": false
}
Author: lewing
Assignees: -
Labels:

area-Infrastructure-libraries, blocking-clean-ci, Known Build Error

Milestone: -

@ghost
Copy link

ghost commented Nov 10, 2023

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

Issue Details

Build Information

Build: https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=465756
Build error leg or test failing: System.Runtime.Numerics.Tests.WorkItemExecution
Pull request: #94599

Error Message

Fill the error message using step by step known issues guidance.

{
  "ErrorMessage": "at System.Numerics.BigIntegerCalculator.Multiply",
  "ErrorPattern": "",
  "BuildRetry": false,
  "ExcludeConsoleLog": false
}

Known issue validation

Build: 🔎 https://dev.azure.com/dnceng-public/public/_build/results?buildId=465756
Error message validated: at System.Numerics.BigIntegerCalculator.Multiply
Result validation: ✅ Known issue matched with the provided build.
Validation performed at: 11/10/2023 5:14:11 PM UTC

Author: lewing
Assignees: -
Labels:

area-System.Numerics, blocking-clean-ci, untriaged, Known Build Error

Milestone: -

@tannergooding
Copy link
Member

Probably related to #92208

CC. @adamsitnik, @kzrnm

@adamsitnik
Copy link
Member

adamsitnik commented Nov 13, 2023

@tannergooding the failing assert:

Debug.Assert(bits.Length == left.Length + right.Length);

The test is using a Random instance with const seed:

private static Random s_random = new Random(100);

So, in theory the issue should be reproducible every time. I am not sure whether the order of executed tests is always the same, which is currently my only explanation of why it's failing sometimes.

full log

Process terminated. Assertion failed.
   at System.Numerics.BigIntegerCalculator.Multiply(ReadOnlySpan`1 left, ReadOnlySpan`1 right, Span`1 bits) in /_/src/libraries/System.Runtime.Numerics/src/System/Numerics/BigIntegerCalculator.SquMul.cs:line 163
   at System.Numerics.BigIntegerCalculator.MultiplyFarLength(ReadOnlySpan`1 left, ReadOnlySpan`1 right, Span`1 bits) in /_/src/libraries/System.Runtime.Numerics/src/System/Numerics/BigIntegerCalculator.SquMul.cs:line 289
   at System.Numerics.BigIntegerCalculator.Multiply(ReadOnlySpan`1 left, ReadOnlySpan`1 right, Span`1 bits) in /_/src/libraries/System.Runtime.Numerics/src/System/Numerics/BigIntegerCalculator.SquMul.cs:line 171
   at System.Numerics.BigNumber.<NumberToBigInteger>g__DivideAndConquer|15_1(BigNumberBuffer& number, BigInteger& result, <>c__DisplayClass15_0&) in /_/src/libraries/System.Runtime.Numerics/src/System/Numerics/BigNumber.cs:line 841
   at System.Numerics.BigNumber.NumberToBigInteger(BigNumberBuffer& number, BigInteger& result) in /_/src/libraries/System.Runtime.Numerics/src/System/Numerics/BigNumber.cs:line 658
   at System.Numerics.BigNumber.TryParseBigInteger(ReadOnlySpan`1 value, NumberStyles style, NumberFormatInfo info, BigInteger& result) in /_/src/libraries/System.Runtime.Numerics/src/System/Numerics/BigNumber.cs:line 381
   at System.Numerics.BigNumber.ParseBigInteger(ReadOnlySpan`1 value, NumberStyles style, NumberFormatInfo info) in /_/src/libraries/System.Runtime.Numerics/src/System/Numerics/BigNumber.cs:line 398
   at System.Numerics.BigNumber.ParseBigInteger(String value, NumberStyles style, NumberFormatInfo info) in /_/src/libraries/System.Runtime.Numerics/src/System/Numerics/BigNumber.cs:line 388
   at System.Numerics.BigInteger.Parse(String value, NumberStyles style, IFormatProvider provider) in /_/src/libraries/System.Runtime.Numerics/src/System/Numerics/BigInteger.cs:line 672
   at System.Numerics.BigInteger.Parse(String value, NumberStyles style) in /_/src/libraries/System.Runtime.Numerics/src/System/Numerics/BigInteger.cs:line 662
   at System.Numerics.BigInteger.Parse(String value) in /_/src/libraries/System.Runtime.Numerics/src/System/Numerics/BigInteger.cs:line 657
   at System.Numerics.Tests.ToStringTest.VerifyToString(String test, String format, IFormatProvider provider, Boolean expectError, String expectedResult) in /_/src/libraries/System.Runtime.Numerics/tests/BigInteger/BigIntegerToStringTests.cs:line 1577
   at System.Numerics.Tests.ToStringTest.VerifyToString(String test, String format, String expectedResult, Boolean expectError) in /_/src/libraries/System.Runtime.Numerics/tests/BigInteger/BigIntegerToStringTests.cs:line 1564
   at System.Numerics.Tests.ToStringTest.RunStandardFormatToStringTests_Helper(Random random, String format, String negativeSign, Int32 precision, StringFormatter formatter, Boolean expectError) in /_/src/libraries/System.Runtime.Numerics/tests/BigInteger/BigIntegerToStringTests.cs:line 594
   at System.Numerics.Tests.ToStringTest.RunStandardFormatToStringTests() in /_/src/libraries/System.Runtime.Numerics/tests/BigInteger/BigIntegerToStringTests.cs:line 199

I'll try to reproduce it locally.

@adamsitnik adamsitnik self-assigned this Nov 13, 2023
@adamsitnik adamsitnik added this to the 9.0.0 milestone Nov 13, 2023
@ghost ghost removed the untriaged New issue has not been triaged by the area owner label Nov 13, 2023
@build-analysis build-analysis bot removed this from the 9.0.0 milestone Nov 15, 2023
@ghost ghost added the untriaged New issue has not been triaged by the area owner label Nov 15, 2023
@akoeplinger akoeplinger added this to the 9.0.0 milestone Nov 24, 2023
@ghost ghost removed the untriaged New issue has not been triaged by the area owner label Nov 24, 2023
@kzrnm
Copy link
Contributor

kzrnm commented Jan 9, 2024

I could reproduce this. I try to fix it.

kzrnm@c3f685e

Related issue

#96679, #96680

@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Jan 10, 2024
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Jan 12, 2024
@adamsitnik adamsitnik assigned kzrnm and unassigned adamsitnik Jan 15, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Feb 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Numerics blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms' Known Build Error Use this to report build issues in the .NET Helix tab
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants