Symbian OS System Event Log and Postmortem Software Fault Analysis
Total Page:16
File Type:pdf, Size:1020Kb
Symbian OS system event log and postmortem software fault analysis Zhigang Yang University of Tampere Department of Computer Sciences Computer Science M.Sc. thesis Supervisor: Jyrki.Nummenmaa, Erkki.J Salonen June 2008 ii University of Tampere Department of Computer Sciences Computer Science Zhigang Yang: Symbian OS system event log and postmortem software fault analysis M.Sc. thesis, 62 pages, 4 index and appendix pages June 2008 This thesis introduces a postmortem software failure analysis system named MobileCrash. The system is to catch Symbian OS panics and exceptions, to collect related information and to transmit crash logs to a central database for analysis. The basics of software failure analysis and similar systems on other operation systems are presented in the thesis. After revealing the system design of the MobileCrash, the system event log as a supplementary of the MobileCrash is introduced. The thesis also introduces the core of crash analysis together with real case studies in Symbian OS. Software developers can benefit from this thesis by learning about software failure analysis on Symbian OS. Project managers can get basic information on software failure analysis from this thesis to better control projects based on Symbian OS. Key words and terms: Symbian OS, crash analysis, MobileCrash, system event log iii Table of Contents 1. Introduction ...............................................................................................................1 2. Symbian OS based Smartphone software development............................................4 2.1 Smartphone overview................................................................................................4 2.2 Symbian OS design overview ...................................................................................5 3. Basics of software fault analysis ...............................................................................9 3.1 Automated support for software failure report..........................................................9 3.2 Postmortem Symbolic Evaluation and crash analysis.............................................10 4. MobileCrash system in general ...............................................................................13 4.1 MobileCrash developing requirements ...................................................................13 4.2 MobileCrash general design and implementation...................................................16 5. MobileCrash system event log ................................................................................21 5.1 Background information..........................................................................................21 5.2 System event log architect.......................................................................................23 5.3 System event log design..........................................................................................24 5.4 System event log improvement ...............................................................................28 6. Crash analysis on Symbian OS ...............................................................................31 6.1 Symbian OS crash analysis in general ....................................................................31 6.2 User side panic ........................................................................................................33 6.3 Kernel side panic.....................................................................................................35 6.4 Exceptions ...............................................................................................................38 7. Case studies .............................................................................................................43 7.1 Analyze the stack heuristically................................................................................45 7.2 Analyze application panic .......................................................................................47 7.3 Analyze application crash (exception) ....................................................................49 7.4 Analyze application crashes group by call stack.....................................................50 7.5 Summary..................................................................................................................52 8. Conclusions .............................................................................................................54 Appendix: Glossary 1 1. Introduction Nowadays, smartphones are very popular and widely used in people’s everyday life. Symbian OS based smartphones have the largest market share in this big family. By the end of the third quarter of 2007, there were 165 million Symbian smartphones cumulatively shipped and 134 different models in the global market [Symbian press releases, 2007]. Since large amount of smartphones shipped to the market, people are significantly changing the way to use and think over mobile phones. Smartphones are phones which combine mobility, a complete operating system with the ability to add applications, and information access. Smartphones have more features than traditional phones and are used as mobile personal computers giving access to the information world which keeps on expanding and growing rapidly. Smartphones provide a web browser to facilitate information access. However the information world can also be accessed through dedicated smartphone interfaces that make the experience more intuitive, more visual, and more valuable. Moreover just as the information world is steering the evolution of smartphones, the increasing popularity of smartphones will steer the next phase of the evolution of the information world [Wood, 2005]. The software used in smartphones is becoming ubiquitous. The powerful software, previously found only in desktop computers, now serves inside all kinds of smartphones. Without the support from thousands of third-party software, smartphones would not be as successful as in nowadays. Any computer software developers can write smartphone software, either to meet their own needs or to sell for a profit. Most smartphone software can be developed by standard programming languages and application interfaces provided by smartphone operation systems. However, debugging and analysing software faults in a smartphone development environment is not as easy as that in a computer desktop development environment. There are many runtime debuggers and source code level debuggers used in the computer desktop environment. In a smartphone development environment, tracing systems can be used in the early phase to find out problematic functions while there is no completed system service provided, for example this may be the case with device driver development. Emulators and run time debuggers for smartphones can be used to debug software faults when the smartphone operation system is in a relatively mature level. Nevertheless the development process becomes harder after the software has been deployed into the smartphone. It is difficult to check when, how and why a software fault has happened, and the fault information is difficult to collect as well. In Symbian 2 OS, MobileCrash is such a system which catches software faults, transmits fault logs, and helps analyzing software fault information from smartphones. In Wang’s master thesis, the MobileCrash system was firstly introduced and it is still undergoing development. There are two main functions of MobileCrash. Firstly, it provides a way to collect Symbian OS software fault data during the period when the software has been developed and deployed into the smartphone. Secondly, it provides a set of statistic data which can evaluate the product maturity. MobileCrash includes several software components installed on both smartphones and PCs. The system development includes techniques such as Symbian C++ development, Windows C++ development, Relationship Database and Web UI development [Wang, 2007]. In general, MobileCrash catches Symbian OS software faults by components called kernel agent and user agent. These MobileCrash agents installed on the smartphone can catch software faults, and collect useful data of the panicked software. The data includes panicked time call stack, a list of run time loaded binary modules, CPU registers, panic reason and category, CPU exception registers, the system event log and so on. Then MobileCrash transfers crash data via its SMS sender component through the GSM network into a crash log gateway which includes PC software components decoding and storing crash data into a database. Another option is to retrieve data from the smartphone via a USB connection to a PC workstation and forward them to the same server as the SMS sender component does. Software developers can check the decoded data through the MobileCrash web UI, and analyze that data to point out where the bug location might be in the panicked software component. The web UI also provides statistical data to help to analyze the software maturity level against software releases (Figure 1). 3 Figure 1. MobileCrash overview This paper will present new features and software fault analysis which are not presented in detail in Wang’s master thesis. To better understand the MobileCrash system and Symbian OS software fault analysis, the Symbian OS based smartphone design overview will be introduced in Chapter 2. Chapter 3 explains the software fault analysis as background knowledge. The MobileCrash system design in general is presented