System_server crashes after upgrading some applications

Hi,

lately I have experienced phone crashes with new versions of some applications. The crash happens during update or after I launch the app. The phone is rebooted when it happens; it seems that system_server segfaults (see logcat below).

First it happened a few days ago when I have updated to My Expenses 2.8.2 (and also 2.8.2.1). Yesterday it happened with Power Ampache 1.09.39. It is happening consistently with those two packages (and their specific versions) only.

My hardware is Sony Erricson Xperia Mini Pro (SK17i) with Android 6.0.1 (CyanogenMod). The phone is stable otherwise and I have been using it for more that a year with this setup.

So I wonder what could have changed? Is it possible that f-droid.org started to build apps with some flags which are not compatible with my hardware?

logcat from the moment I launched Power Ampache 1.09.39 until it started rebooting:

10-31 08:20:47.145 19215 19741 I ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.antoniotari.reacti
veampacheapp/.ui.activities.SplashActivity bnds=[82,121][160,212] (has extras)} from uid 10005 on display 0
10-31 08:20:47.652 19215 19741 F libc    : invalid address or address of corrupt block 0xb passed to dlfree
10-31 08:20:47.653 19215 19741 F libc    : Fatal signal 11 (SIGSEGV), code 1, fault addr 0xdeadbaad in tid 19741 (Binder_4)
10-31 08:20:47.655   259   259 I DEBUG   : property debug.db.uid not set; NOT waiting for gdb.
10-31 08:20:47.655   259   259 I DEBUG   : HINT: adb shell setprop debug.db.uid 100000
10-31 08:20:47.655   259   259 I DEBUG   : HINT: adb forward tcp:5039 tcp:5039
10-31 08:20:47.732   259   259 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
10-31 08:20:47.732   259   259 F DEBUG   : Build fingerprint: 'SEMC/SK17i_1254-2184/SK17i:4.0.4/4.1.B.0.587/tL1_3w:user/release-keys'
10-31 08:20:47.733   259   259 F DEBUG   : Revision: '0'
10-31 08:20:47.733   259   259 F DEBUG   : ABI: 'arm'
10-31 08:20:47.734   259   259 F DEBUG   : pid: 19215, tid: 19741, name: Binder_4  >>> system_server <<<
10-31 08:20:47.734   259   259 F DEBUG   : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xdeadbaad
10-31 08:20:47.785   259   259 F DEBUG   : Abort message: 'invalid address or address of corrupt block 0xb passed to dlfree'
10-31 08:20:47.785   259   259 F DEBUG   :     r0 deadbaad  r1 cd26227d  r2 00000000  r3 42a3d500
10-31 08:20:47.785   259   259 F DEBUG   :     r4 0000000b  r5 00000013  r6 0000003d  r7 596005bc
10-31 08:20:47.785   259   259 F DEBUG   :     r8 596005b8  r9 596005b4  sl 596005c0  fp 00005804
10-31 08:20:47.785   259   259 F DEBUG   :     ip 4037461c  sp 59600560  lr 4033ec97  pc 4033ec9e  cpsr 600f0030
10-31 08:20:47.819   259   259 F DEBUG   :
10-31 08:20:47.819   259   259 F DEBUG   : backtrace:
10-31 08:20:47.819   259   259 F DEBUG   :     #00 pc 00033c9e  /system/lib/libc.so (dlfree+797)
10-31 08:20:47.819   259   259 F DEBUG   :     #01 pc 00015d71  /system/lib/libandroidfw.so (android::ResStringPool::uninit()+40)
10-31 08:20:47.819   259   259 F DEBUG   :     #02 pc 00016ce7  /system/lib/libandroidfw.so (android::ResXMLTree::uninit()+14)
10-31 08:20:47.819   259   259 F DEBUG   :     #03 pc 00016cc1  /system/lib/libandroidfw.so (android::ResXMLTree::~ResXMLTree()+4)
10-31 08:20:47.819   259   259 F DEBUG   :     #04 pc 00011e5b  /system/lib/libandroidfw.so (android::AssetManager::getPkgName(char const*)+274)
10-31 08:20:47.819   259   259 F DEBUG   :     #05 pc 00011ed3  /system/lib/libandroidfw.so (android::AssetManager::getBasePackageName(unsigned int)+54)
10-31 08:20:47.819   259   259 F DEBUG   :     #06 pc 00085da3  /system/lib/libandroid_runtime.so
10-31 08:20:47.820   259   259 F DEBUG   :     #07 pc 73595009  /data/dalvik-cache/arm/system@framework@boot.oat (offset 0x1f5c000)
10-31 08:20:53.651   259   259 F DEBUG   :
10-31 08:20:53.651   259   259 F DEBUG   : Tombstone written to: /data/tombstones/tombstone_06

Edit:
Unistalling Power Ampache and installing it again did not helped. Also wiping app cache and dalvik cache brings no results.

I have found similar issue here: App can't run on devices below Android 7.1 after migrating to Android Studio 3 - Stack Overflow. It suggests that the problem might be related to Android Studio 3 and AAPT2 enablement vs. CyanogenMod/LineageOS.

Edit 2
Full wipe and re-flash did not help. I have filled an issue here: Several apps causes a phone reboot or boot loop (#979) · Issues · F-Droid / Data · GitLab

Looks like an application is build with android studio 3, that crashes Cyanogenmod build roms.

https://issuetracker.google.com/issues/64434571

Not sure if F-droid is built with android studio 3 as well, but if you update any application that was built with AS3, the phone reboots continually, until you remove the application.