Skip to content

[Mono 2017-12] Encountering native crash during test instrumentation start up on devices running v4.4 and lower #1297

Closed
@pjcollins

Description

@pjcollins

Steps to Reproduce

  1. Install src/Mono.Android/Test/Mono.Android-Tests.csproj to a v4.4 or lower target in release mode.
  2. Run the suite with instrumentation via the /t:RunTests msbuild target.

Alternatively, I've uploaded the .apk file which can be installed via adb. I was able to reproduce with this .apk on a newly created v4.4 emulator.

  1. Download the .apk provided below, and adb install it.
  2. Launch the app, and click the Run Tests list view item.

Mono.Android_Tests-Signed.zip

Expected Behavior

NUnitLite suites will start and run successfully via instrumentation.

Actual Behavior

Crash on start up:

F/libc    ( 4571): Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1), thread 4571 (o.Android_Tests)
I/DEBUG   ( 1137): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG   ( 1137): Build fingerprint: 'generic_x86/google_sdk_x86/generic_x86:4.4.2/KK/4498769:eng/test-keys'
I/DEBUG   ( 1137): Revision: '0'
I/DEBUG   ( 1137): pid: 4571, tid: 4571, name: o.Android_Tests  >>> Mono.Android_Tests <<<
I/DEBUG   ( 1137): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00000000
I/DEBUG   ( 1137):     eax bfb73b04  ebx b7779fcc  ecx 00000000  edx 00000008
I/DEBUG   ( 1137):     esi 00000000  edi bfb7418c
I/DEBUG   ( 1137):     xcs 00000073  xds 0000007b  xes 0000007b  xfs 00000000  xss 0000007b
I/DEBUG   ( 1137):     eip b7727ce8  ebp bfb740a8  esp bfb73a10  flags 00210293
I/DEBUG   ( 1137):
I/DEBUG   ( 1137): backtrace:
I/DEBUG   ( 1137):     #00  pc 00049ce8  /system/lib/libc.so (__vfprintf+232)
I/DEBUG   ( 1137):     #01  pc 00047f3f  /system/lib/libc.so (vasprintf+143)
I/DEBUG   ( 1137):     #02  pc 002a3bf3  /data/app-lib/Mono.Android_Tests-1/libmonosgen-2.0.so (monoeg_g_vasprintf+35)
I/DEBUG   ( 1137):     #03  pc 0001e16f  [stack]
I/DEBUG   ( 1137):     #04  pc 00018833  <unknown>
I/DEBUG   ( 1137):     #05  pc 0000b603  <unknown>
I/DEBUG   ( 1137):     #06  pc 0000b593  <unknown>
I/DEBUG   ( 1137):     #07  pc 0000b49a  <unknown>
I/DEBUG   ( 1137):     #08  pc 0000b1b5  <unknown>
I/DEBUG   ( 1137):     #09  pc 0000ae7f  <unknown>
I/DEBUG   ( 1137):     #10  pc 0000a015  <unknown>
I/DEBUG   ( 1137):     #11  pc 00004553  <unknown>
I/DEBUG   ( 1137):     #12  pc 000044d3  <unknown>
I/DEBUG   ( 1137):     #13  pc 0000444f  <unknown>
I/DEBUG   ( 1137):     #14  pc 000043f9  <unknown>
I/DEBUG   ( 1137):     #15  pc 000103cf  <unknown>
I/DEBUG   ( 1137):     #16  pc 00001527  <unknown>
I/DEBUG   ( 1137):     #17  pc 0002a0eb  /system/lib/libdvm.so (dvmPlatformInvoke+79)
I/DEBUG   ( 1137):     #18  pc 00006d9f  [heap]
I/DEBUG   ( 1137):     #19  pc 0008688d  /system/lib/libdvm.so (dvmCallJNIMethod(unsigned int const*, JValue*, Method const*, Thread*)+285)
I/DEBUG   ( 1137):     #20  pc 0004c0d2  /system/lib/libdvm.so (dvmCheckCallJNIMethod(unsigned int const*, JValue*, Method const*, Thread*)+66)
I/DEBUG   ( 1137):     #21  pc 00176c18  /system/lib/libdvm.so
I/DEBUG   ( 1137):     #22  pc 00005dcb  <unknown>
I/DEBUG   ( 1137):     #23  pc 0003b582  /system/lib/libdvm.so (dvmMterpStd(Thread*)+66)
I/DEBUG   ( 1137):     #24  pc 00036c49  /system/lib/libdvm.so (dvmInterpret(Thread*, Method const*, JValue*)+217)
I/DEBUG   ( 1137):     #25  pc 000bbd46  /system/lib/libdvm.so (dvmInvokeMethod(Object*, Method const*, ArrayObject*, ArrayObject*, ClassObject*, bool)+1750)
I/DEBUG   ( 1137):     #26  pc 000d1770  /system/lib/libdvm.so (Dalvik_java_lang_reflect_Method_invokeNative(unsigned int const*, JValue*)+288)
I/DEBUG   ( 1137):     #27  pc 00176c18  /system/lib/libdvm.so
I/DEBUG   ( 1137):     #28  pc 00005eff  <unknown>
I/DEBUG   ( 1137):     #29  pc 0003b582  /system/lib/libdvm.so (dvmMterpStd(Thread*)+66)
I/DEBUG   ( 1137):     #30  pc 00036c49  /system/lib/libdvm.so (dvmInterpret(Thread*, Method const*, JValue*)+217)
I/DEBUG   ( 1137):     #31  pc 000bcba7  /system/lib/libdvm.so (dvmCallMethodV(Thread*, Method const*, Object*, bool, JValue*, char*)+759)

Version Information

Operating System: Microsoft Windows 10 Enterprise 64-bit
Product Name: Xamarin.Android
Branch Name: mono-2017-12
Build Revision: d386c85d46cf4d3b877d6610de14ee2fb84c1b69
[Device] Manufacturer: Motorola, Model: XT1031, Version: 4.4.4, ABI: armeabi-v7a, Timezone: America/Detroit

Log File

http://xqa.blob.core.windows.net/gist/log-987a151df49d49b59de3623f89ab9492.txt

Intermediate build output:
https://microsoft-my.sharepoint.com/:u:/p/pecolli/Ec25cWIk1wRMs0zHZRpQibEBLsHHzSokHV-hmf8TiEMDng?e=otuJEd

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions