Managing freeze issues
Problem description
Definition of an Android client freeze:
Startup freeze: The main thread fails to execute a method within 5 seconds during app startup.
ANR freeze: An Application Not Responding (ANR) error reported by the system.
mPaaS log identifiers:
FRAME_CLIENT_STARTUP_DEAD: Indicates that the log is for a startup freeze.
APM_ANR: Indicates that the log is for an ANR freeze.
threadsTrace: The stacks of all threads when a freeze occurs.
internalStack: The worker thread stacks of the mPaaS frame when a freeze occurs.
Principles for managing freeze issues
Many factors can cause a freeze, such as read and write permission issues, network latency, and thread deadlocks. Freeze issues can be random or related to code or system logic.
The basic principles for managing freeze issues are as follows:
Prioritize freeze logs that have a high impact, affecting many users and device models.
Analyze specific issues, reproduce them locally to confirm the root cause, and validate the proposed solution.
Allow a certain degree of toleration for random, low-frequency freeze events.
Track the occurrence rate of freeze issues over the long term. This includes metrics such as the number of affected users, the number of freezes, and the average number of freezes per user for different types of freeze issues.
A freeze log is like a static snapshot of the issue. It does not show the complete sequence of events. Therefore, analysis of the on-site conditions may not always reveal the root cause.