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

Trying to build Mono project from Github Actions causes headless editor to crash #42378

Open
paul-marechal opened this issue Sep 28, 2020 · 7 comments

Comments

@paul-marechal
Copy link

paul-marechal commented Sep 28, 2020

Godot version:

3.2.3 mono linux headless: https://downloads.tuxfamily.org/godotengine/3.2.3/mono/Godot_v3.2.3-stable_mono_linux_headless_64.zip

OS/device including version:

Ubuntu 18.04, config: https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu1804-README.md

Issue description:

Goal is to compile C# scripts from CI/CD to catch any compilation error/warning, and run some unit test suites on some C# modules. I wanted to run Godot before having fun with MSBuild because the Godot C# scripts will need the .mono folder in order to find the Godot assemblies.

Disclaimer: I don't even know if this is a good idea to setup, or if there's a better way. Suggestions welcome.

I wrote a GitHub action essentially downloading Godot and running it as follows:

name: Build C# Project

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

jobs:
  build:

    runs-on: ubuntu-18.04

    steps:
    - uses: actions/checkout@v2
    - name: Setup Godot 3.2.3 with Mono Support
      run: |
        curl -o /tmp/godot-3.2.3.zip https://downloads.tuxfamily.org/godotengine/3.2.3/mono/Godot_v3.2.3-stable_mono_linux_headless_64.zip
        7z e /tmp/godot-3.2.3.zip -o/opt/godot-3.2.3 -r -y
    - name: Build with Godot
      run: /opt/godot-3.2.3/Godot_v3.2.3-stable_mono_linux_headless.64 --build-solutions -q
Run /opt/godot-3.2.3/Godot_v3.2.3-stable_mono_linux_headless.64 --build-solutions -q
  /opt/godot-3.2.3/Godot_v3.2.3-stable_mono_linux_headless.64 --build-solutions -q
  shell: /bin/bash -e {0}
Godot Engine v3.2.3.stable.mono.official - https://godotengine.org
 
Mono: Log file is: '/home/runner/.local/share/godot/mono/mono_logs/2020_09_28 00.46.48 (2701).txt'
ERROR: mono_log_callback: Mono: FATAL ERROR 'Runtime critical type Mono.RuntimeStructs/MonoError not found (in domain , error)', ABORTING! Logfile: '/home/runner/.local/share/godot/mono/mono_logs/2020_09_28 00.46.48 (2701).txt'.

   At: modules/mono/mono_gd/gd_mono_log.cpp:93.
=================================================================
	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:
=================================================================
	0xcf4354 - /opt/godot-3.2.3/Godot_v3.2.3-stable_mono_linux_headless.64 : (null)
	0xcf46cc - /opt/godot-3.2.3/Godot_v3.2.3-stable_mono_linux_headless.64 : (null)
	0xce7178 - /opt/godot-3.2.3/Godot_v3.2.3-stable_mono_linux_headless.64 : (null)
	0xcf39af - /opt/godot-3.2.3/Godot_v3.2.3-stable_mono_linux_headless.64 : (null)
	0x7fece16e68a0 - /lib/x86_64-linux-gnu/libpthread.so.0 : (null)
	0x7fece0b77f47 - /lib/x86_64-linux-gnu/libc.so.6 : gsignal
	0x7fece0b798b1 - /lib/x86_64-linux-gnu/libc.so.6 : abort
	0xbae025 - /opt/godot-3.2.3/Godot_v3.2.3-stable_mono_linux_headless.64 : (null)
	0xf1826e - /opt/godot-3.2.3/Godot_v3.2.3-stable_mono_linux_headless.64 : (null)
	0xf18603 - /opt/godot-3.2.3/Godot_v3.2.3-stable_mono_linux_headless.64 : monoeg_g_logv
	0xf186b2 - /opt/godot-3.2.3/Godot_v3.2.3-stable_mono_linux_headless.64 : monoeg_g_log
	0xd911ce - /opt/godot-3.2.3/Godot_v3.2.3-stable_mono_linux_headless.64 : (null)
	0xde5e60 - /opt/godot-3.2.3/Godot_v3.2.3-stable_mono_linux_headless.64 : (null)
	0xdf82a8 - /opt/godot-3.2.3/Godot_v3.2.3-stable_mono_linux_headless.64 : (null)
	0xcb1272 - /opt/godot-3.2.3/Godot_v3.2.3-stable_mono_linux_headless.64 : (null)
	0xcb3d92 - /opt/godot-3.2.3/Godot_v3.2.3-stable_mono_linux_headless.64 : (null)
	0xcaf804 - /opt/godot-3.2.3/Godot_v3.2.3-stable_mono_linux_headless.64 : (null)
	0xd086e7 - /opt/godot-3.2.3/Godot_v3.2.3-stable_mono_linux_headless.64 : (null)
	0xd0a7e2 - /opt/godot-3.2.3/Godot_v3.2.3-stable_mono_linux_headless.64 : (null)
	0xcfe723 - /opt/godot-3.2.3/Godot_v3.2.3-stable_mono_linux_headless.64 : (null)
	0xd01126 - /opt/godot-3.2.3/Godot_v3.2.3-stable_mono_linux_headless.64 : (null)
	0xd01e8f - /opt/godot-3.2.3/Godot_v3.2.3-stable_mono_linux_headless.64 : (null)
	0x40726507 - Unknown

=================================================================
	Telemetry Dumper:
=================================================================
* Assertion: should not be reached at threads.c:6258
Pkilling 0x7fece1b05240 from 0x7fece024f700
Entering thread summarizer pause from 0x7fece024f700
Finished thread summarizer pause from 0x7fece024f700.

Waiting for dumping threads to resume

=================================================================
	External Debugger Dump:
=================================================================
mono_gdb_render_native_backtraces not supported on this platform, unable to find gdb or lldb

=================================================================
	Basic Fault Address Reporting
=================================================================
Memory around native instruction pointer (0x7fece0b77f47):0x7fece0b77f37  d2 4c 89 ce bf 02 00 00 00 b8 0e 00 00 00 0f 05  .L..............
0x7fece0b77f47  48 8b 8c 24 08 01 00 00 64 48 33 0c 25 28 00 00  H..$....dH3.%(..
0x7fece0b77f57  00 44 89 c0 75 1f 48 81 c4 18 01 00 00 c3 0f 1f  .D..u.H.........
0x7fece0b77f67  00 48 8b 15 f9 be 3a 00 f7 d8 41 b8 ff ff ff ff  .H....:...A.....

=================================================================
	Managed Stacktrace:
=================================================================
	  at <unknown> <0xffffffff>
	  at System.Collections.Generic.EqualityComparer`1:CreateComparer <0x000da>
	  at System.Collections.Generic.Dictionary`2:.ctor <0x0007f>
	  at System.Collections.Generic.Dictionary`2:.ctor <0x00013>
	  at System.LocalDataStoreMgr:.ctor <0x000b7>
	  at System.Runtime.Remoting.Contexts.Context:.cctor <0x0001f>
	  at System.Object:runtime_invoke_void <0x00066>
=================================================================
/home/runner/work/_temp/f9356c96-3674-4918-861d-071beff6d22d.sh: line 1:  2701 Aborted                 (core dumped) /opt/godot-3.2.3/Godot_v3.2.3-stable_mono_linux_headless.64 --build-solutions -q
Error: Process completed with exit code 134.

Steps to reproduce:

Minimal reproduction project:

@paul-marechal paul-marechal changed the title Trying to build from Github Actions causes headless editor crash Trying to build Mono project from Github Actions causes headless editor to crash Sep 28, 2020
@paul-marechal
Copy link
Author

My environment is most likely missing something, but I truly am at loss here... After checking, mono-devel is already installed and up to date on the runner.

@akien-mga
Copy link
Member

akien-mga commented Sep 28, 2020

Do you have mono-msbuild?

@paul-marechal
Copy link
Author

@akien-mga what would I be looking for? It doesn't seem to be an Ubuntu package.

@neikeq
Copy link
Contributor

neikeq commented Oct 1, 2020

This seems to be the relevant part of the error: Runtime critical type Mono.RuntimeStructs/MonoError not found

Does the same happen if you try this on your machine or does it only happen when running on Github Actions?

@paul-marechal
Copy link
Author

@neikeq it only seems to happen on the GitHub Actions machine which is an Ubuntu 18.04.

I am running a Windows 10 locally, so .NET stuff works pretty well out of the box.

The requirements for the Godot Mono/Linux/headless only specify installing Mono, which seems to be the case for the runner as the latest mono-devel is installed. Pretty sure something is still missing in the environment, but I am unable to figure out what...

@PizzaConsole
Copy link

I have the same problem trying to do this in the Azure pipeline....

ERROR: get_language_code: Invalid locale 'C'.
2021-02-23T08:58:53.0584126Z    At: core/translation.cpp:945.
2021-02-23T08:58:53.0584703Z ERROR: set_locale: Unsupported locale 'C', falling back to 'en'.
2021-02-23T08:58:53.0585083Z    At: core/translation.cpp:969.
2021-02-23T08:58:54.6973505Z reimport: begin: (Re)Importing Assets steps: 1
2021-02-23T08:58:54.6974074Z 	reimport: step 0: icon.png
2021-02-23T08:58:55.1647972Z mono_project_debug_build: begin: Building project solution... steps: 1
2021-02-23T08:58:55.1649044Z 	mono_project_debug_build: step 0: Building project solution
2021-02-23T08:58:58.7540445Z mono_project_debug_build: end
2021-02-23T08:58:58.7545111Z ERROR: godot_icall_GD_pusherror: Failed to export project: Failed to build project
2021-02-23T08:58:58.7545626Z    At: modules/mono/glue/gd_glue.cpp:250.
2021-02-23T08:58:58.7599582Z System.Exception: Failed to build project
2021-02-23T08:58:58.7600295Z   at GodotTools.Export.ExportPlugin._ExportBeginImpl (System.String[] features, System.Boolean isDebug, System.String path, System.Int32 flags) [0x000a6] in <fea6bc16b6d64de0afe8ace2924a4bc2>:0 
2021-02-23T08:58:58.7601237Z   at GodotTools.Export.ExportPlugin._ExportBegin (System.String[] features, System.Boolean isDebug, System.String path, System.Int32 flags) [0x0000b] in <fea6bc16b6d64de0afe8ace2924a4bc2>:0 
2021-02-23T08:59:03.5656337Z savepack: begin: Packing steps: 102
2021-02-23T08:59:03.5657380Z 	savepack: step 2: Storing File: res://.mono/metadata/scripts_metadata.release
2021-02-23T08:59:03.5658110Z 	savepack: step 2: Storing File: res://default_env.tres
2021-02-23T08:59:03.5659470Z 	savepack: step 27: Storing File: res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex
2021-02-23T08:59:03.5660269Z 	savepack: step 27: Storing File: res://icon.png.import
2021-02-23T08:59:03.5660956Z 	savepack: step 52: Storing File: res://scenes/Authenticate.tscn
2021-02-23T08:59:03.5663572Z 	savepack: step 77: Storing File: res://scripts/Authenticate.cs
2021-02-23T08:59:03.5664303Z 	savepack: step 102: Storing File: res://icon.png
2021-02-23T08:59:03.5667598Z 	savepack: step 102: Storing File: res://project.binary
2021-02-23T08:59:03.5669105Z savepack: end
2021-02-23T08:59:03.5678768Z reimport: end
2021-02-23T08:59:05.1989326Z Godot Engine v3.2.3.stable.mono.official - https://godotengine.org

@knightofiam
Copy link

knightofiam commented Apr 21, 2021

I solved this here for GitHub Actions, and in a bash script for other cases. Hope it helps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants