Bug 41942 - SEGFAULT on bitcode of generics-sharing2.exe
Summary: SEGFAULT on bitcode of generics-sharing2.exe
Status: RESOLVED FIXED
Alias: None
Product: Runtime
Classification: Mono
Component: JIT ()
Version: 4.5.X
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Alexander Kyte
URL:
Depends on:
Blocks:
 
Reported: 2016-06-17 17:15 UTC by Alexander Kyte
Modified: 2016-07-01 00:56 UTC (History)
3 users (show)

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

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Alexander Kyte 2016-06-17 17:15:07 UTC
This test hits a signal handler during execution with the bitcode backend:

generics-sharing.2.exe
=============== generics-sharing.2.exe.stdout ===============

=============== EOF ===============
=============== generics-sharing.2.exe.stderr ===============
Stacktrace:


Native stacktrace:


Debug info from gdb:

[New Thread 0x1303 of process 63847]
[New Thread 0x1403 of process 63847]
[New Thread 0x1503 of process 63847]
[New Thread 0x1603 of process 63847]
warning: `/Library/Caches/com.apple.xbs/Binaries/Metal/Metal-55.2.8~2/Objects/Metal.build/Framework.build/Objects-normal/x86_64/MTLArgument.o': can't open to read symbols: No such file or directory.
warning: `/Library/Caches/com.apple.xbs/Binaries/Metal/Metal-55.2.8~2/Objects/Metal.build/Framework.build/Objects-normal/x86_64/MTLCommandBuffer.o': can't open to read symbols: No such file or directory.
warning: `/Library/Caches/com.apple.xbs/Binaries/Metal/Metal-55.2.8~2/Objects/Metal.build/Framework.build/Objects-normal/x86_64/MTLCommandEncoder.o': can't open to read symbols: No such file or directory.
warning: `/Library/Caches/com.apple.xbs/Binaries/Metal/Metal-55.2.8~2/Objects/Metal.build/Framework.build/Objects-normal/x86_64/MTLCommandQueue.o': can't open to read symbols: No such file or directory.
warning: `/Library/Caches/com.apple.xbs/Binaries/Metal/Metal-55.2.8~2/Objects/Metal.build/Framework.build/Objects-normal/x86_64/MTLCompilerCache.o': can't open to read symbols: No such file or directory.
warning: `/Library/Caches/com.apple.xbs/Binaries/Metal/Metal-55.2.8~2/Objects/Metal.build/Framework.build/Objects-normal/x86_64/MTLCompilerConnection.o': can't open to read symbols: No such file or directory.
warning: `/Library/Caches/com.apple.xbs/Binaries/Metal/Metal-55.2.8~2/Objects/Metal.build/Framework.build/Objects-normal/x86_64/MTLComputePipeline.o': can't open to read symbols: No such file or directory.
warning: `/Library/Caches/com.apple.xbs/Binaries/Metal/Metal-55.2.8~2/Objects/Metal.build/Framework.build/Objects-normal/x86_64/MTLDebug.o': can't open to read symbols: No such file or directory.
warning: `/Library/Caches/com.apple.xbs/Binaries/Metal/Metal-55.2.8~2/Objects/Metal.build/Framework.build/Objects-normal/x86_64/MTLDebugCommandEncoder.o': can't open to read symbols: No such file or directory.
warning: `/Library/Caches/com.apple.xbs/Binaries/Metal/Metal-55.2.8~2/Objects/Metal.build/Framework.build/Objects-normal/x86_64/MTLDepthStencil.o': can't open to read symbols: No such file or directory.
warning: `/Library/Caches/com.apple.xbs/Binaries/Metal/Metal-55.2.8~2/Objects/Metal.build/Framework.build/Objects-normal/x86_64/MTLDevice.o': can't open to read symbols: No such file or directory.
warning: `/Library/Caches/com.apple.xbs/Binaries/Metal/Metal-55.2.8~2/Objects/Metal.build/Framework.build/Objects-normal/x86_64/MTLIOAccelBlitCommandEncoder.o': can't open to read symbols: No such file or directory.
warning: `/Library/Caches/com.apple.xbs/Binaries/Metal/Metal-55.2.8~2/Objects/Metal.build/Framework.build/Objects-normal/x86_64/MTLIOAccelBuffer.o': can't open to read symbols: No such file or directory.
warning: `/Library/Caches/com.apple.xbs/Binaries/Metal/Metal-55.2.8~2/Objects/Metal.build/Framework.build/Objects-normal/x86_64/MTLIOAccelCommandBuffer.o': can't open to read symbols: No such file or directory.
warning: `/Library/Caches/com.apple.xbs/Binaries/Metal/Metal-55.2.8~2/Objects/Metal.build/Framework.build/Objects-normal/x86_64/MTLIOAccelCommandBufferStorage.o': can't open to read symbols: No such file or directory.
warning: `/Library/Caches/com.apple.xbs/Binaries/Metal/Metal-55.2.8~2/Objects/Metal.build/Framework.build/Objects-normal/x86_64/MTLIOAccelCommandEncoder.o': can't open to read symbols: No such file or directory.
warning: `/Library/Caches/com.apple.xbs/Binaries/Metal/Metal-55.2.8~2/Objects/Metal.build/Framework.build/Objects-normal/x86_64/MTLIOAccelCommandQueue.o': can't open to read symbols: No such file or directory.
warning: `/Library/Caches/com.apple.xbs/Binaries/Metal/Metal-55.2.8~2/Objects/Metal.build/Framework.build/Objects-normal/x86_64/MTLIOAccelComputeCommandEncoder.o': can't open to read symbols: No such file or directory.
warning: `/Library/Caches/com.apple.xbs/Binaries/Metal/Metal-55.2.8~2/Objects/Metal.build/Framework.build/Objects-normal/x86_64/MTLIOAccelDebugCommandEncoder.o': can't open to read symbols: No such file or directory.
warning: `/Library/Caches/com.apple.xbs/Binaries/Metal/Metal-55.2.8~2/Objects/Metal.build/Framework.build/Objects-normal/x86_64/MTLIOAccelDevice.o': can't open to read symbols: No such file or directory.
warning: `/Library/Caches/com.apple.xbs/Binaries/Metal/Metal-55.2.8~2/Objects/Metal.build/Framework.build/Objects-normal/x86_64/MTLIOAccelDeviceShmem.o': can't open to read symbols: No such file or directory.
warning: `/Library/Caches/com.apple.xbs/Binaries/Metal/Metal-55.2.8~2/Objects/Metal.build/Framework.build/Objects-normal/x86_64/MTLIOAccelDeviceShmemPool.o': can't open to read symbols: No such file or directory.
warning: `/Library/Caches/com.apple.xbs/Binaries/Metal/Metal-55.2.8~2/Objects/Metal.build/Framework.build/Objects-normal/x86_64/MTLIOAccelError.o': can't open to read symbols: No such file or directory.
warning: `/Library/Caches/com.apple.xbs/Binaries/Metal/Metal-55.2.8~2/Objects/Metal.build/Framework.build/Objects-normal/x86_64/MTLIOAccelMemoryInfo.o': can't open to read symbols: No such file or directory.
warning: `/Library/Caches/com.apple.xbs/Binaries/Metal/Metal-55.2.8~2/Objects/Metal.build/Framework.build/Objects-normal/x86_64/MTLIOAccelParallelRenderCommandEncoder.o': can't open to read symbols: No such file or directory.
warning: `/Library/Caches/com.apple.xbs/Binaries/Metal/Metal-55.2.8~2/Objects/Metal.build/Framework.build/Objects-normal/x86_64/MTLIOAccelPooledResource.o': can't open to read symbols: No such file or directory.
warning: `/Library/Caches/com.apple.xbs/Binaries/Metal/Metal-55.2.8~2/Objects/Metal.build/Framework.build/Objects-normal/x86_64/MTLIOAccelRenderCommandEncoder.o': can't open to read symbols: No such file or directory.
warning: `/Library/Caches/com.apple.xbs/Binaries/Metal/Metal-55.2.8~2/Objects/Metal.build/Framework.build/Objects-normal/x86_64/MTLIOAccelResource.o': can't open to read symbols: No such file or directory.
warning: `/Library/Caches/com.apple.xbs/Binaries/Metal/Metal-55.2.8~2/Objects/Metal.build/Framework.build/Objects-normal/x86_64/MTLIOAccelResourcePool.o': can't open to read symbols: No such file or directory.
warning: `/Library/Caches/com.apple.xbs/Binaries/Metal/Metal-55.2.8~2/Objects/Metal.build/Framework.build/Objects-normal/x86_64/MTLIOAccelTexture.o': can't open to read symbols: No such file or directory.
warning: `/Library/Caches/com.apple.xbs/Binaries/Metal/Metal-55.2.8~2/Objects/Metal.build/Framework.build/Objects-normal/x86_64/MTLLibrary.o': can't open to read symbols: No such file or directory.
warning: `/Library/Caches/com.apple.xbs/Binaries/Metal/Metal-55.2.8~2/Objects/Metal.build/Framework.build/Objects-normal/x86_64/MTLOpenGL.o': can't open to read symbols: No such file or directory.
warning: `/Library/Caches/com.apple.xbs/Binaries/Metal/Metal-55.2.8~2/Objects/Metal.build/Framework.build/Objects-normal/x86_64/MTLParallelRenderCommandEncoder.o': can't open to read symbols: No such file or directory.
warning: `/Library/Caches/com.apple.xbs/Binaries/Metal/Metal-55.2.8~2/Objects/Metal.build/Framework.build/Objects-normal/x86_64/MTLPixelFormat.o': can't open to read symbols: No such file or directory.
warning: `/Library/Caches/com.apple.xbs/Binaries/Metal/Metal-55.2.8~2/Objects/Metal.build/Framework.build/Objects-normal/x86_64/MTLRangeAllocator.o': can't open to read symbols: No such file or directory.
warning: `/Library/Caches/com.apple.xbs/Binaries/Metal/Metal-55.2.8~2/Objects/Metal.build/Framework.build/Objects-normal/x86_64/MTLReflection.o': can't open to read symbols: No such file or directory.
warning: `/Library/Caches/com.apple.xbs/Binaries/Metal/Metal-55.2.8~2/Objects/Metal.build/Framework.build/Objects-normal/x86_64/MTLRenderPass.o': can't open to read symbols: No such file or directory.
warning: `/Library/Caches/com.apple.xbs/Binaries/Metal/Metal-55.2.8~2/Objects/Metal.build/Framework.build/Objects-normal/x86_64/MTLRenderPipeline.o': can't open to read symbols: No such file or directory.
warning: `/Library/Caches/com.apple.xbs/Binaries/Metal/Metal-55.2.8~2/Objects/Metal.build/Framework.build/Objects-normal/x86_64/MTLResource.o': can't open to read symbols: No such file or directory.
warning: `/Library/Caches/com.apple.xbs/Binaries/Metal/Metal-55.2.8~2/Objects/Metal.build/Framework.build/Objects-normal/x86_64/MTLResourceList.o': can't open to read symbols: No such file or directory.
warning: `/Library/Caches/com.apple.xbs/Binaries/Metal/Metal-55.2.8~2/Objects/Metal.build/Framework.build/Objects-normal/x86_64/MTLResourceListPool.o': can't open to read symbols: No such file or directory.
warning: `/Library/Caches/com.apple.xbs/Binaries/Metal/Metal-55.2.8~2/Objects/Metal.build/Framework.build/Objects-normal/x86_64/MTLSampler.o': can't open to read symbols: No such file or directory.
warning: `/Library/Caches/com.apple.xbs/Binaries/Metal/Metal-55.2.8~2/Objects/Metal.build/Framework.build/Objects-normal/x86_64/MTLStatistics.o': can't open to read symbols: No such file or directory.
warning: `/Library/Caches/com.apple.xbs/Binaries/Metal/Metal-55.2.8~2/Objects/Metal.build/Framework.build/Objects-normal/x86_64/MTLTexture.o': can't open to read symbols: No such file or directory.
warning: `/Library/Caches/com.apple.xbs/Binaries/Metal/Metal-55.2.8~2/Objects/Metal.build/Framework.build/Objects-normal/x86_64/MTLVertexDescriptor.o': can't open to read symbols: No such file or directory.
0x00007fff9cedd67e in ?? () from /usr/lib/system/libsystem_kernel.dylib
  Id   Target Id         Frame
  5    Thread 0x1603 of process 63847 0x00007fff9ceddff6 in ?? () from /usr/lib/system/libsystem_kernel.dylib
  4    Thread 0x1503 of process 63847 0x00007fff9cedd6de in ?? () from /usr/lib/system/libsystem_kernel.dylib
  3    Thread 0x1403 of process 63847 0x00007fff9ced73c2 in sExifIFDMappings () from /usr/lib/system/libsystem_kernel.dylib
  2    Thread 0x1303 of process 63847 0x00007fff9cedceb2 in ?? () from /usr/lib/system/libsystem_kernel.dylib
* 1    Thread 0x1203 of process 63847 0x00007fff9cedd67e in ?? () from /usr/lib/system/libsystem_kernel.dylib

Thread 5 (Thread 0x1603 of process 63847):
  Id   Target Id         Frame
* 5    Thread 0x1603 of process 63847 0x00007fff9ceddff6 in ?? () from /usr/lib/system/libsystem_kernel.dylib
  4    Thread 0x1503 of process 63847 0x00007fff9cedd6de in ?? () from /usr/lib/system/libsystem_kernel.dylib
  3    Thread 0x1403 of process 63847 0x00007fff9ced73c2 in sExifIFDMappings () from /usr/lib/system/libsystem_kernel.dylib
  2    Thread 0x1303 of process 63847 0x00007fff9cedceb2 in ?? () from /usr/lib/system/libsystem_kernel.dylib
  1    Thread 0x1203 of process 63847 0x00007fff9cedd67e in ?? () from /usr/lib/system/libsystem_kernel.dylib

Thread 4 (Thread 0x1503 of process 63847):
  Id   Target Id         Frame
  5    Thread 0x1603 of process 63847 0x00007fff9ceddff6 in ?? () from /usr/lib/system/libsystem_kernel.dylib
* 4    Thread 0x1503 of process 63847 0x00007fff9cedd6de in ?? () from /usr/lib/system/libsystem_kernel.dylib
  3    Thread 0x1403 of process 63847 0x00007fff9ced73c2 in sExifIFDMappings () from /usr/lib/system/libsystem_kernel.dylib
  2    Thread 0x1303 of process 63847 0x00007fff9cedceb2 in ?? () from /usr/lib/system/libsystem_kernel.dylib
  1    Thread 0x1203 of process 63847 0x00007fff9cedd67e in ?? () from /usr/lib/system/libsystem_kernel.dylib

Thread 3 (Thread 0x1403 of process 63847):
  Id   Target Id         Frame
  5    Thread 0x1603 of process 63847 0x00007fff9ceddff6 in ?? () from /usr/lib/system/libsystem_kernel.dylib
  4    Thread 0x1503 of process 63847 0x00007fff9cedd6de in ?? () from /usr/lib/system/libsystem_kernel.dylib
* 3    Thread 0x1403 of process 63847 0x00007fff9ced73c2 in sExifIFDMappings () from /usr/lib/system/libsystem_kernel.dylib
  2    Thread 0x1303 of process 63847 0x00007fff9cedceb2 in ?? () from /usr/lib/system/libsystem_kernel.dylib
  1    Thread 0x1203 of process 63847 0x00007fff9cedd67e in ?? () from /usr/lib/system/libsystem_kernel.dylib

Thread 2 (Thread 0x1303 of process 63847):
  Id   Target Id         Frame
  5    Thread 0x1603 of process 63847 0x00007fff9ceddff6 in ?? () from /usr/lib/system/libsystem_kernel.dylib
  4    Thread 0x1503 of process 63847 0x00007fff9cedd6de in ?? () from /usr/lib/system/libsystem_kernel.dylib
  3    Thread 0x1403 of process 63847 0x00007fff9ced73c2 in sExifIFDMappings () from /usr/lib/system/libsystem_kernel.dylib
* 2    Thread 0x1303 of process 63847 0x00007fff9cedceb2 in ?? () from /usr/lib/system/libsystem_kernel.dylib
  1    Thread 0x1203 of process 63847 0x00007fff9cedd67e in ?? () from /usr/lib/system/libsystem_kernel.dylib

Thread 1 (Thread 0x1203 of process 63847):
  Id   Target Id         Frame
  5    Thread 0x1603 of process 63847 0x00007fff9ceddff6 in ?? () from /usr/lib/system/libsystem_kernel.dylib
  4    Thread 0x1503 of process 63847 0x00007fff9cedd6de in ?? () from /usr/lib/system/libsystem_kernel.dylib
  3    Thread 0x1403 of process 63847 0x00007fff9ced73c2 in sExifIFDMappings () from /usr/lib/system/libsystem_kernel.dylib
  2    Thread 0x1303 of process 63847 0x00007fff9cedceb2 in ?? () from /usr/lib/system/libsystem_kernel.dylib
* 1    Thread 0x1203 of process 63847 0x00007fff9cedd67e in ?? () from /usr/lib/system/libsystem_kernel.dylib

Thread 5 (Thread 0x1603 of process 63847):
#0  0x00007fff9ceddff6 in ?? () from /usr/lib/system/libsystem_kernel.dylib
#1  0x00007fff8e893099 in ?? () from /usr/lib/system/libdispatch.dylib
#2  0x0000000000000000 in ?? ()

Thread 4 (Thread 0x1503 of process 63847):
#0  0x00007fff9cedd6de in ?? () from /usr/lib/system/libsystem_kernel.dylib
#1  0x00007fff9bc40729 in __block_descriptor_tmp28 () from /usr/lib/system/libsystem_pthread.dylib
#2  0x0001000000000000 in ?? ()
#3  0x0000000000000000 in ?? ()

Thread 3 (Thread 0x1403 of process 63847):
#0  0x00007fff9ced73c2 in sExifIFDMappings () from /usr/lib/system/libsystem_kernel.dylib
#1  0x000000010651c8aa in mono_os_sem_wait (sem=0x10711fbf0, flags=MONO_SEM_FLAGS_ALERTABLE) at ../../mono/utils/mono-os-semaphore.h:72
#2  0x000000010651c598 in mono_coop_sem_wait (sem=0x10711fbf0, flags=MONO_SEM_FLAGS_ALERTABLE) at ../../mono/utils/mono-coop-semaphore.h:40
#3  0x000000010651c3b3 in finalizer_thread (unused=0x0) at gc.c:767
#4  0x00000001064e176b in start_wrapper_internal (data=0x7fe153f04550) at threads.c:740
#5  0x00000001064e13e1 in start_wrapper (data=0x7fe153f04550) at threads.c:788
#6  0x00000001066258ef in inner_start_thread (arg=0x7fff59a4fc90) at mono-threads-posix.c:92
#7  0x00007fff9bc40c13 in ?? () from /usr/lib/system/libsystem_pthread.dylib
#8  0x0000000000001303 in ?? ()
#9  0x0000700000284000 in ?? ()
#10 0x0000700000283f50 in ?? ()
#11 0x00007fff9bc40b90 in ?? () from /usr/lib/system/libsystem_pthread.dylib
#12 0x0000000000000000 in ?? ()

Thread 2 (Thread 0x1303 of process 63847):
#0  0x00007fff9cedceb2 in ?? () from /usr/lib/system/libsystem_kernel.dylib
#1  0x00007fff9bc41150 in ?? () from /usr/lib/system/libsystem_pthread.dylib
#2  0x0000000000000000 in ?? ()

Thread 1 (Thread 0x1203 of process 63847):
#0  0x00007fff9cedd67e in ?? () from /usr/lib/system/libsystem_kernel.dylib
#1  0x00000001062ef0d2 in mono_handle_native_sigsegv (signal=11, ctx=0x1077faf48, info=0x1077faee0) at mini-exceptions.c:2458
#2  0x00000001063e08dd in mono_arch_handle_altstack_exception (sigctx=0x1077faf48, siginfo=0x1077faee0, fault_addr=0x7fe154087380, stack_ovf=0) at exceptions-amd64.c:795
#3  0x00000001061c6e22 in mono_sigsegv_signal_handler (_dummy=10, _info=0x1077faee0, context=0x1077faf48) at mini-runtime.c:2862
#4  <signal handler called>
#5  0x00007fe154087381 in ?? ()
#6  0x0000000109cde54f in GenericSharingTest_GenA_1_T_REF_makeNullable_object () from /Users/akyte/mono/mono/tests/generics-sharing.2.exe.dylib
#7  0x0000000109ce11b1 in GenericSharingTest_main_work_T_REF_T_REF_bool () from /Users/akyte/mono/mono/tests/generics-sharing.2.exe.dylib
#8  0x0000000109ce2bea in GenericSharingTest_main_Main () from /Users/akyte/mono/mono/tests/generics-sharing.2.exe.dylib
#9  0x000000010967ae8f in wrapper_unknown_object_gsharedvt_out_sig_intptr_intptr_2 () from /Users/akyte/mono/mcs/class/lib/mobile_static/mscorlib.dll.dylib
#10 0x000000010965cfd2 in wrapper_runtime_invoke_object_runtime_invoke_sig_void_intptr_intptr_object_intptr_intptr_intptr () from /Users/akyte/mono/mcs/class/lib/mobile_static/mscorlib.dll.dylib
#11 0x00000001061ccb06 in mono_llvmonly_runtime_invoke (method=0x7fe153c11a78, info=0x7fe153f0cc40, obj=0x0, params=0x7fff59a4ffb0, exc=0x7fff59a50050, error=0x7fff59a4ff28) at mini-runtime.c:2350
#12 0x00000001061c9110 in mono_jit_runtime_invoke (method=0x7fe153c11a78, obj=0x0, params=0x7fff59a4ffb0, exc=0x7fff59a50050, error=0x7fff59a4ff28) at mini-runtime.c:2541
#13 0x00000001065276f1 in do_runtime_invoke (method=0x7fe153c11a78, obj=0x0, params=0x7fff59a4ffb0, exc=0x7fff59a50050, error=0x7fff59a4ff28) at object.c:2949
#14 0x0000000106521b33 in mono_runtime_try_invoke (method=0x7fe153c11a78, obj=0x0, params=0x7fff59a4ffb0, exc=0x7fff59a50050, error=0x7fff59a4ff28) at object.c:3060
#15 0x000000010652b7ce in do_try_exec_main (method=0x7fe153c11a78, args=0x107800400, exc=0x7fff59a50050) at object.c:4801
#16 0x000000010652a2d9 in mono_runtime_try_exec_main (method=0x7fe153c11a78, args=0x107800400, exc=0x7fff59a50050) at object.c:4880
#17 0x000000010652a412 in mono_runtime_try_run_main (method=0x7fe153c11a78, argc=1, argv=0x7fff59a504c8, exc=0x7fff59a50050) at object.c:4343
#18 0x00000001062a51ee in mono_jit_exec (domain=0x7fe153c10400, assembly=0x7fe153d02820, argc=1, argv=0x7fff59a504c8) at driver.c:1032
#19 0x00000001062a8f40 in main_thread_handler (user_data=0x7fff59a503f0) at driver.c:1106
#20 0x00000001062a77f4 in mono_main (argc=5, argv=0x7fff59a504a8) at driver.c:2145
#21 0x00000001061b2bde in mono_main_with_options (argc=5, argv=0x7fff59a504a8) at ./main.c:28
#22 0x00000001061b244d in main (argc=5, argv=0x7fff59a504a8) at ./main.c:177

=============== EOF ===============
Comment 1 Zoltan Varga 2016-07-01 00:56:22 UTC
Fixed in master.