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

[mono] Assertion at mini-ppc.c:3801, condition `cfg->frame_reg == ppc_sp' not met #79205

Closed
ayakael opened this issue Dec 5, 2022 · 4 comments

Comments

@ayakael
Copy link
Contributor

ayakael commented Dec 5, 2022

Description

When building fsharp (commit c370ee09c2eebcc750a59e9c10e52792679f896e) with mono-flavored runtime on ppc64le on musl-based system, build fails with error 134:

* Assertion at /builds/ayakael/aports/community/dotnet7-stage0/src/dotnet-v7.0.100-rtm.22521.12/src/runtime/src/mono/mono/mini/mini-ppc.c:3801, condition `cfg->frame_reg == ppc_sp' not met (TaskId:264)
                      (TaskId:264)
                      (TaskId:264)
                     ================================================================= (TaskId:264)
                     	Native Crash Reporting (TaskId:264)
                     ================================================================= (TaskId:264)
                     Got a SIGABRT while executing native code. This usually indicates (TaskId:264)
                     a fatal error in the mono runtime or one of the native libraries  (TaskId:264)
                     used by your application. (TaskId:264)
                     ================================================================= (TaskId:264)
                      (TaskId:264)
                     ================================================================= (TaskId:264)
                     	Basic Fault Address Reporting (TaskId:264)
                     ================================================================= (TaskId:264)
                     Memory around native instruction pointer (0x7fff96c65144):0x7fff96c65134  02 00 60 38 00 00 a0 38 08 00 c0 38 02 00 00 44  ..`8...8...8...D (TaskId:264)
                     0x7fff96c65144  08 00 e3 40 d0 00 63 7c 20 00 80 4e 00 00 00 00  ...@..c| ..N.... (TaskId:264)
                     0x7fff96c65154  00 00 00 00 00 00 00 00 07 00 4c 3c a4 2c 42 38  ..........L<.,B8 (TaskId:264)
                     0x7fff96c65164  a6 02 08 7c 10 00 01 f8 e1 ff 21 f8 69 00 00 38  ...|......!.i..8 (TaskId:264)
                      (TaskId:264)
                     ================================================================= (TaskId:264)
                     	Managed Stacktrace: (TaskId:264)
                     ================================================================= (TaskId:264)
                     	  at <unknown> <0xffffffff> (TaskId:264)
                     	  at <unknown> <0xffffffff> (TaskId:264)
                     	  at UtilsStrings.SR:createMessageString <0x00134> (TaskId:264)
                     	  at UtilsStrings.SR:GetStringFunc <0x00194> (TaskId:264)
                     	  at <StartupCode$FSharp-Compiler-Service>.$UtilsStrings:clo0@113-625 <0x00084> (TaskId:264)
                     	  at fSharpBannerVersion@113:Invoke <0x00078> (TaskId:264)
                     	  at Microsoft.FSharp.Core.FSharpFunc`2:InvokeFast <0x001f4> (TaskId:264)
                     	  at UtilsStrings.SR:fSharpBannerVersion <0x00178> (TaskId:264)
                     	  at <StartupCode$FSharp-Compiler-Service>.$CompilerLocation:.cctor <0x000a4> (TaskId:264)
                     	  at System.Object:runtime_invoke_void <0x0010c> (TaskId:264)
                     	  at <unknown> <0xffffffff> (TaskId:264)
                     	  at System.Object:__icall_wrapper_mono_generic_class_init <0x000f0> (TaskId:264)
                     	  at TcConfigBuilder:CreateNew <0x00e4c> (TaskId:264)
                     	  at FSharp.Compiler.Driver:main1 <0x006ac> (TaskId:264)
                     	  at FSharp.Compiler.Driver:CompileFromCommandLineArguments <0x001e8> (TaskId:264)
                     	  at FSharp.Compiler.CommandLineMain:main <0x00b24> (TaskId:264)
                     	  at <Module>:runtime_invoke_int_object <0x00114> (TaskId:264)
                     ================================================================= (TaskId:264)
21:46:06.464  3:33>/builds/ayakael/aports/community/dotnet7-stage0/src/produced-bootstrap/sdk/7.0.100/FSharp/Microsoft.FSharp.Targets(325,9): error MSB6006: "dotnet" exited with code 134. [/builds/ayakael/aports/community/dotnet7-stage0/src/dotnet-v7.0.100-rtm.22521.12/src/fsharp/src/FSharp.Core/FSharp.Core.fsproj:: TargetFramework=netstandard2.1]

Reproduction Steps

Build fsharp with mono flavored runtime in linux-musl-ppc64le environment

Expected behavior

Build should pass

Actual behavior

Build fails

Regression?

As dotnet7 is first version of dotnet to support ppc64le, not a regression.

Known Workarounds

None so far. Previous assertion failures were due to musl's stack size difference. This should be fixed with #76500, yet the implemented workaround isn't working.

Configuration

dotnet --info:

.NET SDK:
 Version:   7.0.100
 Commit:    e12b7af219

Runtime Environment:
 OS Name:     alpine
 OS Version:  3.17
 OS Platform: Linux
 RID:         linux-musl-ppc64le
 Base Path:   /var/build/dotnet7/testing/dotnet7-stage0/src/produced-bootstrap/sdk/7.0.100/

Host:
  Version:      7.0.0
  Architecture: ppc64le
  Commit:       N/A

.NET SDKs installed:
  7.0.100 [/var/build/dotnet7/testing/dotnet7-stage0/src/produced-bootstrap/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 7.0.0 [/var/build/dotnet7/testing/dotnet7-stage0/src/produced-bootstrap/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 7.0.0 [/var/build/dotnet7/testing/dotnet7-stage0/src/produced-bootstrap/shared/Microsoft.NETCore.App]

Other architectures found:
  None

Environment variables:
  DOTNET_ROOT       [/usr/lib/dotnet]

global.json file:
  Not found

Learn more:
  https://aka.ms/dotnet/info

Download .NET:
  https://aka.ms/dotnet/download

Other information

This is quite similar to #76805, but applies specifically to ppc64le support on mono.

Relevant binlog:
Build.binlog+.lex.binlog.log

@dotnet-issue-labeler
Copy link

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

@ghost ghost added the untriaged New issue has not been triaged by the area owner label Dec 5, 2022
@ayakael ayakael changed the title [mono] Assetion at mini-ppc.c:3801, condition `cfg->frame_reg == ppc_sp' not met [mono] Assertion at mini-ppc.c:3801, condition `cfg->frame_reg == ppc_sp' not met Dec 5, 2022
@ayakael
Copy link
Contributor Author

ayakael commented Dec 5, 2022

@BrzVlad Does this look like a stack-size related failure to you?

@marek-safar marek-safar added arch-ppc64le area-Codegen-JIT-mono and removed untriaged New issue has not been triaged by the area owner labels Dec 5, 2022
@marek-safar marek-safar added this to the Future milestone Dec 5, 2022
@BrzVlad
Copy link
Member

BrzVlad commented Dec 5, 2022

I don't know where this assertion comes from exactly, but it rather looks like a bug in the JIT compiler code gen.

@ayakael
Copy link
Contributor Author

ayakael commented Dec 5, 2022

Looks like it was fixed in #77201

Sorry for the noise.

@ayakael ayakael closed this as completed Dec 5, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Jan 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants