Overview
About This Document
Problems may occur on each module throughout the lifecycle of software, which may affect the running of the module or even the software. Every software engineer should learn how to analyze and locate software problems. However, this has become an increasingly difficult job as the capacity or functionalities of software increases.
To help developers and users to better use the Kunpeng platform, this document describes the methods and cases of troubleshooting software problems based on the experience of Kunpeng software development and maintenance.
Software problems include kernel problems and application problems. The analysis methods and fault locating tools for application problems vary according to the development language. Therefore, this document involves two main categories: kernel problems and application problems. Application problems are described based on different development languages. In each part, we'll be introducing some common fault locating tools, analysis methods, and cases of specific software problems. In addition, the diagnosis and debugging functions included in the Kunpeng DevKit can help developers analyze problems such as memory leaks and out of memory (OOM) and quickly resolve the problems.
Software Problem Analysis
Figure 1 shows the general guideline for analyzing software problems. This document summarizes specific troubleshooting methods for each problem while observing this general guideline.
Common Analysis Methods
The following are common methods for analyzing software problems:
- Query software logs and information recorded in the /proc directory.
- Collect information by adding printing information to the code.
- Use a debugger such as GDB or kdb for step-by-step debugging.
- Use dump mechanisms such as LKCD or kdump to dump the information generated when software crashes for subsequent locating.
