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

[ppc64le] Fixed BinaryFormatter and Tensors tests #107678

Merged

Conversation

alhad-deshpande
Copy link
Contributor

@alhad-deshpande alhad-deshpande commented Sep 11, 2024

Fixes #97296

alhad-deshpande and others added 27 commits September 8, 2022 10:55
@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Sep 11, 2024
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Sep 11, 2024
@akoeplinger
Copy link
Member

/azp run runtime-community

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@akoeplinger
Copy link
Member

@alhad-deshpande CI is seeing an assertion on ppc64le:

  Discovering: System.Runtime.Serialization.Formatters.Tests (method display = ClassAndMethod, method display options = None)
BinaryFormatter is enabled in AppConfig: True
  Discovered:  System.Runtime.Serialization.Formatters.Tests (found 66 of 74 test cases)
  Starting:    System.Runtime.Serialization.Formatters.Tests (parallel test collections = on [4 threads], stop on fail = off)
* Assertion at /__w/1/s/src/mono/mono/mini/mini-codegen.c:841, condition `i == sel' not met


=================================================================
	Native Crash Reporting
=================================================================
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.
=================================================================

=================================================================
	Native stacktrace:
=================================================================
	0x7181c512bc94 - Unknown
	0x7181c50d44fc - Unknown
	0x7181c512b108 - Unknown
	0x7181c5d00444 - Unknown
	0x7181c55e866c - Unknown
	0x7181c5581dfc - Unknown
	0x7181c555d260 - Unknown
	0x7181c52076c8 - Unknown
	0x7181c521bd4c - Unknown
	0x7181c5217534 - Unknown
	0x7181c5207c7c - Unknown
	0x7181c5207dcc - Unknown
	0x7181c5207e4c - Unknown
	0x7181c50cc0e4 - Unknown
	0x7181c50ca830 - Unknown
	0x7181c50124e8 - Unknown
	0x7181c5015e64 - Unknown
	0x7181c5017e28 - Unknown
	0x7181c5026014 - Unknown
	0x7181c501e474 - Unknown
	0x7181c50d77b4 - Unknown
	0x7181c50d8854 - Unknown
	0x7181c4b716f4 - Unknown
	0x7181c270826c - Unknown
	0x7181c2707d0c - Unknown
	0x7181c26cbab4 - Unknown
	0x7181b86ca7f0 - Unknown
	0x7181b90d0e00 - Unknown
	0x7181c50229c0 - Unknown
	0x7181c52d7b48 - Unknown
	0x7181c52e4018 - Unknown
	0x7181c5278cc4 - Unknown
	0x7181c5287f38 - Unknown
	0x7181b9041acc - Unknown
	0x7181b9041710 - Unknown
	0x7181c26e8e20 - Unknown
	0x7181b903f908 - Unknown
	0x7181b903ed80 - Unknown
	0x7181b90d0aa8 - Unknown
	0x7181b90ccb24 - Unknown
	0x7181b90cbc0c - Unknown
	0x7181b90c9094 - Unknown
	0x7181b90c5120 - Unknown
	0x7181b90c4f4c - Unknown
	0x7181b9080f9c - Unknown
	0x7181b9080b48 - Unknown
	0x7181b90809ac - Unknown
	0x7181b90808a4 - Unknown
	0x7181b90c48c4 - Unknown
	0x7181b907fcb4 - Unknown
	0x7181b907f434 - Unknown
	0x7181b907f048 - Unknown
	0x7181b907eea4 - Unknown
	0x7181b907eda0 - Unknown
	0x7181b907d9a4 - Unknown
	0x7181b907d540 - Unknown
	0x7181b907d3ac - Unknown
	0x7181b907d2a8 - Unknown
	0x7181b907cd3c - Unknown
	0x7181b9073f60 - Unknown
	0x7181b9073138 - Unknown
	0x7181b9072f8c - Unknown
	0x7181b9072e84 - Unknown
	0x7181b906d9dc - Unknown
	0x7181b906d308 - Unknown
	0x7181b906d16c - Unknown
	0x7181b906d064 - Unknown
	0x7181b906c960 - Unknown
	0x7181b906b734 - Unknown
	0x7181b906af50 - Unknown
	0x7181b906adac - Unknown
	0x7181b906aca8 - Unknown
	0x7181b9065c54 - Unknown
	0x7181b9064480 - Unknown
	0x7181b90642e4 - Unknown
	0x7181b90641b4 - Unknown
	0x7181b905d440 - Unknown
	0x7181b905be30 - Unknown
	0x7181b905bb70 - Unknown
	0x7181b905b75c - Unknown
	0x7181b905b27c - Unknown
	0x7181c0084160 - Unknown
	0x7181b905aef4 - Unknown
	0x7181c0082610 - Unknown
	0x7181c0080bb0 - Unknown
	0x7181b905aa50 - Unknown
	0x7181b9049540 - Unknown
	0x7181b90428a8 - Unknown
	0x7181c007fa94 - Unknown
	0x7181c26e9d64 - Unknown
	0x7181c50229c0 - Unknown
	0x7181c52d7b48 - Unknown
	0x7181c52feb8c - Unknown
	0x7181c55e5804 - Unknown

=================================================================
	External Debugger Dump:
=================================================================

=================================================================
	Basic Fault Address Reporting
=================================================================
Memory around native instruction pointer (0x7181c55e866c):0x7181c55e865c  98 8f 2d e9 10 00 29 75 c4 00 82 41 01 00 00 44  ..-...)u...A...D
0x7181c55e866c  00 f0 20 39 00 00 e0 3b 40 48 03 7c c8 00 81 40  .. 9...;@H.|...@
0x7181c55e867c  f0 00 01 e8 c0 00 81 eb d0 00 c1 eb d0 00 e3 7f  ................
0x7181c55e868c  a6 03 08 7c 6c ff ff 4b 00 00 00 60 00 00 00 60  ...|l..K...`...`

=================================================================
	Managed Stacktrace:
=================================================================
	  at <unknown> <0xffffffff>
	  at <unknown> <0xffffffff>
	  at System.Collections.Generic.SegmentedArrayBuilder`1:AddNonICollectionRangeInlined <0x00254>
	  at System.Linq.Enumerable:<ToArray>g__EnumerableToArray|314_0 <0x00190>
	  at System.Linq.Enumerable:ToArray <0x00170>
	  at System.Runtime.Serialization.Formatters.Tests.BinaryFormatterTests:SerializableObjects_MemberData <0x0013c>
	  at <Module>:runtime_invoke_object <0x0010c>
	  at <unknown> <0xffffffff>
	  at System.Reflection.RuntimeMethodInfo:InternalInvoke <0x000fc>
	  at System.Reflection.MethodBaseInvoker:InterpretedInvoke_Method <0x000bc>
	  at System.Reflection.MethodBaseInvoker:InvokeWithNoArgs <0x000e4>
	  at System.Reflection.RuntimeMethodInfo:Invoke <0x00354>
	  at System.Reflection.MethodBase:Invoke <0x0007c>
	  at <>c__DisplayClass20_0:<GetMethodAccessor>b__1 <0x00084>
	  at Xunit.MemberDataAttributeBase:GetData <0x00688>
	  at Xunit.Sdk.DataDiscoverer:GetData <0x001d0>
	  at <AfterTestCaseStartingAsync>d__9:MoveNext <0x01748>
	  at System.Runtime.CompilerServices.AsyncMethodBuilderCore:Start <0x0011c>
	  at Xunit.Sdk.XunitTheoryTestCaseRunner:AfterTestCaseStartingAsync <0x000e8>
	  at <RunAsync>d__19:MoveNext <0x00290>
	  at System.Runtime.CompilerServices.AsyncMethodBuilderCore:Start <0x0013c>
	  at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:Start <0x00070>
	  at Xunit.Sdk.TestCaseRunner`1:RunAsync <0x00120>
	  at Xunit.Sdk.XunitTheoryTestCase:RunAsync <0x00150>
	  at Xunit.Sdk.XunitTestMethodRunner:RunTestCaseAsync <0x00108>
	  at <RunTestCasesAsync>d__32:MoveNext <0x00228>
	  at System.Runtime.CompilerServices.AsyncMethodBuilderCore:Start <0x00144>
	  at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:Start <0x00070>
	  at Xunit.Sdk.TestMethodRunner`1:RunTestCasesAsync <0x00124>
	  at <RunAsync>d__31:MoveNext <0x002a0>
	  at System.Runtime.CompilerServices.AsyncMethodBuilderCore:Start <0x00134>
	  at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:Start <0x00070>
	  at Xunit.Sdk.TestMethodRunner`1:RunAsync <0x0011c>
	  at Xunit.Sdk.XunitTestClassRunner:RunTestMethodAsync <0x00188>
	  at <RunTestMethodsAsync>d__38:MoveNext <0x00b24>
	  at System.Runtime.CompilerServices.AsyncMethodBuilderCore:Start <0x0014c>
	  at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:Start <0x00070>
	  at Xunit.Sdk.TestClassRunner`1:RunTestMethodsAsync <0x00128>
	  at <RunAsync>d__37:MoveNext <0x00510>
	  at System.Runtime.CompilerServices.AsyncMethodBuilderCore:Start <0x0013c>
	  at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:Start <0x00070>
	  at Xunit.Sdk.TestClassRunner`1:RunAsync <0x00120>
	  at Xunit.Sdk.XunitTestCollectionRunner:RunTestClassAsync <0x0018c>
	  at <RunTestClassesAsync>d__28:MoveNext <0x004e0>
	  at System.Runtime.CompilerServices.AsyncMethodBuilderCore:Start <0x00144>
	  at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:Start <0x00070>
	  at Xunit.Sdk.TestCollectionRunner`1:RunTestClassesAsync <0x00124>
	  at <RunAsync>d__27:MoveNext <0x00510>
	  at System.Runtime.CompilerServices.AsyncMethodBuilderCore:Start <0x0013c>
	  at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:Start <0x00070>
	  at Xunit.Sdk.TestCollectionRunner`1:RunAsync <0x00120>
	  at <RunTestCollectionAsync>d__18:MoveNext <0x004f4>
	  at System.Runtime.CompilerServices.AsyncMethodBuilderCore:Start <0x00144>
	  at Xunit.Sdk.XunitTestAssemblyRunner:RunTestCollectionAsync <0x0020c>
	  at <>c__DisplayClass16_2:<RunTestCollectionsAsync>b__2 <0x00098>
	  at System.Threading.Tasks.Task`1:InnerInvoke <0x000d8>
	  at <>c:<.cctor>b__292_0 <0x00064>
	  at System.Threading.ExecutionContext:RunFromThreadPoolDispatchLoop <0x000d8>
	  at System.Threading.Tasks.Task:ExecuteWithThreadLocal <0x00494>
	  at System.Threading.Tasks.Task:ExecuteEntryUnsafe <0x00144>
	  at System.Threading.Tasks.Task:ExecuteFromThreadPool <0x00074>
	  at System.Threading.ThreadPoolWorkQueue:Dispatch <0x00734>
	  at WorkerThread:WorkerThreadStart <0x002e4>
	  at System.Threading.Thread:StartCallback <0x00168>
	  at System.Object:runtime_invoke_void__this__ <0x00110>
=================================================================

@alhad-deshpande
Copy link
Contributor Author

@akoeplinger
I checked this locally and was able to reproduce this crash. But yesterday when ran all tests these were passing. Below is the log from yeterday's run. So some new commit between yesterday and today has caused this.

[centos@temp-7 net9.0-linux]$ ../../../testhost/net9.0-linux-Release-ppc64le/dotnet exec --runtimeconfig System.Runtime.Serialization.Formatters.Tests.runtimeconfig.json --depsfile System.Runtime.Serialization.Formatters.Tests.deps.json xunit.console.dll System.Runtime.Serialization.Formatters.Tests.dll -xml testResults.xml -nologo -nocolor -notrait category=IgnoreForCI -notrait category=OuterLoop -notrait category=failing
Discovering: System.Runtime.Serialization.Formatters.Tests (method display = ClassAndMethod, method display options = None)
Discovered: System.Runtime.Serialization.Formatters.Tests (found 44 of 80 test cases)
Starting: System.Runtime.Serialization.Formatters.Tests (parallel test collections = on [4 threads], stop on fail = off)
System.Runtime.Serialization.Formatters.Tests.SerializationBinderTests.BindToType_AllValuesTracked [SKIP]
Condition(s) not met: "IsBinaryFormatterEnabled"
Finished: System.Runtime.Serialization.Formatters.Tests
=== TEST EXECUTION SUMMARY ===
System.Runtime.Serialization.Formatters.Tests Total: 64, Errors: 0, Failed: 0, Skipped: 1, Time: 0.889s

@akoeplinger
Copy link
Member

@alhad-deshpande I think the problem is the Condition(s) not met: "IsBinaryFormatterEnabled" in your log, it was accidentally not running the BinaryFormatter tests, this was fixed by #107408

@alhad-deshpande
Copy link
Contributor Author

@akoeplinger
This will take time to debug and fix. Can you please disable System.Runtime.Serialization.Formatters.Tests on CI for ppc64le and merge this PR so that 3 fixes can go in main and .net 9 release branch?

@akoeplinger
Copy link
Member

/azp run runtime-community

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@akoeplinger
Copy link
Member

/azp run runtime-community

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@akoeplinger akoeplinger merged commit 076957d into dotnet:main Sep 12, 2024
122 of 124 checks passed
@akoeplinger
Copy link
Member

akoeplinger commented Sep 12, 2024

Note that we already branched for .net 9 a while ago so you'll need to carry this as a patch in your build.

@alhad-deshpande
Copy link
Contributor Author

alhad-deshpande commented Sep 13, 2024

@akoeplinger
Thanks for disabling System.Runtime.Serialization.Formatters and merging this PR.

Can we backport to .net 9 branch Should I raise a new PR for .net 9 branch?

@akoeplinger
Copy link
Member

@alhad-deshpande s390x/ppc64le changes are not in scope for backporting, you can carry them as patches when you build the dotnet SDK for those platforms.

/cc @uweigand

@alhad-deshpande
Copy link
Contributor Author

@akoeplinger
OK, sure. Last 2 years we did backporting for ppc64le changes, hence asked you for that.

jtschuster pushed a commit to jtschuster/runtime that referenced this pull request Sep 17, 2024
* [ppc64le] Fixed thunk address 8 byte alignment issue

* Fixed FSharp crash issue

* [ppc64le] Implementation of mono_arch_get_delegate_virtual_invoke_impl method for ppc64le architecture

* Fixed clang15 build issues and returning address of sc_sp instead of value

* Added float32 support and implemented related opcodes

* Correction in OP_RCONV_TO_R cases

* Corrected code for few opcodes

* [ppc64le] performance improvements while branching

* [ppc64le] Fixed insufficient memory exception issue

* [ppc64le] Fixed BinaryFormatter and Tensors tests

* Disable System.Runtime.Serialization.Formatters.Tests

* Fix tests.proj

---------

Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
sirntar pushed a commit to sirntar/runtime that referenced this pull request Sep 30, 2024
* [ppc64le] Fixed thunk address 8 byte alignment issue

* Fixed FSharp crash issue

* [ppc64le] Implementation of mono_arch_get_delegate_virtual_invoke_impl method for ppc64le architecture

* Fixed clang15 build issues and returning address of sc_sp instead of value

* Added float32 support and implemented related opcodes

* Correction in OP_RCONV_TO_R cases

* Corrected code for few opcodes

* [ppc64le] performance improvements while branching

* [ppc64le] Fixed insufficient memory exception issue

* [ppc64le] Fixed BinaryFormatter and Tensors tests

* Disable System.Runtime.Serialization.Formatters.Tests

* Fix tests.proj

---------

Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Codegen-JIT-mono community-contribution Indicates that the PR has been added by a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

System.Numerics.Tensors.Tests fails with assertion in mini-ppc.c on ppc64le
2 participants