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
Closed

SIGSEGV in mono_class_setup_vtable_general #16712

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

Comments

@rodrmoya
Copy link
Contributor

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
Copy link
Member

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
Copy link
Member

@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
Copy link
Member

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
Copy link
Member

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
jonpryor added a commit to dotnet/android that referenced this issue Sep 27, 2019
jonpryor added a commit to dotnet/android that referenced this issue Oct 1, 2019
jonpryor pushed a commit to dotnet/android that referenced this issue Dec 3, 2019
Changes: mono/api-snapshot@fc50bc4...45a61d9

        $ git diff --shortstat fc50bc4f...45a61d93
         22 files changed, 775 insertions(+), 474 deletions(-)

Changes: dotnet/cecil@a6c8f5e...a6a7f5c

        $ git diff --shortstat a6c8f5e1...a6a7f5c0
         55 files changed, 818 insertions(+), 530 deletions(-)

Changes: mono/corefx@1f87de3...49f1c45

        $ git diff --shortstat e4f7102b...49f1c453
         38 files changed, 1171 insertions(+), 419 deletions(-)

Changes: dotnet/linker@ebe2a1f...e8d054b

        $ git diff --shortstat ebe2a1f4...e8d054bf
         137 files changed, 5360 insertions(+), 1781 deletions(-)

Changes: mono/mono@8946e49...18920a8

        $ git diff --shortstat 8946e49a...18920a83
         1811 files changed, 47240 insertions(+), 48331 deletions(-)

Changes: xamarin/xamarin-android-api-compatibility@a61271e...50a3c52

        $ git diff --shortstat a61271e0...50a3c52d
         1 file changed, 2 insertions(+), 791 deletions(-)

Fixes: #3619

Context: https://dev.azure.com/devdiv/DevDiv/_workitems/edit/1005448
Context: https://devdiv.visualstudio.com/DefaultCollection/DevDiv/_workitems/edit/967582
Context: https://github.com/dotnet/coreclr/issues/26370
Context: https://github.com/dotnet/coreclr/issues/26479
Context: https://github.com/dotnet/corefx/issues/40455
Context: https://github.com/dotnet/corefx/issues/40578
Context: mono/mono#7377
Context: mono/mono#12421
Context: mono/mono#12586
Context: mono/mono#14080
Context: mono/mono#14725
Context: mono/mono#14772
Context: mono/mono#15261
Context: mono/mono#15262
Context: mono/mono#15263
Context: mono/mono#15307
Context: mono/mono#15308
Context: mono/mono#15310
Context: mono/mono#15646
Context: mono/mono#15687
Context: mono/mono#15805
Context: mono/mono#15992
Context: mono/mono#15994
Context: mono/mono#15999
Context: mono/mono#16032
Context: mono/mono#16034
Context: mono/mono#16046
Context: mono/mono#16192
Context: mono/mono#16308
Context: mono/mono#16310
Context: mono/mono#16369
Context: mono/mono#16380
Context: mono/mono#16381
Context: mono/mono#16395
Context: mono/mono#16411
Context: mono/mono#16415
Context: mono/mono#16486
Context: mono/mono#16570
Context: mono/mono#16605
Context: mono/mono#16616
Context: mono/mono#16689
Context: mono/mono#16701
Context: mono/mono#16712
Context: mono/mono#16742
Context: mono/mono#16759
Context: mono/mono#16803
Context: mono/mono#16808
Context: mono/mono#16824
Context: mono/mono#16876
Context: mono/mono#16879
Context: mono/mono#16918
Context: mono/mono#16943
Context: mono/mono#16950
Context: mono/mono#16974
Context: mono/mono#17004
Context: mono/mono#17017
Context: mono/mono#17038
Context: mono/mono#17040
Context: mono/mono#17083
Context: mono/mono#17084
Context: mono/mono#17133
Context: mono/mono#17139
Context: mono/mono#17151
Context: mono/mono#17180
Context: mono/mono#17278
Context: mono/mono#17549
Context: mono/mono#17569
Context: mono/mono#17665
Context: mono/mono#17687
Context: mono/mono#17737
Context: mono/mono#17790
Context: mono/mono#17924
Context: mono/mono#17931
Context: https://github.com/mono/mono/issues/26758
Context: https://github.com/mono/mono/issues/37913
Context: xamarin/xamarin-macios#7005
jonpryor pushed a commit to dotnet/android that referenced this issue Dec 3, 2019
Changes: mono/api-snapshot@fc50bc4...45a61d9

        $ git diff --shortstat fc50bc4f...45a61d93
         22 files changed, 775 insertions(+), 474 deletions(-)

Changes: dotnet/cecil@a6c8f5e...a6a7f5c

        $ git diff --shortstat a6c8f5e1...a6a7f5c0
         55 files changed, 818 insertions(+), 530 deletions(-)

Changes: mono/corefx@1f87de3...49f1c45

        $ git diff --shortstat e4f7102b...49f1c453
         38 files changed, 1171 insertions(+), 419 deletions(-)

Changes: dotnet/linker@ebe2a1f...e8d054b

        $ git diff --shortstat ebe2a1f4...e8d054bf
         137 files changed, 5360 insertions(+), 1781 deletions(-)

Changes: mono/mono@8946e49...18920a8

        $ git diff --shortstat 8946e49a...18920a83
         1811 files changed, 47240 insertions(+), 48331 deletions(-)

Changes: xamarin/xamarin-android-api-compatibility@a61271e...50a3c52

        $ git diff --shortstat a61271e0...50a3c52d
         1 file changed, 2 insertions(+), 791 deletions(-)

Fixes: #3619

Context: https://dev.azure.com/devdiv/DevDiv/_workitems/edit/1005448
Context: https://devdiv.visualstudio.com/DefaultCollection/DevDiv/_workitems/edit/967582
Context: https://github.com/dotnet/coreclr/issues/26370
Context: https://github.com/dotnet/coreclr/issues/26479
Context: https://github.com/dotnet/corefx/issues/40455
Context: https://github.com/dotnet/corefx/issues/40578
Context: mono/mono#7377
Context: mono/mono#12421
Context: mono/mono#12586
Context: mono/mono#14080
Context: mono/mono#14725
Context: mono/mono#14772
Context: mono/mono#15261
Context: mono/mono#15262
Context: mono/mono#15263
Context: mono/mono#15307
Context: mono/mono#15308
Context: mono/mono#15310
Context: mono/mono#15646
Context: mono/mono#15687
Context: mono/mono#15805
Context: mono/mono#15992
Context: mono/mono#15994
Context: mono/mono#15999
Context: mono/mono#16032
Context: mono/mono#16034
Context: mono/mono#16046
Context: mono/mono#16192
Context: mono/mono#16308
Context: mono/mono#16310
Context: mono/mono#16369
Context: mono/mono#16380
Context: mono/mono#16381
Context: mono/mono#16395
Context: mono/mono#16411
Context: mono/mono#16415
Context: mono/mono#16486
Context: mono/mono#16570
Context: mono/mono#16605
Context: mono/mono#16616
Context: mono/mono#16689
Context: mono/mono#16701
Context: mono/mono#16712
Context: mono/mono#16742
Context: mono/mono#16759
Context: mono/mono#16803
Context: mono/mono#16808
Context: mono/mono#16824
Context: mono/mono#16876
Context: mono/mono#16879
Context: mono/mono#16918
Context: mono/mono#16943
Context: mono/mono#16950
Context: mono/mono#16974
Context: mono/mono#17004
Context: mono/mono#17017
Context: mono/mono#17038
Context: mono/mono#17040
Context: mono/mono#17083
Context: mono/mono#17084
Context: mono/mono#17133
Context: mono/mono#17139
Context: mono/mono#17151
Context: mono/mono#17180
Context: mono/mono#17278
Context: mono/mono#17549
Context: mono/mono#17569
Context: mono/mono#17665
Context: mono/mono#17687
Context: mono/mono#17737
Context: mono/mono#17790
Context: mono/mono#17924
Context: mono/mono#17931
Context: https://github.com/mono/mono/issues/26758
Context: https://github.com/mono/mono/issues/37913
Context: xamarin/xamarin-macios#7005
ManickaP pushed a commit to ManickaP/runtime that referenced this issue Jan 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants