Search Issue Tracker

Fixed in 2020.1.X

Fixed in 2019.2.X, 2019.3.X

Votes

0

Found in

2018.1

Issue ID

1189077

Regression

Yes

Crash on Editor exit caused by race condition in Mono

Mono

-

There is a crash in Mono on editor exit ending up with this stacktrace:

#0 0x00000139f226a9 in mono_profiler_raise_thread_stopped
#1 0x00000139f29ecc in mono_thread_detach_internal
#2 0x00000139f2f1c0 in start_wrapper
#3 0x00000139fa3012 in GC_inner_start_routine
#4 0x00000139fa2fa7 in GC_start_routine
#5 0x007fff7064e305 in _pthread_body
#6 0x007fff7065126f in _pthread_start
#7 0x007fff7064d415 in thread_start

The crash happens periodically in our CI causing random failures in Katana and for the A2 production in Yamato. There is no easy way of reproducing it. The closest I got was to create a Bokken Mac VM and run all Editor tests on it. 3-4 projects would crash on every run that way.

Marc Di Luzio attempted a fix here: https://gitlab.cds.internal.unity3d.com/vm/mono/pipelines/64634 I tested it using the same Bokken VM idea on branch mono/test-locking-thread-profiler that contains a custom Mono build with his fix and I got no more crashes.

Full very long discussion started around July here: https://unity.slack.com/archives/C0E72RUEA/p1562948773237100

This crash is also affecting our users. We received a significant number of bugs about it, but QA was never able to reproduce any of them (due to the crash being very random and relatively rare).

Seems like the issue started around Unity 2018.1, so any fix for it would ideally be backported to at least 2018.4 LTS.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.