Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SIGSEGV in mono_class_setup_vtable_general #16712

Closed
rodrmoya opened this issue Sep 6, 2019 · 4 comments · Fixed by #16733

Comments

@rodrmoya
Copy link
Contributor

@rodrmoya rodrmoya commented Sep 6, 2019

Steps to Reproduce

We are getting feedback from some users about VS for Mac 8.3 Preview 3 (available on the "Preview" channel) is crashing on startup due to jit code in Mono.

Current Behavior

VS for Mac crashes on startup on native code.

Expected Behavior

No crash :D

On which platforms did you notice this

[x] macOS
[ ] Linux
[ ] Windows

Version Used:

From vsmac's log:

INFO [2019-08-19 12:17:33Z]: Starting Visual Studio 2019 for Mac (Preview) 8.3 Preview (8.3 build 1290)
INFO [2019-08-19 12:17:33Z]: Build Information
Release ID: 803001290
Git revision: 42b8de4ed6237a823e5795bf3d96d76f006c6a00
Build date: 2019-08-12 17:46:41+00
Build branch: release-8.3
Xamarin extensions: 9de44b711b40469c2e98c604b38b0ae33f2024a4

INFO [2019-08-19 12:17:33Z]: Running on Mono 6.4.0.165 (2019-06/a7919897e8b) (64-bit)
INFO [2019-08-19 12:17:33Z]: Operating System: Mac OS X 10.14.6
Darwin 18.7.0 Darwin Kernel Version 18.7.0
    Thu Jun 20 18:42:21 PDT 2019
    root:xnu-4903.270.47~4/RELEASE_X86_64 x86_64

Stacktrace

=================================================================
	Native Crash Reporting
=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.
=================================================================

=================================================================
	Native stacktrace:
=================================================================
	0x10521ba3b - /Library/Frameworks/Mono.framework/Libraries/libmonosgen-2.0.dylib : mono_dump_native_crash_info
	0x1051b48d5 - /Library/Frameworks/Mono.framework/Libraries/libmonosgen-2.0.dylib : mono_handle_native_crash
	0x105215bc7 - /Library/Frameworks/Mono.framework/Libraries/libmonosgen-2.0.dylib : altstack_handle_and_restore
	0x1052ae40d - /Library/Frameworks/Mono.framework/Libraries/libmonosgen-2.0.dylib : mono_class_setup_vtable_general
	0x1052acf72 - /Library/Frameworks/Mono.framework/Libraries/libmonosgen-2.0.dylib : mono_class_setup_vtable_full
	0x10532a8ce - /Library/Frameworks/Mono.framework/Libraries/libmonosgen-2.0.dylib : mono_class_vtable_checked
	0x10513c99c - /Library/Frameworks/Mono.framework/Libraries/libmonosgen-2.0.dylib : mono_method_to_ir
	0x105105a17 - /Library/Frameworks/Mono.framework/Libraries/libmonosgen-2.0.dylib : mini_method_compile
	0x105108630 - /Library/Frameworks/Mono.framework/Libraries/libmonosgen-2.0.dylib : mono_jit_compile_method_inner
	0x10510c4f9 - /Library/Frameworks/Mono.framework/Libraries/libmonosgen-2.0.dylib : mono_jit_compile_method_with_opt
	0x1051106d5 - /Library/Frameworks/Mono.framework/Libraries/libmonosgen-2.0.dylib : mini_init_delegate
	0x1053383b9 - /Library/Frameworks/Mono.framework/Libraries/libmonosgen-2.0.dylib : mono_delegate_ctor_with_method
	0x1052d0b00 - /Library/Frameworks/Mono.framework/Libraries/libmonosgen-2.0.dylib : ves_icall_System_Delegate_CreateDelegate_internal
	0x1052d74e8 - /Library/Frameworks/Mono.framework/Libraries/libmonosgen-2.0.dylib : ves_icall_System_Delegate_CreateDelegate_internal_raw
	0x10be135dd - Unknown
	0x11d0c9d53 - Unknown
	0x11d0c88d3 - Unknown

=================================================================
	Telemetry Dumper:
=================================================================
Pkilling 0x70000e658000 from 0x10bf905c0
Pkilling 0x70000f873000 from 0x10bf905c0
Pkilling 0x70000e455000 from 0x10bf905c0
Pkilling 0x70000f670000 from 0x10bf905c0
Pkilling 0x70000e252000 from 0x10bf905c0
Pkilling 0x70000f46d000 from 0x10bf905c0
Pkilling 0x700010114000 from 0x10bf905c0
Pkilling 0x70000e04f000 from 0x10bf905c0
Pkilling 0x70000f26a000 from 0x10bf905c0
Pkilling 0x70000ff11000 from 0x10bf905c0
Pkilling 0x70000de4c000 from 0x10bf905c0
Pkilling 0x70000f067000 from 0x10bf905c0
Pkilling 0x70000dc49000 from 0x10bf905c0
Pkilling 0x70000ee64000 from 0x10bf905c0
Pkilling 0x70000da46000 from 0x10bf905c0
Pkilling 0x70000ec61000 from 0x10bf905c0
Pkilling 0x70000d843000 from 0x10bf905c0
Pkilling 0x70000ea5e000 from 0x10bf905c0
Pkilling 0x70000d640000 from 0x10bf905c0
Pkilling 0x70000e85b000 from 0x10bf905c0
Pkilling 0x70000d43d000 from 0x10bf905c0
Pkilling 0x70000d134000 from 0x10bf905c0
Entering thread summarizer pause from 0x10bf905c0
Finished thread summarizer pause from 0x10bf905c0.

Waiting for dumping threads to resume
mono_os_sem_post: semaphore_signal failed with error 15* Assertion at threads.c:6553, condition `this_thread_controls == thread_given_control' not met
@lewing

This comment has been minimized.

Copy link
Member

@lewing lewing commented Sep 6, 2019

I can't reproduce after installing from "Preview" are there any other reproduction steps

@marek-safar marek-safar changed the title jit crash on mono 6.4 SIGSEGV in mono_class_setup_vtable_general Sep 6, 2019
@marek-safar

This comment has been minimized.

Copy link
Member

@marek-safar marek-safar commented Sep 6, 2019

@lambdageek is an expert on this but while he is away @vargaz @lewurm could you look for anything suspicious or think of how to make get more data for this

@marek-safar marek-safar added this to the 2019-08 (6.6.xx) milestone Sep 6, 2019
@marek-safar

This comment has been minimized.

Copy link
Member

@marek-safar marek-safar commented Sep 6, 2019

I can reproduce that with VS4M Preview 3 after installing TFS add-on (the last one in the list of extensions inside VS4M)

@marek-safar

This comment has been minimized.

Copy link
Member

@marek-safar marek-safar commented Sep 7, 2019

I think this crash was introduced when DIM re-abstraction landed in a81cc67 as part of #14790 (commented out on the specific line there).

@thaystg could you please address this ASAP as it's a regression.

thaystg added a commit to thaystg/mono that referenced this issue Sep 9, 2019
marek-safar added a commit that referenced this issue Sep 9, 2019
marek-safar added a commit that referenced this issue Sep 9, 2019
thaystg added a commit that referenced this issue Sep 9, 2019
Fixes #16712
jonpryor added a commit to xamarin/xamarin-android that referenced this issue Sep 27, 2019
jonpryor added a commit to xamarin/xamarin-android that referenced this issue Oct 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.