RescueParty 重启
01-10 16:39:15.421637 1268 1395 W RescueParty: Attempting rescue level RESET_SETTINGS_UNTRUSTED_DEFAULTS
Line 90467: 01-10 16:39:15.422713 1268 1395 W RescueParty: Performing scoped reset for package: com.android.systemui, affected namespaces: [systemui]
Line 120376: 01-10 16:39:45.922096 1268 1395 W RescueParty: Attempting rescue level RESET_SETTINGS_UNTRUSTED_CHANGES
Line 120392: 01-10 16:39:45.925226 1268 1395 W RescueParty: Performing scoped reset for package: com.android.systemui, affected namespaces: [systemui]
Line 141598: 01-10 16:40:06.119886 1268 1395 W RescueParty: Attempting rescue level RESET_SETTINGS_TRUSTED_DEFAULTS
Line 169890: 01-10 16:40:33.775728 1268 1395 W RescueParty: Attempting rescue level FACTORY_RESET
Line 171624: 01-10 16:40:34.910588 31034 31034 I uncrypt : --reason=RescueParty
PowerManagerService: reboot, reason = recovery caller pid: 1268, Caller uid: 1000
Line 171632: 01-10 16:40:34.917149 1268 31031 D PowerManagerService: shutdownOrRebootInternal, reason = recoveryCaller pid: 1268, Caller uid: 1000
Line 171648: 01-10 16:40:34.928927 1268 31099 I ShutdownThread: Logging pre-reboot information...
Line 171657: 01-10 16:40:34.935417 1268 31099 D PreRebootLogger: Wiping pre-reboot information...
Line 171657: 01-10 16:40:34.935417 1268 31099 D PreRebootLogger: Wiping pre-reboot information...
Line 171658: 01-10 16:40:34.935834 1268 31099 D ShutdownTiming: DumpPreRebootInfo took to complete: 7ms
Line 172517: 01-10 16:40:35.532173 1268 31099 I ShutdownThread: Rebooting, reason: recovery
Line 172519: 01-10 16:40:35.532266 1268 31099 I PowerManagerService: send to qnx: reboot,recovery
Line 172645: 01-10 16:40:35.614230 31123 31123 I STATE_MONITOR: process_state_monitor 'android-reboot,recovery'
Line 173158: 01-10 16:40:36.539036 0 0 I init : Received sys.powerctl='reboot,recovery' from pid: 1268 (system_server)
Line 173167: 01-10 16:40:36.546664 0 0 I init : Reboot start, reason: reboot,recovery, reboot_target: recovery
Line 173167: 01-10 16:40:36.546664 0 0 I init : Reboot start, reason: reboot,recovery, reboot_target: recovery
Line 173167: 01-10 16:40:36.546664 0 0 I init : Reboot start, reason: reboot,recovery, reboot_target: recovery
Line 173169: 01-10 16:40:36.546694 0 0 I init : Create reboot monitor thread.
vmm_monitor.3608753 default 3 4 vmm_monitor[vmm_monitor.c:195]: vmm_monitor_rx_callback() topic = android-state-monitor datalen = 25, buff='android-reboot,recovery'
分配Adreno 图像内存crash 导致重启
Android开发太难了,Native Crash的一切!_错误_访问_非法
01-10 17:35:32.587681 399 399 D AndroidRuntime: >>>>>> START com.android.internal.os.ZygoteInit uid 0 <<<<<<
backtrace:
#00 pc 0001715a /vendor/lib/libgsl.so (gsl_memory_alloc_pure+9430) (BuildId: e7aa9fa91693880688cd7ba0c9b563d4)
#01 pc 00094741 /vendor/lib/egl/libGLESv2_adreno.so (BuildId: 93583765d974e0cc7c3010e3357c8f24)
#02 pc 000f898e [anon:stack_and_tls:10772]
Adreno-GSL_RPC: <gsl_context_create:3165>: ctxt_id 15, sync_type 2
01-10 17:35:39.687784 1580 1994 E Adreno : [GFX_DBG] no mem for req of 32768 in pool 0, size 81920 mem used 115.00% slots used 15 flags(0xc0000)
752 D EcuInfo-Impl: [vendor/mega/system/ecu_info/1.0/default/src/impl/EcuInfoImpl.cpp][onReceive][101]: topic = misc_service/command/ecu_info_ready, datalen = 1
01-10 17:35:32.589394 752 752 D EcuInfo-Impl: [vendor/mega/system/ecu_info/1.0/default/src/impl/EcuInfoImpl.cpp][handleResponse][457]: topic: misc_service/command/ecu_info_ready type: 6
01-10 17:35:32.589414 3061 3061 I HudSDK : com.autoai.ar.h37
01-10 17:35:32.589414 3061 3061 I HudSDK : HudSDK:updateTapLevel userID=-1000,tapLevel=50
01-10 17:35:32.591714 752 4455 D EcuInfo-Impl: [vendor/mega/system/ecu_info/1.0/default/src/impl/EcuInfoImpl.cpp][loaderTask][707]: type: 5
01-10 17:35:32.591794 752 4455 D EcuInfo-Impl: [vendor/mega/system/ecu_info/1.0/default/src/impl/EcuInfoImpl.cpp][loaderTask][733]: type: 5 mask: c
misc_service[misc_service.cpp566]: command -> (service:reboot) 9:[sync && reset]
reboot recovery report to qnx
窗口1小时
1分钟crash 5 次
@GuardedBy("mLock")
private int mTriggerFailureDurationMs = DEFAULT_TRIGGER_FAILURE_DURATION_MS;
@GuardedBy("mLock")
private int mTriggerFailureCount = DEFAULT_TRIGGER_FAILURE_COUNT;
@VisibleForTesting
static final long DEFAULT_DEESCALATION_WINDOW_MS = TimeUnit.HOURS.toMillis(1);
根据1 小时之内触发的(1分钟crash 5 次)次数来决定
04-14 20:30:53.858869 1252 1362 W RescueParty: Attempting rescue level RESET_SETTINGS_UNTRUSTED_DEFAULTS
04-14 20:30:53.860604 1252 1362 I rescue_success: 1
04-14 20:30:53.860646 1252 1362 D PackageManager: Finished rescue level RESET_SETTINGS_UNTRUSTED_DEFAULTS for package com.voyah_invent.valserver
04-14 20:30:53.860657 1252 1362 I pm_critical_info: Finished rescue level RESET_SETTINGS_UNTRUSTED_DEFAULTS for package com.voyah_invent.valserver
04-14 20:31:40.652633 1252 1362 W RescueParty: Attempting rescue level RESET_SETTINGS_UNTRUSTED_CHANGES
04-14 20:31:40.653401 1252 1362 I rescue_success: 2
04-14 20:31:40.653432 1252 1362 D PackageManager: Finished rescue level RESET_SETTINGS_UNTRUSTED_CHANGES for package com.voyah_invent.valserver
04-14 20:31:40.653441 1252 1362 I pm_critical_info: Finished rescue level RESET_SETTINGS_UNTRUSTED_CHANGES for package com.voyah_invent.valserver
04-14 20:32:38.168412 1252 1362 W RescueParty: Attempting rescue level RESET_SETTINGS_TRUSTED_DEFAULTS
04-14 20:32:38.291799 1252 1362 W RescueParty: Performing reset for all affected
namespaces: [reboot_readiness, storage_native_boot, ambient_context_manager_service, sdk_sandbox, android, package_manager_service, privacy, systemui, media,
app_compat_overrides, clipboard, rollback_boot, alarm_manager, profcollect_native_boot, app_hibernation, connectivity, tare, permissions, device_idle, window
_manager, jobscheduler, rollback, wifi, system_time, attention_manager_service, contacts_provider, appsearch, blobstore, display_manager, latency_tracker, bat
tery_saver, bluetooth, constrain_display_apis, settings_ui, telephony, interaction_jank_monitor, tethering, input_native_boot, app_standby]
04-14 20:32:38.292526 1252 1362 I rescue_success: 3
04-14 20:32:38.292657 1252 1362 D PackageManager: Finished rescue level RESET_SETTINGS_TRUSTED_DEFAULTS for package com.voyah_invent.valserver
04-14 20:32:38.292704 1252 1362 I pm_critical_info: Finished rescue level RESET_SETTINGS_TRUSTED_DEFAULTS for package com.voyah_invent.valserver
04-14 20:33:37.101800 1252 1362 W RescueParty: Attempting rescue level WARM_REBOOT
04-14 20:33:37.102749 1252 1362 I rescue_success: 4
04-14 20:33:37.102776 1252 1362 D PackageManager: Finished rescue level WARM_REBOOT for package com.voyah_invent.valserver
04-14 20:33:37.102786 1252 1362 I pm_critical_info: Finished rescue level WARM_REBOOT for package com.voyah_invent.valserver
04-14 20:33:37.104522 1252 18979 D PowerManagerService: shutdownOrRebootInternal,reason = RescueParty Caller pid: 1252, Caller uid: 1000
04-14 20:33:37.308630 1252 18980 I ShutdownThread: Rebooting, reason: RescueParty
04-14 20:33:37.308657 1252 18980 I PowerManagerService: send to qnx: reboot,RescueParty
04-14 20:33:36.571749 19023 19023 E : msg_channel message_write messegae is ('android-reboot,RescueParty'
04-14 20:33:37.561898 186 186 I init : Received sys.powerctl='reboot,RescueParty' from pid: 1252 (system_server)
04-14 20:33:37.562017 1 1 I init : Got shutdown_command 'reboot,RescueParty' Calling HandlePowerctlMessage()
04-14 20:33:37.562164 1 1 I init : Reboot start, reason: reboot,RescueParty, reboot_target: RescueParty
04-14 20:33:51.386918 883 883 I bootstat: Canonical boot reason: reboot,rescueparty
04-14 20:33:51.386940 883 883 I bootstat: Canonical boot reason: reboot,rescueparty
04-14 20:33:51.395269 883 883 I bootstat: Last reboot reason read from /metadata/bootstat/persist.sys.boot.reason : reboot,RescueParty. Last reboot reason read from persist.sys.boot.reason : reboot,RescueParty
04-14 20:33:51.395286 883 883 I bootstat: Normalized last reboot reason : reboot,rescueparty
04-14 20:33:53.681519 1211 1211 I rescue_note: [0,1,8602]
04-14 20:49:37.093931 1211 1363 W RescueParty: Attempting rescue level FACTORY_RESET
04-14 20:49:37.095836 1211 1363 I rescue_success: 5
04-14 20:49:37.095950 1211 1363 D PackageManager: Finished rescue level FACTORY_RESET for package com.voyah_invent.valserver
04-14 20:49:37.096321 1211 1363 I pm_critical_info: Finished rescue level FACTORY_RESET for package com.voyah_invent.valserver
04-14 20:49:38.105532 9983 9983 I uncrypt : --reason=RescueParty
04-14 20:49:54.726253 1217 1217 I rescue_note: [0,1,8654]
04-14 20:51:37.814570 1217 1371 W RescueParty: Attempting rescue level FACTORY_RESET
04-14 20:51:37.816401 1217 1371 I rescue_success: 5
04-14 20:51:37.819239 1217 1371 D PackageManager: Finished rescue level FACTORY_RESET for package com.voyah_invent.valserver
04-14 20:51:37.819259 1217 1371 I pm_critical_info: Finished rescue level FACTORY_RESET for package com.voyah_invent.valserver
04-14 20:51:38.825235 7997 7997 I uncrypt : --reason=RescueParty
04-14 20:51:10.717955 1206 1206 I rescue_note: [0,1,8881]
android 救援模式( RescueParty )_persist.sys.disable_rescue-CSDN博客
Scheduling restart of crashed service解决方案与源码分析-CSDN博客
Android 系统persist应用_android persist-CSDN博客
1、系统启动时启动persist 应用
04-23 11:16:57.586049 21618 21618 D rescue_stack: java.lang.Throwable
04-23 11:16:57.586049 21618 21618 D rescue_stack: at com.android.server.am.ActivityManagerService.addAppLocked(ActivityManagerService.java:6986)
04-23 11:16:57.586049 21618 21618 D rescue_stack: at com.android.server.am.ActivityManagerService.addAppLocked(ActivityManagerService.java:6918)
04-23 11:16:57.586049 21618 21618 D rescue_stack: at com.android.server.am.ActivityManagerService.addAppLocked(ActivityManagerService.java:6909)
04-23 11:16:57.586049 21618 21618 D rescue_stack: at com.android.server.am.ActivityManagerService.addAppLocked(ActivityManagerService.java:6902)
04-23 11:16:57.586049 21618 21618 D rescue_stack: at com.android.server.am.ActivityManagerService.startPersistentApps(ActivityManagerService.java:6608)
04-23 11:16:57.586049 21618 21618 D rescue_stack: at com.android.server.am.ActivityManagerService.systemReady(ActivityManagerService.java:8423)
04-23 11:16:57.586049 21618 21618 D rescue_stack: at com.android.server.SystemServer.startOtherServices(SystemServer.java:2801)
04-23 11:16:57.586049 21618 21618 D rescue_stack: at com.android.server.SystemServer.run(SystemServer.java:938)
04-23 11:16:57.586049 21618 21618 D rescue_stack: at com.android.server.SystemServer.main(SystemServer.java:648)
04-23 11:16:57.586049 21618 21618 D rescue_stack: at java.lang.reflect.Method.invoke(Native Method)
04-23 11:16:57.586049 21618 21618 D rescue_stack: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
04-23 11:16:57.586049 21618 21618 D rescue_stack: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:924)
--------- switch to system
2、persist 应用crash
04-23 11:16:57.799449 21618 21810 D rescue_stack: at com.android.server.am.ActivityManagerService.cleanUpApplicationRecordLocked(ActivityManagerService.java:12688)
04-23 11:16:57.799449 21618 21810 D rescue_stack: at com.android.server.am.ActivityManagerService.handleAppDiedLocked(ActivityManagerService.java:3333)
04-23 11:16:57.799449 21618 21810 D rescue_stack: at com.android.server.am.ActivityManagerService.appDiedLocked(ActivityManagerService.java:3449)
04-23 11:16:57.799449 21618 21810 D rescue_stack: at com.android.server.am.ActivityManagerService$AppDeathRecipient.binderDied(ActivityManagerService.java:1507)
04-23 11:16:57.799449 21618 21810 D rescue_stack: at android.os.IBinder$DeathRecipient.binderDied(IBinder.java:317)
04-23 11:16:57.799449 21618 21810 D rescue_stack: at android.os.BinderProxy.sendDeathNotice(BinderProxy.java:704)
3、消息启动
04-23 11:17:12.156016 21618 21659 D rescue_stack: at com.android.server.am.ActivityManagerService.addAppLocked(ActivityManagerService.java:6986)
04-23 11:17:12.156016 21618 21659 D rescue_stack: at com.android.server.am.ActivityManagerService.addAppLocked(ActivityManagerService.java:6918)
04-23 11:17:12.156016 21618 21659 D rescue_stack: at com.android.server.am.ActivityManagerService.addAppLocked(ActivityManagerService.java:6909)
04-23 11:17:12.156016 21618 21659 D rescue_stack: at com.android.server.am.ActivityManagerService.addAppLocked(ActivityManagerService.java:6902)
04-23 11:17:12.156016 21618 21659 D rescue_stack: at com.android.server.am.ActivityManagerService.startPersistentApps(ActivityManagerService.java:6632)
04-23 11:17:12.156016 21618 21659 D rescue_stack: at com.android.server.am.ActivityManagerService$MainHandler.handleMessage(ActivityManagerService.java:1896)
04-23 11:17:12.156016 21618 21659 D rescue_stack: at android.os.Handler.dispatchMessage(Handler.java:106)
04-23 11:17:12.156016 21618 21659 D rescue_stack: at android.os.Looper.loopOnce(Looper.java:201)
04-23 11:17:12.156016 21618 21659 D rescue_stack: at android.os.Looper.loop(Looper.java:288)
04-23 11:17:12.156016 21618 21659 D rescue_stack: at android.os.HandlerThread.run(HandlerThread.java:67)
04-23 11:17:12.156016 21618 21659 D rescue_stack: at com.android.server.ServiceThread.run(ServiceThread.java:44)
4、app crash
AppErrors.java
private boolean handleAppCrashLSPB(ProcessRecord app, String reason,
String shortMsg, String longMsg, String stackTrace, AppErrorDialog.Data data) {
final long now = SystemClock.uptimeMillis();
final boolean showBackground = Settings.Secure.getIntForUser(mContext.getContentResolver(),
Settings.Secure.ANR_SHOW_BACKGROUND, 0,
mService.mUserController.getCurrentUserId()) != 0;
final boolean quickCrash = crashTime != null
&& now < crashTime + ActivityManagerConstants.MIN_CRASH_INTERVAL;
if (quickCrash || isProcOverCrashLimitLBp(app, now)) {
// The process either crashed again very quickly or has been crashing periodically in
// the last few hours. If it was a bound foreground service, let's try to restart again
// in a while, otherwise the process loses!
Slog.w(TAG, "Process " + processName + " has crashed too many times, killing!"
+ " Reason: " + (quickCrash ? "crashed quickly" : "over process crash limit"));
EventLog.writeEvent(EventLogTags.AM_PROCESS_CRASHED_TOO_MUCH,
userId, processName, uid);
mService.mAtmInternal.onHandleAppCrash(proc);
if (!persistent) {
// We don't want to start this process again until the user
// explicitly does so... but for persistent process, we really
// need to keep it running. If a persistent process is actually
// repeatedly crashing, then badness for everyone.
EventLog.writeEvent(EventLogTags.AM_PROC_BAD, userId, uid,
processName);
if (!isolated) {
// XXX We don't have a way to mark isolated processes
// as bad, since they don't have a persistent identity.
markBadProcess(processName, app.uid,
new BadProcessInfo(now, shortMsg, longMsg, stackTrace));
mProcessCrashTimes.remove(processName, app.uid);
mProcessCrashCounts.remove(processName, app.uid);
}
errState.setBad(true);
app.setRemoved(true);
final AppStandbyInternal appStandbyInternal =
LocalServices.getService(AppStandbyInternal.class);
if (appStandbyInternal != null) {
appStandbyInternal.restrictApp(
// Sometimes the processName is the same as the package name, so use
// that if we don't have the ApplicationInfo object.
// AppStandbyController will just return if it can't find the app.
app.info != null ? app.info.packageName : processName,
userId, UsageStatsManager.REASON_SUB_FORCED_SYSTEM_FLAG_BUGGY);
}
// Don't let services in this process be restarted and potentially
// annoy the user repeatedly. Unless it is persistent, since those
// processes run critical code.
mService.mProcessList.removeProcessLocked(app, false, tryAgain,
ApplicationExitInfo.REASON_CRASH, "crash");
mService.mAtmInternal.resumeTopActivities(false /* scheduleIdle */);
if (!showBackground) {
return false;
}
}
mService.mAtmInternal.resumeTopActivities(false /* scheduleIdle */);
。。。。
}
频繁crash 非persist 应用会走
mService.mProcessList.removeProcessLocked(app, false, tryAgain,
ApplicationExitInfo.REASON_CRASH, "crash");
removeProcessLocked 可能执行addAppLocked 再次启动应用,这样就不执行appDiedLocked
addAppLocked和appDiedLocked 再次启动应用
if (mPersistentStartingProcesses.indexOf(app) < 0 ) {
mPersistentStartingProcesses.add(app);
restart = true;
}
mProcessList.startProcessLocked(app, new HostingRecord(
HostingRecord.HOSTING_TYPE_RESTART, app.processName),
ZYGOTE_POLICY_FLAG_EMPTY);