Mono process crash

I have some weird bug.
When editor starts mono process, it immediately crashes.
If I try to run the same command (copy paste FLinuxPlatformProcess::CreateProc: ‘…’) - it works ok

I have Ubuntu 16.04
I tried mono 4.2, 4.4, 4.5

Backtrace is the same each time

#0  0x00007f1c8172bf6a in __waitpid (pid=pid@entry=27623, stat_loc=stat_loc@entry=0x7ffc6794450c, options=options@entry=0) at ../sysdeps/unix/sysv/linux/waitpid.c:29
#1  0x00000000004a7319 in mono_handle_native_sigsegv (signal=<optimized out>, ctx=<optimized out>, info=<optimized out>) at mini-exceptions.c:2348
#2  <signal handler called>
#3  0x00007f1c81171418 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
#4  0x00007f1c8117301a in __GI_abort () at abort.c:89
#5  0x00000000006403f9 in monoeg_log_default_handler (log_domain=<optimized out>, log_level=<optimized out>, message=<optimized out>, unused_data=<optimized out>) at goutput.c:233
#6  monoeg_log_default_handler (log_domain=<optimized out>, log_level=G_LOG_LEVEL_ERROR, message=<optimized out>, unused_data=<optimized out>) at goutput.c:221
#7  0x0000000000640607 in monoeg_g_logv (log_domain=0x0, log_level=G_LOG_LEVEL_ERROR, format=<optimized out>, args=args@entry=0x7ffc67945468) at goutput.c:113
#8  0x00000000006406b2 in monoeg_g_log (log_domain=log_domain@entry=0x0, log_level=log_level@entry=G_LOG_LEVEL_ERROR, format=format@entry=0x6fa168 "Could not find an available signal") at goutput.c:123
#9  0x0000000000639795 in signal_search_alternative (min_signal=-1) at mono-threads-posix-signals.c:54
#10 0x00000000006397cb in suspend_signal_get () at mono-threads-posix-signals.c:91
#11 0x0000000000639c25 in mono_threads_posix_init_signals (signals=signals@entry=MONO_THREADS_POSIX_INIT_SIGNALS_SUSPEND_RESTART) at mono-threads-posix-signals.c:261
#12 0x0000000000639727 in mono_threads_init_platform () at mono-threads-posix.c:346
#13 0x0000000000636ef6 in mono_threads_init (callbacks=callbacks@entry=0x7ffc679456c0, info_size=info_size@entry=1352) at mono-threads.c:640
#14 0x00000000005daec9 in sgen_client_init () at sgen-mono.c:2839
#15 0x00000000005f40c8 in sgen_gc_init () at sgen-gc.c:2822
#16 0x00000000005db1fe in mono_gc_base_init () at sgen-mono.c:2977
#17 0x00000000005ab019 in mono_init_internal (filename=filename@entry=0x7ffc67946037 "/home/lexa/src/UnrealEngine/Engine/Binaries/DotNET/UnrealBuildTool.exe", exe_filename=exe_filename@entry=0x7ffc67946037 "/home/lexa/src/UnrealEngine/Engine/Binaries/DotNET/UnrealBuildTool.exe", runtime_version=runtime_version@entry=0x0) at domain.c:515
#18 0x00000000005ac2f7 in mono_init_from_assembly (domain_name=domain_name@entry=0x7ffc67946037 "/home/lexa/src/UnrealEngine/Engine/Binaries/DotNET/UnrealBuildTool.exe", filename=filename@entry=0x7ffc67946037 "/home/lexa/src/UnrealEngine/Engine/Binaries/DotNET/UnrealBuildTool.exe") at domain.c:900
#19 0x0000000000427be6 in mini_init (filename=0x7ffc67946037 "/home/lexa/src/UnrealEngine/Engine/Binaries/DotNET/UnrealBuildTool.exe", runtime_version=runtime_version@entry=0x0) at mini-runtime.c:3602
#20 0x0000000000478e17 in mono_main (argc=12, argv=<optimized out>) at driver.c:2007
#21 0x0000000000421778 in mono_main_with_options (argv=0x7ffc67945ae8, argc=12) at main.c:20
#22 main (argc=<optimized out>, argv=<optimized out>) at main.c:53

This issue is not local to you, but right now I don’t have any clue either :frowning:

Could you check if executing the same call from a simple C program (via system()) will also cause the crash?

I tried system() and posix_spawn() (just like in engine) - it doesn’t crash

It might have something to do with inherited signal mask. We should probably extend posix_spawn operations to unblock the signals like SIGCHLD…

I believe the issue should be fixed with https://github.com/EpicGames/UnrealEngine/commit/9d26fa6700dc12750cbbb4e50e28af8598eeaed3 .