Bug 59205 - SIGSEGV in get_generic_info_from_stack_frame during exception handling
Summary: SIGSEGV in get_generic_info_from_stack_frame during exception handling
Status: CONFIRMED
Alias: None
Product: Runtime
Classification: Mono
Component: General (show other bugs)
Version: master
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-09-04 11:34 UTC by Bernhard Urban
Modified: 2017-09-21 19:16 UTC (History)
3 users (show)

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


Attachments

Description Bernhard Urban 2017-09-04 11:34:17 UTC
seems to be 32bit only.

Thread 2 (Thread 0xaef3d450 (LWP 27030)):
#0  0xb6e66544 in __libc_do_syscall () from /lib/arm-linux-gnueabihf/libpthread.so.0
#1  0xb6e65306 in waitpid () from /lib/arm-linux-gnueabihf/libpthread.so.0
#2  0x0009172e in mono_handle_native_crash (signal=signal@entry=0x1d2df4 "SIGSEGV", ctx=ctx@entry=0xaef3c0c0, info=info@entry=0xaef3c040) at mini-exceptions.c:2721
#3  0x00031d94 in mono_sigsegv_signal_handler (_dummy=11, _info=0xaef3c040, context=0xaef3c0c0) at mini-runtime.c:3126
#4  0xb6d66b00 in ?? () from /lib/arm-linux-gnueabihf/libc.so.6
#5  0x0008ebce in get_generic_info_from_stack_frame (ji=ji@entry=0x3d1480, ctx=ctx@entry=0xaef3c550) at mini-exceptions.c:730
#6  0x00090e96 in mono_handle_exception_internal_first_pass (non_exception=0x0, out_prev_ji=<synthetic pointer>, out_ji=<synthetic pointer>, out_filter_idx=<synthetic pointer>, obj=0xb68b1060, ctx=0xaef3c550) at mini-exceptions.c:1664
#7  mono_handle_exception_internal (ctx=ctx@entry=0xb38a2b70, obj=0xb68b1060, resume=resume@entry=0, out_ji=0x0) at mini-exceptions.c:1928
#8  0x00091484 in mono_handle_exception (ctx=ctx@entry=0xb38a2b70, obj=<optimized out>) at mini-exceptions.c:2283
#9  0x00091976 in mono_raise_exception_with_ctx (exc=<optimized out>, ctx=0xb38a2b70) at mini-exceptions.c:3092
#10 0xb4e92be4 in System_Threading_ExecutionContext_OnAsyncLocalContextChanged_System_Threading_ExecutionContext_System_Threading_ExecutionContext (previous=..., current=...) at /media/ssd/jenkins/workspace/test-mono-mainline-linux/label/debian-8-armhf/mcs/class/referencesource/mscorlib/system/threading/executioncontext.cs:749
#11 0xb4e93700 in System_Threading_ExecutionContext_SetExecutionContext_System_Threading_ExecutionContext_bool (executionContext=..., preserveSyncCtx=false) at /media/ssd/jenkins/workspace/test-mono-mainline-linux/label/debian-8-armhf/mcs/class/referencesource/mscorlib/system/threading/executioncontext.cs:1028
#12 0xb4e93328 in System_Threading_ExecutionContext_RunInternal_System_Threading_ExecutionContext_System_Threading_ContextCallback_object_bool (executionContext=..., callback=..., state=0xb68af490, preserveSyncCtx=false) at /media/ssd/jenkins/workspace/test-mono-mainline-linux/label/debian-8-armhf/mcs/class/referencesource/mscorlib/system/threading/executioncontext.cs:951
#13 0xb4e9311c in System_Threading_ExecutionContext_Run_System_Threading_ExecutionContext_System_Threading_ContextCallback_object_bool (executionContext=..., callback=..., state=0xb68af490, preserveSyncCtx=false) at /media/ssd/jenkins/workspace/test-mono-mainline-linux/label/debian-8-armhf/mcs/class/referencesource/mscorlib/system/threading/executioncontext.cs:904
#14 0xb4e93098 in System_Threading_ExecutionContext_Run_System_Threading_ExecutionContext_System_Threading_ContextCallback_object (executionContext=..., callback=..., state=0xb68af490) at /media/ssd/jenkins/workspace/test-mono-mainline-linux/label/debian-8-armhf/mcs/class/referencesource/mscorlib/system/threading/executioncontext.cs:893
#15 0xb4e96190 in System_Threading_ThreadHelper_ThreadStart (this=...) at /media/ssd/jenkins/workspace/test-mono-mainline-linux/label/debian-8-armhf/mcs/class/referencesource/mscorlib/system/threading/thread.cs:105
#16 0xb3eed544 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)


or


Thread 2 (Thread 0xb337b450 (LWP 30692)):
#0  0xb6eea544 in __libc_do_syscall () from /lib/arm-linux-gnueabihf/libpthread.so.0
#1  0xb6ee9306 in waitpid () from /lib/arm-linux-gnueabihf/libpthread.so.0
#2  0x0008c46a in mono_handle_native_crash (signal=signal@entry=0x1c296c "SIGSEGV", ctx=ctx@entry=0xb337a020, info=info@entry=0xb3379fa0) at mini-exceptions.c:2555
#3  0x0002cebc in mono_sigsegv_signal_handler (_dummy=11, _info=0xb3379fa0, context=0xb337a020) at mini-runtime.c:2884
#4  0xb6deab00 in ?? () from /lib/arm-linux-gnueabihf/libc.so.6
#5  0x00089b9e in get_generic_info_from_stack_frame (ji=ji@entry=0xb4233950, ctx=ctx@entry=0xb337a478) at mini-exceptions.c:680
#6  0x0008bebc in mono_handle_exception_internal_first_pass (non_exception=0x0, out_prev_ji=<synthetic pointer>, out_ji=<synthetic pointer>, out_filter_idx=<synthetic pointer>, obj=0xb69f3ea8, ctx=0xb337a478) at mini-exceptions.c:1554
#7  mono_handle_exception_internal (ctx=ctx@entry=0xb4202d78, obj=0xb69f3ea8, resume=resume@entry=0, out_ji=0x0) at mini-exceptions.c:1808
#8  0x0008c1c0 in mono_handle_exception (ctx=ctx@entry=0xb4202d78, obj=<optimized out>) at mini-exceptions.c:2117
#9  0x0008c6b2 in mono_raise_exception_with_ctx (exc=<optimized out>, ctx=0xb4202d78) at mini-exceptions.c:2953
#10 0xb50edfec in System_Collections_Generic_GenericEqualityComparer_1_T_REF_GetHashCode_T_REF (this=..., obj=-1228664424) at /media/ssd/jenkins/workspace/test-mono-pull-request-armhf/mcs/class/referencesource/mscorlib/system/collections/generic/equalitycomparer.cs:178
#11 0xb69f3e60 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)


looks like we try to access an invalid MonoObject (value type?).


@akoeplinger found the crash in those runs:

https://jenkins.mono-project.com/job/test-mono-mainline-2017-04/label=debian-8-armhf/133/
https://jenkins.mono-project.com/job/test-mono-mainline-2017-04/label=debian-8-armhf/134/
https://jenkins.mono-project.com/job/test-mono-mainline-aot/label=ubuntu-1404-i386/242/
https://jenkins.mono-project.com/job/test-mono-mainline-linux/label=debian-8-armhf/2951/
https://jenkins.mono-project.com/job/test-mono-pull-request-armel/7926/
https://jenkins.mono-project.com/job/test-mono-pull-request-armhf/7869/
https://jenkins.mono-project.com/job/test-mono-pull-request-armhf/7935/
https://jenkins.mono-project.com/job/test-mono-pull-request-armhf/8006/
https://jenkins.mono-project.com/job/test-mono-pull-request-armhf/8125/
https://jenkins.mono-project.com/job/test-mono-pull-request-i386/8361/

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