Bug 36848 - Frequent crash with XS master (roslyn enabled)
Summary: Frequent crash with XS master (roslyn enabled)
Status: RESOLVED FIXED
Alias: None
Product: Runtime
Classification: Mono
Component: Remoting (show other bugs)
Version: 4.2.0 (C6)
Hardware: PC Mac OS
: Normal major
Target Milestone: ---
Assignee: Andi McClure
URL:
Depends on:
Blocks:
 
Reported: 2015-12-10 19:26 UTC by Jérémie Laval
Modified: 2015-12-15 22:41 UTC (History)
3 users (show)

See Also:
Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Crash on tip of Mono 4.3.1 (97.67 KB, text/plain)
2015-12-11 14:41 UTC, Jérémie Laval
Details

Description Jérémie Laval 2015-12-10 19:26:23 UTC
Assertion at object.c:2189, condition 'vt' not met` (source line has a comment that says it needs to be fixed).

Full log/stacktrace: https://gist.github.com/garuma/164e025c549a80696e25

Mono JIT compiler version 4.2.1 (explicit/3ddba85 Mon Dec  7 17:52:50 EST 2015)
Comment 2 Andi McClure 2015-12-10 21:58:22 UTC
Manually built a 3ddba85, so far not able to reproduce. Still trying to figure out if my build options were the same.
Comment 3 Andi McClure 2015-12-10 22:28:09 UTC
Also not reproducing for me yet with the tarball Jérémie is running.
Comment 4 Jérémie Laval 2015-12-11 14:41:49 UTC
Created attachment 14249 [details]
Crash on tip of Mono 4.3.1
Comment 5 Andi McClure 2015-12-15 16:02:26 UTC
The problem here is ves_icall_Remoting_RealProxy_GetTransparentProxy . mono_remote_class_vtable expects the MonoRemoteClass it receives to be valid, and in particular, mono_class_proxy_vtable which it calls will assert if exception_type is set on the MonoRemoteClass's 'proxy_class' field. However ves_icall_Remoting_RealProxy_GetTransparentProxy can, with specific incorrect inputs, construct a MonoRemoteClass object with a bad proxy_class. I expect that either Xamarin Studio is passing in bad inputs of this type, or something is messed up with DLLs on Jeremie's computer.

The fix is for the icall to check before calling mono_remote_class_vtable if proxy_class failed and throw a nice managed exception. (This means things will still be failing on Jeremie's computer, but we will know why.)

(Note there is some question about whether we are handling this in the right place: there is a very old comment 'properly handle failure' on the mono_class_proxy_vtable assert, and Rodrigo was initially uncertain whether something in the icall should have been catching on the failure earlier.)
Comment 7 Andi McClure 2015-12-15 22:41:22 UTC
Pushed a commit to master and 4.3.1 that causes this failure to emit an exception instead of an assert crash.

Note You need to log in before you can comment on or make changes to this bug.