Bug 56694

Summary: Assertion: should not be reached at d:\j\workspace\v\repos\mono\mono\sgen\sgen-scan-object.h:91
Product: [Mono] Runtime Reporter: Kirill Osenkov <kirill.osenkov>
Component: GCAssignee: Aleksey Kliger <aleksey>
Severity: normal CC: aleksey, mono-bugs+mono, mono-bugs+runtime, v-alokul
Priority: Normal    
Version: unspecified   
Target Milestone: 15.3   
Hardware: PC   
OS: Windows   
Tags: Is this bug a regression?: ---
Last known good build:
Attachments: Logs

Description Kirill Osenkov 2017-05-19 23:57:03 UTC
git clone https://github.com/KirillOsenkov/MonoRepro

Build and run the exe (at least on Windows)

C:\MonoRepro\CrashMono\bin\Debug>mono crashmono.exe
* Assertion: should not be reached at d:\j\workspace\v\repos\mono\mono\sgen\sgen-scan-object.h:91

Unhandled exception at 0x75B7543B (ucrtbase.dll) in mono.exe: Fatal program exit requested. occurred

>	abort Line 77	C++
 	mono_log_write_logfile Line 136	C
 	structured_log_adapter Line 432	C
 	monoeg_g_logv Line 116	C
 	monoeg_assertion_message Line 135	C
 	major_scan_object_no_evacuation Line 91	C
 	drain_gray_stack_no_evacuation Line 345	C
 	[Inline Frame] sgen_drain_gray_stack Line 515	C
 	finish_gray_stack Line 1065	C
 	major_finish_collection Line 2033	C
 	major_do_collection Line 2160	C
 	sgen_perform_collection Line 2356	C
 	sgen_gc_collect Line 2866	C
 	unload_thread_main Line 2569	C
 	start_wrapper_internal Line 830	C
 	start_wrapper Line 893	C
 	BaseThreadInitThunk Line 64	C
 	__RtlUserThreadStart Line 997	C
 	_RtlUserThreadStart Line 914	C
Comment 2 Kirill Osenkov 2017-05-22 23:24:05 UTC
Confirmed repro on Mac as well
Comment 3 Aleksey Kliger 2017-05-23 21:24:24 UTC
We're leaking a MonoReflectionAssemblyHandle.  Thanks Vlad and Rodrigo for tracking it down.
Comment 5 Alok Kulkarni 2017-07-14 06:50:32 UTC
Created attachment 23549 [details]

Verified on Build Xamarin 15.3 :
Build info : https://gist.github.com/alok-kulkarni/1ce9eeb3fdd99d11fc711672e6da0adf
Screencast :  http://www.screencast.com/t/I0Mj2VnJUf

Hence marking verified fixed to this bug.