Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is signal 33 in Android Lollipop?

I observed signal 33 crashes recently but couldn't find an explanation about it. The signal is normally applied to system_server process but I couldn't find any detail about why it is being applied or which process applies it. Also, this was never seen in any versions prior to Lollipop. So, what changes were made to the frameworks from Lollipop onwards?

like image 280
sg1993 Avatar asked Oct 30 '22 22:10

sg1993


1 Answers

Android from Lollipop and up reserves signal 33 (__SIGRTMIN + 1) for a signal called THREAD_SIGNAL as you can see in https://android.googlesource.com/platform/system/core/+/android-5.0.0_r2/libbacktrace/BacktraceThread.h#34

It applies a signal handler for the purpose of obtaining backtrace information (registers and most importantly the thread stack pointer) of a given thread.

Check https://android.googlesource.com/platform/system/core/+/android-5.0.0_r2/libbacktrace/BacktraceThread.cpp#158 to understand how it set the signal handler and delivers the signal.

Usually debuggerd is the one retrieving the backtrace when a process crashes but there are also wrappers available for any project wanting to retrieve a process backtrace information, for example for dumping the state of a process for profiling purposes. ART is one of this projects.

like image 114
Pablo Sole Avatar answered Nov 15 '22 04:11

Pablo Sole