[merp] Initialize hang_watchdog_path earlier; be lax if it's missing (#16298)
commitfc21168065af270d1e500fa6be618f8563d0c525
authorAleksey Kliger (λgeek) <alklig@microsoft.com>
Wed, 28 Aug 2019 12:34:30 +0000 (28 08:34 -0400)
committerGitHub <noreply@github.com>
Wed, 28 Aug 2019 12:34:30 +0000 (28 08:34 -0400)
tree6409fb0d80df8e7714953c7e07f267e56a7a40c7
parent2ca04a9743ceab99714377180ba3b2b6d589ba7f
[merp] Initialize hang_watchdog_path earlier; be lax if it's missing (#16298)

* [merp] Initialize hang_watchdog_path earlier; be lax if it's missing

Initialize hang_watchdog_path earlier - not just when
ves_icall_Mono_Runtime_EnableCrashReportingLog is called.  That function is
only expected to be called by apps that explicitly want progress reports from
MERP when it's collecting a crash report.  But we want the mono-hang-watchdog
to execute for all mono crashes (when crash reporting isn't ifdef'd out).

Also if we try to exec mono-hang-watchdog and fail for some reason, print a
nice message and then exit.  We used to call g_assert_not_reached which would
kick off another MERP of the _forked child process_ which would then get
confused because it really can't run in the forked process at all.
mono/metadata/icall.c
mono/metadata/threads-types.h
mono/metadata/threads.c
mono/mini/mini-posix.c