Watchdog Timer for Mobile App Crash Data Collection
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Mobile operating systems abruptly terminating applications that exceed timeout periods hinder application developers' ability to collect debugging information, as the abrupt termination prevents debugging software from gathering state information associated with the application.
Innovation Solution
Implementing a watchdog thread that initiates upon a source thread's operation with a timeout period, which collects state data at regular intervals and can invoke a crash function to gather crash data if the operation is not completed within a shorter watchdog timeout period, allowing for data collection and transfer to an analytic processing server for debugging purposes.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If the mobile operating system abruptly terminates applications that exceed timeout periods to ensure stability, then application hanging is prevented, but debugging information collection is hindered
Solution Approach 1:
The watchdog thread performs preliminary actions by collecting state data at regular intervals before the operating system terminates the application. It proactively gathers crash data and state information in advance, ensuring that debugging information is available even when the application is abruptly terminated due to timeout expiration.
Solution Approach 2:
The watchdog thread acts as an intermediary between the application and the operating system termination process. It monitors the application's execution, collects state data, and preserves crash information before the operating system terminates the application, thereby mediating the information loss that would otherwise occur during abrupt termination.
2Loss of information
If a watchdog thread collects state data at regular intervals to enable debugging, then crash data collection is enabled, but additional processing overhead is introduced
Solution Approach 1:
The watchdog thread implements periodic action by collecting state data at regular intervals rather than continuously. This periodic sampling approach enables crash data collection while minimizing processing overhead, as the thread only performs data gathering operations at predetermined time intervals rather than continuously monitoring every moment.
Solution Approach 2:
The watchdog thread performs self-service by autonomously monitoring the application's execution and collecting state data without requiring external intervention. It independently tracks the application's state, detects timeout conditions, and preserves crash information, thereby reducing the need for additional external processing or monitoring systems.
3Loss of information
If the watchdog thread invokes a crash function to collect crash data, then debugging information is gathered, but application termination is accelerated
Solution Approach 1:
The watchdog thread performs preliminary data collection by gathering crash information and state data before the application naturally terminates. By proactively collecting debugging information in advance, the system ensures that data is preserved without waiting for the application to complete its natural execution cycle or be terminated by the operating system.
Solution Approach 2:
The watchdog thread converts the harmful effect of early termination into a beneficial outcome by collecting crash data before termination occurs. Instead of allowing the application to terminate without data collection, the watchdog thread intercepts the termination process and preserves valuable debugging information, turning the potentially harmful premature exit into a beneficial data collection opportunity.
Data Source
AI summary
A system and method for providing a watchdog timer to enable collection of crash data is provided. Upon execution of certain operations, a source thread of an application initiates a watchdog thread that periodically sample state of data relating to the application. Should the operation not complete within a watchdog timeout period, the watchdog thread invokes a crash function to collect additional state data. At least a portion of the state data is stored for later analysis and debugging.


