android - Prevent background service from being killed due to "detect excessive cpu on forked process" -


i debugging issue of syncthing android wrapper. android application wraps native binary of syncthing project , provides additional functionality starting/stopping based on connecting wifi, power, etc.

unfortunately, there have been issues service not auto-starting on wifi change anymore, handsets have been upgraded android 6. since personal handset has been upgraded 6.0.1 recently, able debug issue , today noticed following:

07-06 20:52:26.562  1181  1363 activitymanager: [bgdetect]chkexcesscpu dokills: true uptime: 300309 07-06 20:52:26.960  1181  1363 activitymanager: [bgdetect]detect excessive cpu on forked process libsyncthing.so(pid : 2758) plan stop 371060 during 300309 07-06 20:52:26.960  1181  1363 activitymanager: [bgdetect]force stop com.nutomic.syncthingandroid.debug (uid 10132) 07-06 20:52:26.965  1181  1363 activitymanager: force stopping com.nutomic.syncthingandroid.debug appid=10132 user=0: pid 1181 07-06 20:52:26.966  1181  1363 activitymanager: killing 1360:com.nutomic.syncthingandroid.debug/u0a132 (adj 15): stop com.nutomic.syncthingandroid.debug 07-06 20:52:26.968  1181  1363 w activitymanager: scheduling restart of crashed service com.nutomic.syncthingandroid.debug/com.nutomic.syncthingandroid.syncthing.syncthingservice in 1000ms 07-06 20:52:26.968  1181  1354 v activitymanager: killprocessgroupasync took 1 ms pid 1360 on thread 14 07-06 20:52:26.971  1181  6410 libprocessgroup: killing pid 2758 in uid 10132 part of process group 1360 07-06 20:52:26.973  1181  6410 libprocessgroup: killing pid 2758 in uid 10132 part of process group 1360 07-06 20:52:26.974  1181  1363 activitymanager:   force stopping service servicerecord{47304c8 u0 com.nutomic.syncthingandroid.debug/com.nutomic.syncthingandroid.syncthing.syncthingservice} 

the syncthing protocol quite heavy on cpu side, regarding encryption, hashing, etc. seems service force-stopped due high cpu demands of forked native binary.

the application marked "no battery optimization", still being killed. there way prevent activitymanager killing application due cpu demands of forked process?


Comments

Post a Comment

Popular posts from this blog

sequelize.js - Sequelize group by with association includes id -

delphi - Take screenshot in webcam using VFrames in Console Application -

c++ - wxDataViewModel: What is it and how do i use it? -