0

The GNSDK for Android sample application crashes over signal 4 (SIGILL), code 2 (ILL_ILLOPN) when run on an x86 AVD. I tried both a Nexus 5 AVD and a Pixel XL AVD at API levels 22 and 25, and the same SIGILL crash occurs on both as soon as the sample app tries to engage the native GNSDK libraries in onCreate(). It looks like libgnsdk_storage_sqlite.3.12.1.so in particular may be the culprit, judging from the backtrace. The same crash occurs in my own application when I engage the GNSDK native libs for x86, so the problem is not unique to the sample app. What could be causing this?

I've confirmed that the sample app works on arm hardware and an arm AVD. I don't have any x86 hardware, so I can't confirm whether this is truly an x86 ABI issue or some oddment with AVDs vs. real hardware.

    --------- beginning of crash
11-17 14:07:43.446 3019-3043/? A/libc: Fatal signal 4 (SIGILL), code 2, fault addr 0xa2e70276 in tid 3043 (Thread-174)
11-17 14:07:43.450 3019-3047/? D/OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true
11-17 14:07:43.450 1184-3049/? I/AudioFlinger: AudioFlinger's thread 0xb551b000 ready to run

                                               [ 11-17 14:07:43.451  3019: 3019 D/         ]
                                               HostConnection::get() New Host Connection established 0xb43fc600, tid 3019


                                               [ 11-17 14:07:43.452  3019: 3019 W/         ]
                                               Unrecognized GLES max version string in extensions: ANDROID_EMU_CHECKSUM_HELPER_v1 
11-17 14:07:43.452 3019-3019/? D/Atlas: Validating map...
11-17 14:07:43.453 1550-2750/system_process V/WindowManager: Adding window Window{3e690683 u0 com.customer.example/com.customer.example.GracenoteMusicID} at 2 of 8 (before Window{2bf1a8da u0 Starting com.customer.example})

                                                             [ 11-17 14:07:43.475  3019: 3047 D/         ]
                                                             HostConnection::get() New Host Connection established 0xae90f380, tid 3047


                                                             [ 11-17 14:07:43.476  3019: 3047 W/         ]
                                                             Unrecognized GLES max version string in extensions: ANDROID_EMU_CHECKSUM_HELPER_v1 
11-17 14:07:43.478 3019-3047/? I/OpenGLRenderer: Initialized EGL, version 1.4
11-17 14:07:43.481 3019-3047/? W/OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
11-17 14:07:43.544 3019-3047/? D/EGL_emulation: eglCreateContext: 0xae90e460: maj 2 min 0 rcv 2
11-17 14:07:43.546 1178-1178/? I/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
11-17 14:07:43.546 1178-1178/? I/DEBUG: Build fingerprint: 'Android/sdk_google_phone_x86/generic_x86:5.1.1/LMY48X/4409265:userdebug/test-keys'
11-17 14:07:43.546 1178-1178/? I/DEBUG: Revision: '0'
11-17 14:07:43.546 1178-1178/? I/DEBUG: ABI: 'x86'
11-17 14:07:43.547 1178-1178/? I/DEBUG: pid: 3019, tid: 3043, name: Thread-174  >>> com.customer.example <<<
11-17 14:07:43.547 1178-1178/? I/DEBUG: signal 4 (SIGILL), code 2 (ILL_ILLOPN), fault addr 0xa2e70276
11-17 14:07:43.551 1178-1178/? I/DEBUG:     eax a40519ec  ebx a2ef3e2c  ecx a4051e34  edx 00000000
11-17 14:07:43.552 1178-1178/? I/DEBUG:     esi b438684c  edi b437866c
11-17 14:07:43.552 1178-1178/? I/DEBUG:     xcs 00000073  xds 0000007b  xes 0000007b  xfs 00000077  xss 0000007b
11-17 14:07:43.552 1178-1178/? I/DEBUG:     eip a2e70276  ebp 00000000  esp a2c67f70  flags 00210246
11-17 14:07:43.552 1178-1178/? I/DEBUG: backtrace:
11-17 14:07:43.552 1178-1178/? I/DEBUG:     #00 pc 00058276  /data/app/com.customer.example-2/lib/x86/libgnsdk_storage_sqlite.3.12.1.so
11-17 14:07:43.552 1178-1178/? I/DEBUG:     #01 pc 000816de  /data/app/com.customer.example-2/lib/x86/libgnsdk_storage_sqlite.3.12.1.so
11-17 14:07:43.552 1178-1178/? I/DEBUG:     #02 pc 0008189f  /data/app/com.customer.example-2/lib/x86/libgnsdk_storage_sqlite.3.12.1.so
11-17 14:07:43.552 1178-1178/? I/DEBUG:     #03 pc 00081952  /data/app/com.customer.example-2/lib/x86/libgnsdk_storage_sqlite.3.12.1.so
11-17 14:07:43.552 1178-1178/? I/DEBUG:     #04 pc 0008babb  /data/app/com.customer.example-2/lib/x86/libgnsdk_storage_sqlite.3.12.1.so
11-17 14:07:43.552 1178-1178/? I/DEBUG:     #05 pc 0008da49  /data/app/com.customer.example-2/lib/x86/libgnsdk_storage_sqlite.3.12.1.so
11-17 14:07:43.552 1178-1178/? I/DEBUG:     #06 pc 00093842  /data/app/com.customer.example-2/lib/x86/libgnsdk_storage_sqlite.3.12.1.so
11-17 14:07:43.552 1178-1178/? I/DEBUG:     #07 pc 00093f93  /data/app/com.customer.example-2/lib/x86/libgnsdk_storage_sqlite.3.12.1.so
11-17 14:07:43.552 1178-1178/? I/DEBUG:     #08 pc 0009465d  /data/app/com.customer.example-2/lib/x86/libgnsdk_storage_sqlite.3.12.1.so
11-17 14:07:43.552 1178-1178/? I/DEBUG:     #09 pc 00080df4  /data/app/com.customer.example-2/lib/x86/libgnsdk_storage_sqlite.3.12.1.so (sqlite3_exec+164)
11-17 14:07:43.552 1178-1178/? I/DEBUG:     #10 pc 00015567  /data/app/com.customer.example-2/lib/x86/libgnsdk_storage_sqlite.3.12.1.so
11-17 14:07:43.552 1178-1178/? I/DEBUG:     #11 pc 00015f65  /data/app/com.customer.example-2/lib/x86/libgnsdk_storage_sqlite.3.12.1.so (_sqlite_storage_connection_get+485)
11-17 14:07:43.552 1178-1178/? I/DEBUG:     #12 pc 0000f9d3  /data/app/com.customer.example-2/lib/x86/libgnsdk_storage_sqlite.3.12.1.so (_sqlite_storage_provider_storage_open+483)
11-17 14:07:43.552 1178-1178/? I/DEBUG:     #13 pc 0010627d  /data/app/com.customer.example-2/lib/x86/libgnsdk_manager.3.12.1.so (_sdkmgr_storage_open+365)
11-17 14:07:43.552 1178-1178/? I/DEBUG:     #14 pc 0001ce56  /data/app/com.customer.example-2/lib/x86/libgnsdk_lookup_localstream.3.12.1.so (localstream2_storage_gdb_create+870)
11-17 14:07:43.552 1178-1178/? I/DEBUG:     #15 pc 0001a7d9  /data/app/com.customer.example-2/lib/x86/libgnsdk_lookup_localstream.3.12.1.so (localstream2_storage_create+233)
11-17 14:07:43.552 1178-1178/? I/DEBUG:     #16 pc 00011a7e  /data/app/com.customer.example-2/lib/x86/libgnsdk_lookup_localstream.3.12.1.so (gnsdk_lookup_localstream_ingest_create+414)
11-17 14:07:43.552 1178-1178/? I/DEBUG:     #17 pc 0004bb52  /data/app/com.customer.example-2/lib/x86/libgnsdk_java_marshal.1.3.1.so (gnsdk_lookup_localstream_ingest_create+146)
11-17 14:07:43.552 1178-1178/? I/DEBUG:     #18 pc 0005cdc4  /data/app/com.customer.example-2/lib/x86/libgnsdk_java_marshal.1.3.1.so (gracenote::lookup_localstream::GnLookupLocalStreamIngest::create()+68)
11-17 14:07:43.552 1178-1178/? I/DEBUG:     #19 pc 0005d015  /data/app/com.customer.example-2/lib/x86/libgnsdk_java_marshal.1.3.1.so (gracenote::lookup_localstream::GnLookupLocalStreamIngest::GnLookupLocalStreamIngest(gracenote::lookup_localstream::IGnLookupLocalStreamIngestEvents*)+101)
11-17 14:07:43.552 1178-1178/? I/DEBUG:     #20 pc 000bb2a2  /data/app/com.customer.example-2/lib/x86/libgnsdk_java_marshal.1.3.1.so (Java_com_gracenote_gnsdk_gnsdk_1javaJNI_new_1GnLookupLocalStreamIngest+82)
11-17 14:07:43.552 1178-1178/? I/DEBUG:     #21 pc 00052bd2  /data/dalvik-cache/x86/data@[email protected]@[email protected]
11-17 14:07:43.614 1184-3049/? W/AudioFlinger: RecordThread: buffer overflow
11-17 14:07:43.670 1178-1178/? I/DEBUG: Tombstone written to: /data/tombstones/tombstone_03
11-17 14:07:43.670 1550-1574/system_process I/BootReceiver: Copying /data/tombstones/tombstone_03 to DropBox (SYSTEM_TOMBSTONE)
11-17 14:07:43.675 1550-1603/system_process W/InputDispatcher: channel '3e690683 com.customer.example/com.customer.example.GracenoteMusicID (server)' ~ Consumer closed input channel or an error occurred.  events=0x9
11-17 14:07:43.675 1550-1603/system_process E/InputDispatcher: channel '3e690683 com.customer.example/com.customer.example.GracenoteMusicID (server)' ~ Channel is unrecoverably broken and will be disposed!
11-17 14:07:43.675 1187-1187/? I/Zygote: Process 3019 exited due to signal (4)
11-17 14:07:43.689 1550-2746/system_process I/WindowState: WIN DEATH: Window{3e690683 u0 com.customer.example/com.customer.example.GracenoteMusicID}

1 Answer 1

0

not a good answer perhaps, but if you comment the calls to

GnStorageSqlite.enable();   
GnLookupLocalStream.enable();

which the sample app makes, the crash goes away and online lookup still works. I guess these calls must engage native libraries that have some incompatibility with x86.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.