Debugging crash on Android

ioberry 1 Reputation point
2021-02-04T11:35:28.263+00:00

Basically I have a Xamarin.Native app on Android. The problem is that it crashes randomly with the following stacktrace:

A/libc: Fatal signal 11 (SIGSEGV), code -6 (SI_TKILL) in tid 10892 (Thread Pool Wor), pid 10704 
A/DEBUG: * * * * * * * * * * * * * * * *
A/DEBUG: Build fingerprint: 'google/redfin/redfin:11/RQ1A.201205.010/6953398:user/release-keys'
A/DEBUG: Revision: '0'
A/DEBUG: ABI: 'arm'
A/DEBUG: Timestamp: 2021-02-01 19:13:03+0700
A/DEBUG: pid: 10704, tid: 10892, name: Thread Pool Wor  >>> com.ioberry.myapp <<<
A/DEBUG: uid: 10685
A/DEBUG: signal 11 (SIGSEGV), code -6 (SI_TKILL), fault addr --------
A/DEBUG:     r0  00000000  r1  b1eaa304  r2  ae799610  r3  00000000
A/DEBUG:     r4  b81baba0  r5  b81aab20  r6  c4810520  r7  c48104e8
A/DEBUG:     r8  b8966310  r9  ee950260  r10 00000000  r11 b1eaa2d0
A/DEBUG:     ip  00000000  sp  b1eaa2d0  lr  c56d8f9c  pc  eed6c70c
A/DEBUG: backtrace:
A/DEBUG:       #00 pc 0000070c  <anonymous:eed6c000>
A/DEBUG:       #01 pc 002cff98  /data/app/com.ioberry.myapp-fbsz6pYxUiTSFosV752aUw==/lib/arm/libmonosgen-2.0.so (mono_thread_info_get_small_id+16)

There is not much of information that could point to the exact origin of this problem, but we can assume the following:

  1. Something happens in one of the threads from the pool (execution of an asynchronous task ??), which leads to the whole process being killed (ST_KILL)
  2. StackOverflow says it might be related to INotifyPropertyChanged (we use it in our project along with Reactive Extensions)

So, how to debug and investigate crashes like this? Unfortunately debuggers in Android Studio or Visual Studio do not detect anything at all.

What tools can help here?

Is there a way to record thread calls (C#/managed code) in order to find source of this crash?

Developer technologies .NET Xamarin
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.