System crash problem diagnosis method and device, equipment, storage medium and program
By obtaining and classifying the system equipment's hanging test information, and automatically diagnose the running time of the program language and the process crash type, the problem of inefficient positioning of the crash problem in the existing technology is solved, and efficient and accurate handling of the crash problem is achieved.
Patent Information
- Application Number
- CN202510438298.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-08
- Publication Date
- 2025-07-25
AI Technical Summary
In the prior art, the positioning method of system crash problems is inefficient and difficult to deal with complex situations, resulting in inefficient handling of crash problems.
By obtaining the test information of the target system device, we automatically classify the crash problem, including the crash type when the program language is running and the crash type when the process is stuck, and perform diagnostic analysis to obtain the crash problem diagnosis results.
It realizes the automatic and accurate positioning of crash problems, and improves the efficiency and accuracy of crash problems handling.
Smart Images

Figure CN120371579A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the technical field of system performance testing, and in particular, to a method, device, equipment, storage medium and program for diagnosing system crash problems. Background Art
[0002] With the increasing complexity of system device design, it has become an essential link to carry out stability testing on system devices before they are put into use.
[0003] During the stability testing process, due to the complex coupling relationship between components inside the system device and the diverse operating environments, many crash problems will inevitably occur. Currently, mainly information capture tools are used to capture information, and then manual classification of the information generated by the crash is carried out, and the crash problems are located. However, the efficiency of manually locating crash problems is low and it is difficult to handle complex situations. Summary of the Invention
[0004] The embodiments of the present invention provide a method, device, equipment, storage medium and program for diagnosing system crash problems, which can achieve automatic and accurate positioning of crash problems, and thus improve the efficiency and accuracy of handling crash problems.
[0005] According to one aspect of the present invention, there is provided a method for diagnosing system crash problems, including:
[0006] Obtaining the test information of the target system device;
[0007] When it is determined that there is a crash problem in the test information of the target system device, classifying the crash problem according to the test information of the target system device to obtain a crash problem classification result; wherein, the crash problem classification result includes a program language runtime crash type and a process stuck crash type;
[0008] Diagnosing and analyzing the crash problem classification result to obtain a crash problem diagnosis result.
[0009] According to another aspect of the present invention, there is provided a device for diagnosing system crash problems, including:
[0010] A test information acquisition module, configured to obtain the test information of the target system device;
[0011] A crash problem classification result acquisition module, configured to classify the crash problem according to the test information of the target system device to obtain a crash problem classification result when it is determined that there is a crash problem in the test information of the target system device; wherein, the crash problem classification result includes a program language runtime crash type and a process stuck crash type;
[0012] A crash problem diagnosis result acquisition module, which is used to diagnose and analyze the classification result of the crash problem to obtain a crash problem diagnosis result.
[0013] According to another aspect of the present invention, there is provided an electronic device, which includes:
[0014] At least one processor; and
[0015] A memory communicatively connected to the at least one processor; wherein,
[0016] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the system crash problem diagnosis method according to any embodiment of the present invention.
[0017] According to another aspect of the present invention, there is provided a computer-readable storage medium storing computer instructions for causing a processor to implement the system crash problem diagnosis method according to any embodiment of the present invention when executed.
[0018] According to another aspect of the present invention, there is also provided a computer program product including a computer program, which implements the system crash problem diagnosis method according to any embodiment of the present invention when executed by a processor.
[0019] In the embodiments of the present invention, the hanging test information of the target system device is acquired, and it is determined whether there is a crash problem in the hanging test information of the target system device. When it is determined that there is a crash problem in the hanging test information of the target system device, the crash problem can be classified according to the hanging test information of the target system device to obtain a crash problem classification result including a program language runtime crash type and a process stuck crash type. Thus, the crash problem classification result can be diagnosed and analyzed to obtain a crash problem diagnosis result, which solves the problems of low efficiency and difficulty in handling complex situations of the existing method for manually locating crash problems, can realize the automatic and accurate location of crash problems, and further improve the efficiency and accuracy of handling crash problems.
[0020] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present invention, nor is it used to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. Description of the Drawings
[0021] To more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the accompanying drawings required for the description of the embodiments. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can be obtained based on these drawings.
[0022] Figure 1 is a flowchart of a method for diagnosing system crash problems provided in Embodiment 1 of the present invention;
[0023] Figure 2 is a flowchart of a method for diagnosing system crash problems provided in Embodiment 2 of the present invention;
[0024] Figure 3 is a flowchart of a specific automated diagnosis of system crash problems provided in Embodiment 2 of the present invention;
[0025] Figure 4 is a schematic diagram of a device for diagnosing system crash problems provided in Embodiment 3 of the present invention;
[0026] Figure 5 is a schematic diagram of the structure of an electronic device provided in Embodiment 4 of the present invention. Detailed implementation manners
[0027] In order to enable those skilled in the art to better understand the solutions of the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0028] It should be noted that the terms "target" and the like in the specification and claims of the present invention and the above accompanying drawings are used to distinguish similar objects, and do not have to be used to describe a specific order or sequence. It should be understood that such used data can be interchanged under appropriate circumstances so that the embodiments of the present invention described here can be implemented in an order other than those illustrated or described here. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or are inherent to these processes, methods, products, or devices.
[0029] Embodiment 1
[0030] Figure 1It is a flowchart of a method for diagnosing system crash problems provided in the first embodiment of the present invention. This embodiment is applicable to the situation of automatically locating system crash problems based on hanging test information. This method can be executed by a system crash problem diagnosis device, which can be implemented in software and / or hardware, and is generally integrated in an electronic device. The electronic device can be a terminal device or a server device, as long as it can execute the system crash problem diagnosis method. The present invention does not limit the specific device type of the electronic device. Correspondingly, as Figure 1 shown, the method includes the following operations:
[0031] S110. Obtain the hanging test information of the target system device.
[0032] Among them, the target system device can be any device to be subjected to stability testing. For example, it can include but is not limited to devices equipped with the open-source Harmony (OpenHarmony) system, devices equipped with the Android system, or devices equipped with the Microsoft Windows operating system, etc., as long as it is a device with stability testing requirements. The present invention does not limit the specific device type of the target system device. The hanging test information can be data and information collected during the process of evaluating and accepting the performance, function, and stability of the target system device through a series of testing means during the stability testing of the target system device. The hanging test information can include but is not limited to the resource usage of the target system device, the process and service status, system log information, and system error and exception information, etc. The present invention does not limit the specific content of the hanging test information.
[0033] In the embodiment of the present invention, in order to locate the crash problem during the stability testing of the target system device, first, the stability testing of the target system device can be performed. In a specific example, the stability testing of the target system device can be performed by sending a pseudo-random user event stream to the target system device, such as key input, touch screen input, or gesture input, etc. The present invention does not limit the specific method of stability testing. Further, the hanging test information during the stability testing of the target system device can be obtained as the basis for locating the crash problem of the target system device.
[0034] Optionally, before performing the stability testing on the target system device, the relevant environment can be configured for the test device to ensure that the tested device, i.e., the target system device, can be correctly linked by executing the interaction command.
[0035] S120. Determine whether there is a crash problem in the hanging test information of the target system device. If so, execute S130; otherwise, end.
[0036] Among them, the crash problem can be a phenomenon that during the operation of the system, due to abnormal conditions such as uncaught exceptions in the code, accessing uninitialized or already released objects, and not correctly releasing resources, the program cannot execute normally and then terminates unexpectedly. The crash problem not only causes the program to stop responding to user input and automatically close the application, but may even lead to the overall instability of the system. Therefore, it is crucial to quickly and accurately locate the root cause of the crash problem.
[0037] S130. Classify the crash problem according to the hang test information of the target system device to obtain a crash problem classification result; among them, the crash problem classification result includes a runtime crash type of the programming language and a process stuck crash type.
[0038] Among them, the crash problem classification result can be the result obtained by classifying the crash problem according to the hang test information. Exemplarily, the crash problem classification result can include, but is not limited to, the runtime crash type of the programming language and the process stuck crash type, etc. The embodiments of the present invention do not limit the specific content of the crash problem classification result. The runtime crash type of the programming language can be a phenomenon that during the operation of the program, due to certain abnormal situations, it cannot execute normally and then terminates unexpectedly. The process stuck crash type can be a phenomenon that the process is in an abnormal state and cannot continue to execute or respond to external events.
[0039] Specifically, in the case where it is determined that there is a crash problem in the hang test information of the target system device, the crash problem can be classified according to the hang test information of the target system device to obtain a crash problem classification result. For example, it can be divided into the runtime crash type of the programming language and the process stuck crash type. In a specific example, the reasons for the runtime crash type of the programming language can include, but are not limited to, not correctly releasing resources, using unreliable or known problematic third-party libraries, and insufficient available memory of the system, etc.; the reasons for the process stuck crash type can include, but are not limited to, software errors, hardware failures, resource shortages, or system configuration problems, etc. The embodiments of the present invention do not limit the specific causes of the runtime crash type of the programming language and the process stuck crash type. If it is determined that there is no crash problem in the hang test information of the target system device, this indicates that the stability performance of the target system device is good, and then the further judgment process can be terminated at this time.
[0040] S140. Conduct a diagnostic analysis on the crash problem classification result to obtain a crash problem diagnosis result.
[0041] Correspondingly, after automatically classifying the crash problem according to the hang test information of the target system device to obtain a crash problem classification result, according to the crash problem classification result, automated diagnostic analysis can be carried out for different crash types respectively, so as to obtain a crash problem diagnosis result.
[0042] As can be seen, the technical solution of the embodiment of the present invention can help developers quickly locate crash problems by automatically classifying and diagnosing crash problems. This solution breaks through the limitation of semantic understanding and solves the problem of low efficiency of manual diagnosis. At the same time, the technical solution of the embodiment of the present invention can automatically obtain the hanging test information of the target system device, thereby ensuring the accuracy, reliability and compliance of data capture.
[0043] The embodiment of the present invention obtains the hanging test information of the target system device and determines whether there is a crash problem in the hanging test information of the target system device. When it is determined that there is a crash problem in the hanging test information of the target system device, the crash problem can be classified according to the hanging test information of the target system device to obtain a crash problem classification result including a program language runtime crash type and a process stuck crash type, so that the crash problem classification result can be diagnosed and analyzed to obtain a crash problem diagnosis result, which solves the problems of low efficiency and difficulty in handling complex situations of the existing method for manually locating crash problems, can achieve automatic and accurate positioning of crash problems, and further improve the efficiency and accuracy of crash problem handling.
[0044] Embodiment 2
[0045] Figure 2 is a flowchart of a method for diagnosing system crash problems provided by the second embodiment of the present invention. Figure 3 is a flowchart of a specific automatic diagnosis of system crash problems provided by the second embodiment of the present invention. This embodiment is specific based on the above embodiment. In this embodiment, specific optional implementation methods for determining that there is a crash problem in the hanging test information of the target system device and classifying the crash problem according to the hanging test information of the target system device to obtain a crash problem classification result are given. At the same time, optional implementation operations after classifying the crash problem according to the hanging test information of the target system device to obtain a crash problem classification result are also given. Correspondingly, as Figure 2 and Figure 3 shown, the method of this embodiment may include:
[0046] S210. Obtain the hanging test information of the target system device.
[0047] S220. Determine whether there is a crash problem in the hanging test information of the target system device. If so, execute S230; otherwise, end.
[0048] In an alternative embodiment of the present invention, determining that there is a crash problem with the hang test information of the target system device may include: traversing the hang test information of the target system device; when it is determined that the target crash folder exists in the hang test information and it is determined that the target crash file exists in the target crash folder, determining that there is a crash problem with the hang test information of the target device.
[0049] Wherein, the target crash folder may be a folder generated due to a crash problem during the stability test of the target system device. The target crash file may be a file generated due to a crash problem during the stability test of the target system device.
[0050] In an embodiment of the present invention, the target crash folder and the target crash file are used to store various information related to crashes. For example, it may include but is not limited to crash logs, stack trace information, and system state snapshots, etc. The embodiment of the present invention does not limit the specific content included in the target crash folder and the target crash file. Therefore, the target crash folder and the target crash file can be used as important reference bases for locating crash problems and analyzing crash causes.
[0051] Correspondingly, to determine whether there is a crash problem with the hang test information of the target system device, first, the hang test information of the target system device can be traversed to determine whether the target crash folder exists in the hang test information. If the target crash folder does not exist in the hang test information, it indicates that there is no crash problem in the hang test information, and the further judgment process can be ended; if the target crash folder exists in the hang test information, it can be further determined whether the target crash file exists in the target crash folder. If the target crash file does not exist in the target crash folder, it indicates that there is no crash problem in the hang test information, and the further judgment process can be ended; if the target crash file exists in the target crash folder, it can be determined that there is a crash problem in the hang test information of the target device.
[0052] In a specific example, assuming that the target system device is equipped with the OpenHarmony system, the hang test information of the target system device can be analyzed through a debugging tool. First, it can be determined whether there is a target crash folder with a natural number numbering in the hang test information. For example, folders named "1", "2", or "3". When it is determined that there is a target crash folder with a natural number numbering, it can be further determined whether the target crash file exists in the target crash folder. The name of the target crash file can be "crash + crash process name", such as "cppcrash-audio_host-3127-20241219215223". If it is determined that the target crash file exists in the target crash folder, it indicates that there is a crash problem in the hang test information of the target system device.
[0053] S230. Obtain the file name of the target crash file in the hanging test information of the target system device.
[0054] In an embodiment of the present invention, the automatic classification of crash problems can be achieved by obtaining and identifying the file name of the target crash file in the hanging test information.
[0055] S240. Classify the crash problems of the target system device according to the file name of the target crash file to obtain a crash problem classification result.
[0056] Correspondingly, after obtaining the file name of the target crash file in the hanging test information of the target system device, the crash problems can be classified according to the file name of the target crash file. In a specific example, assuming that the file name of the target crash file is "cppcrash-audio_host-3127-20241219215223", then according to "cppcrash (C language or C++ runtime crash)" in the target crash file name, it can be determined that the type of the crash problem corresponding to the target crash file belongs to the program language runtime crash type.
[0057] S250. Extract the classification reference information of the sub-crash problems corresponding to each main crash problem according to the target crash file.
[0058] Among them, the main crash problem is the crash problem classification result. The sub-crash problem can be a refined classification of the main crash problem. The classification reference information of the sub-crash problem can be various information based on which the sub-crash problem is classified.
[0059] In an embodiment of the present invention, after classifying the crash problems of the target system device according to the file name of the target crash file to obtain the crash problem classification result, that is, each main crash problem, the information of the target crash file can be extracted as the classification reference information of the sub-crash problems corresponding to each main crash problem.
[0060] In a specific example, assuming that the target system device is equipped with the OpenHarmony system, the main crash problems may include, but are not limited to, cppcrash, jscrash (crash during TypeScript runtime), appfreeze (application process stuck), and sysfreeze (service process stuck), etc. The embodiments of the present invention do not limit the specific crash types included in the main crash problems. Further, the crash problems of the cppcrash type may include, but are not limited to, SIGILL (Signal IllegalInstruction, illegal instruction signal), SIGTRAP (Signal Trap, trace trap signal), SIGABRT (SignalAbort, abnormal termination signal), SIGBUS (Signal Bus Error, bus error signal), SIGFPE (SignalFloating Point Exception, floating point exception signal), SIGSEGV (Signal Segmentation Fault, segment fault signal), SIGSTKFLT (Stack Fault Signal, stack fault signal), and SIGSYS (SIGnal:SYStem callbad argument, signal: system call error parameter), etc. sub-crash problems. The crash problems of the jscrash type may include, but are not limited to, SyntaxError (Syntax Error, syntax error), RangeError (Range Error, range error), ReferenceError (Reference Error, reference error), and TypeError (Type Error, type error), etc. sub-crash problems. The crash problems of the appfreeze type may include, but are not limited to, THREAD_BLOCK_6S (Thread Blockedfor 6Seconds, thread blocked for 6 seconds), APP_INPUT_BLOCK (Application Input Block, application input block), LIFECYCLE_TIMEOUT (Lifecycle Timeout, lifecycle timeout), and SERVICE_TIMEOUT (Service Timeout, service timeout), etc. sub-crash problems. The crash problems of the sysfreeze type may include, but are not limited to, EVENTNAME (Event Name, event name), etc. sub-crash problems, where EVENTNAME is used to identify the specific event name of the stuck situation.
[0061] S260. Analyze the classification reference information of the sub-crash problems corresponding to each main crash problem to obtain a crash information analysis result.
[0062] Among them, the crash information analysis result can be the result obtained by analyzing the classification reference information of the sub-crash problems. Exemplarily, the crash information analysis result can include but is not limited to the crash type, crash path, and crash information associated data of the sub-crash problems. The embodiments of the present invention do not limit the specific content included in the crash information analysis result. The crash information associated data can be various data information associated with the crash problem. Based on the crash information associated data, the cause of the crash problem can be quickly located and analyzed.
[0063] Correspondingly, after obtaining the classification reference information of the sub-crash problems corresponding to each main crash problem, it can be generated into crash information in a fixed format, such as "# serial number program counter identifier address dynamic shared library path other information". Further, each part of the information can be parsed by identifying # and spaces as the crash information analysis result. Among them, the serial number can be the line number in the crash stack. According to the serial number, the call path when the crash problem occurs can be traced in sequence. The program counter identifier can be the instruction address when the crash problem occurs. According to the program counter identifier, the specific position where the program executes when the crash problem occurs can be determined. The address can be the memory address when the crash problem occurs. Through the address, the specific code position where the crash problem occurs can be located. The dynamic shared library path can be the path of the shared library where the crash problem occurs. Through the dynamic shared library path, it can be determined which dynamic shared library the crash problem occurs in. The other information can include but is not limited to function name, offset, thread information, and signal type information, etc., which can provide more context information and is conducive to more comprehensively understanding the cause of the crash problem. Therefore, the crash type of the sub-crash problem can be determined according to the header information of the target crash file. The crash path of the sub-crash problem can be determined according to the serial number, program counter identifier, address, and dynamic shared library path. The other information is other additional information related to the crash problem, that is, the crash information associated data.
[0064] S270. Deduplicate the sub-crash problems with the same crash type and the same crash path according to the crash information analysis result.
[0065] Correspondingly, after obtaining the crash information analysis result, the sub-crash problems with the same crash type and the same crash path can be summarized and deduplicated according to the crash information analysis result.
[0066] Optionally, target table files can be generated for each main crash problem and each sub-crash problem, so that each main crash problem and each sub-crash problem can be classified and viewed through the target table files. The target table files can include, but are not limited to, the types of each crash problem and the number of times the crash problem occurs. At the same time, the target crash files of sub-crash problems with the same crash type and the same crash path can be classified, and the number of error reports can be counted to achieve the effect of deduplication, which is convenient for developers to locate and solve different problems and avoid repeated location of the same crash problem.
[0067] S280. Perform diagnostic analysis on the classification result of the crash problem to obtain a crash problem diagnosis result.
[0068] In an optional embodiment of the present invention, the program language runtime crash type may include a first program language runtime crash and a second program language runtime crash; the crash problem diagnosis result may include a dynamic shared library path and the crash address; the performing diagnostic analysis on the classification result of the crash problem to obtain a crash problem diagnosis result may include: in the case where it is determined that the classification result of the crash problem is the first program language runtime crash, parsing and filtering the file header of the target crash file to obtain the crash problem diagnosis result of the first program language runtime crash; in the case where it is determined that the classification result of the crash problem is the second program language runtime crash, parsing and filtering the module names and stack traces of the target crash file to obtain the crash problem diagnosis result of the second program language runtime crash.
[0069] Among them, the first program language runtime crash may be a phenomenon that a certain program language, such as C language or C++, fails to execute normally due to certain abnormal situations during the running process and then terminates the running unexpectedly. The second program language runtime crash may be a phenomenon that another program language, such as TypeScript, fails to execute normally due to certain abnormal situations during the running process and then terminates the running unexpectedly. It can be understood that the first program language and the second program language are different program languages. The dynamic shared library path may be the storage location of the dynamic shared library. The file header of the target crash file may be a data structure located at the starting position of the target crash file. The module name may be a string or identifier of a software module or component in the target system device. The stack trace may be a report used to record the function call order during the running of the program.
[0070] In a specific example, assume that the target system device is equipped with the OpenHarmony system. When the first programming language crashes during runtime, it is a cppcrash - type crash problem, and when the second programming language crashes during runtime, it is a jscrash - type crash problem. In the process of diagnosing and analyzing the classification result of the crash problem to obtain the crash problem diagnosis result, if the classification result of the crash problem is a cppcrash - type crash problem, and the target crash file corresponding to the cppcrash - type crash problem generated within the current OpenHarmony system is an encrypted file that cannot be directly opened and viewed, then a tool can be used to parse the file header of the target crash file corresponding to the cppcrash - type crash problem, parse the encrypted file into directly readable information, and the crash problem diagnosis result of the first programming language crashing during runtime, including the crash path and dynamic shared libraries, can be obtained by screening the parsed information. If the classification result of the crash problem is a jscrash - type crash problem, then Python can be used to parse the module names and stack traces of the target crash file, and screen the parsed information to obtain the crash problem diagnosis result of the second programming language crashing during runtime, including the crash path and dynamic shared libraries.
[0071] In an optional embodiment of the present invention, the process stuck - and - crashed type includes application process stuck - and - crashed and service process stuck - and - crashed; the crash problem diagnosis result includes the dynamic shared library path and the crash address; the diagnosing and analyzing the classification result of the crash problem to obtain the crash problem diagnosis result includes: when it is determined that the classification result of the crash problem is the application process stuck - and - crashed, parsing and screening the thread identifier, package name, and stack trace of the target crash file to obtain the crash problem diagnosis result of the application process stuck - and - crashed; when it is determined that the classification result of the crash problem is the service process stuck - and - crashed, parsing and screening the process identifier and package name of the target crash file to obtain the crash problem diagnosis result of the service process stuck - and - crashed.
[0072] Among them, the application process stuck - and - crashed may be a phenomenon where, during the running of an application program, due to certain reasons, it cannot normally respond to user operations or system events, and is finally forcibly terminated by the system or crashes by itself. The service process stuck - and - crashed may be a phenomenon where, during the running of a service process, due to certain reasons, it cannot normally respond to requests or system events, and is finally forcibly terminated by the system or crashes by itself. The thread identifier may be a numerical value or symbol used to uniquely identify a thread. The package name may be the unique identification name of a software package or application program. The process identifier may be the unique numerical identifier assigned by the operating system to each running process.
[0073] Continuing with the above example, during the process of diagnosing and analyzing the classification result of the crash problem to obtain the crash problem diagnosis result, if it is determined that the classification result of the crash problem is that the application process is stuck and crashes, Python can be used to parse the thread identifier, package name, and stack trace of the target crash file, and filter the parsed information, so as to obtain the crash problem diagnosis result of the application process stuck and crashing, including the dynamic shared library path and the crash address. If it is determined that the classification result of the crash problem is that the service process is stuck and crashes, Python can be used to parse the process identifier and package name of the target crash file, and filter the parsed information, so as to obtain the crash problem diagnosis result of the service process stuck and crashing, including the dynamic shared library path and the crash address.
[0074] Optionally, after obtaining the crash problem diagnosis result, the crash problem diagnosis result can be used as a parameter of the addr2line command to generate specific crash code information including the crash code path and the specific line number. Among them, addr2line is a standard command line that can generate the crash code location based on the existing dynamic shared library path and the crash address.
[0075] Optionally, as Figure 3 shown, after obtaining the specific crash code information, relevant staff can confirm and analyze the crash problem diagnosis result, and modify the code with crash problems. After the code modification is completed, the stability test can be carried out again, and the crash problems during the stability process can be automatically classified, de-duplicated, and located again.
[0076] In the embodiment of the present invention, the hanging test information of the target system device is obtained, and it is judged whether there is a crash problem in the hanging test information of the target system device. In the case of determining that there is a crash problem in the hanging test information of the target system device, the file name of the target crash file in the hanging test information of the target system device can be obtained, and the crash problem of the target system device can be classified according to the file name of the target crash file to obtain the classification result of the crash problem. Further, after obtaining the classification result of the crash problem, the classification reference information of the sub-crash problems corresponding to each main crash problem can be extracted from the target crash file, and the classification reference information of the sub-crash problems corresponding to each main crash problem can be parsed, so as to obtain the crash information parsing result. Furthermore, the sub-crash problems with the same crash type and the same crash path can be de-duplicated according to the crash information parsing result. Further, the classification result of the crash problem can be diagnosed and analyzed to obtain the crash problem diagnosis result. The above solution solves the problems of low efficiency and difficulty in handling complex situations in the existing manual method for locating crash problems, and can realize the automatic and accurate location of crash problems, thereby improving the efficiency and accuracy of crash problem handling.
[0077] In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision, and disclosure of user personal information and other processing all comply with the provisions of relevant laws and regulations and do not violate public order and good customs.
[0078] It should be noted that the relevant information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for display, data for analysis, etc.) involved in the present disclosure are all information and data authorized by the user or fully authorized by all parties, and the collection, use, and processing of the relevant data comply with the relevant laws, regulations, and standards of the relevant regions.
[0079] It should be noted that any permutation and combination of the technical features in the above embodiments also fall within the protection scope of the present invention.
[0080] Embodiment III
[0081] Figure 4 is a schematic diagram of a system crash problem diagnosis device provided in Embodiment III of the present invention, as Figure 4 shown, the device includes: a hanging test information acquisition module 310, a crash problem classification result acquisition module 320, and a crash problem diagnosis result acquisition module 330, where:
[0082] The hanging test information acquisition module 310 is used to acquire the hanging test information of the target system device.
[0083] The crash problem classification result acquisition module 320 is used to classify the crash problem according to the hanging test information of the target system device to obtain a crash problem classification result when it is determined that there is a crash problem in the hanging test information of the target system device; wherein, the crash problem classification result includes a program language runtime crash type and a process stuck crash type.
[0084] The crash problem diagnosis result acquisition module 330 is used to perform diagnostic analysis on the crash problem classification result to obtain a crash problem diagnosis result.
[0085] In the embodiment of the present invention, the hanging test information of the target system device is acquired, and it is determined whether there is a crash problem in the hanging test information of the target system device. When it is determined that there is a crash problem in the hanging test information of the target system device, the crash problem can be classified according to the hanging test information of the target system device to obtain a crash problem classification result including a program language runtime crash type and a process stuck crash type, so that the crash problem classification result can be diagnostically analyzed to obtain a crash problem diagnosis result, solving the problem that the existing method for manually locating crash problems is inefficient and difficult to handle complex situations, and being able to achieve automatic and accurate positioning of crash problems, thereby improving the efficiency and accuracy of crash problem handling.
[0086] Optionally, the crash problem classification result acquisition module 320 is specifically configured to: traverse the attached test information of the target system device; when it is determined that the target crash folder exists in the attached test information and the target crash file exists in the target crash folder, determine that there is a crash problem in the attached test information of the target device.
[0087] Optionally, the crash problem classification result acquisition module 320 is further configured to: obtain the file name of the target crash file in the attached test information of the target system device; classify the crash problems of the target system device according to the file name of the target crash file to obtain a crash problem classification result.
[0088] Optionally, the above device may further include a crash problem deduplication module, which is specifically configured to extract classification reference information of sub-crash problems corresponding to each main crash problem according to the target crash file; analyze the classification reference information of sub-crash problems corresponding to each main crash problem to obtain a crash information analysis result; wherein, the crash information analysis result includes the crash type, crash path, and crash information association data of the sub-crash problem; deduplicate sub-crash problems with the same crash type and the same crash path according to the crash information analysis result.
[0089] Optionally, the crash type during program language runtime includes the first crash during program language runtime and the second crash during program language runtime; the crash problem diagnosis result includes the dynamic shared library path and the crash address; the crash problem diagnosis result acquisition module 330 is specifically configured to: when it is determined that the crash problem classification result is the first crash during program language runtime, analyze and filter the file header of the target crash file to obtain the crash problem diagnosis result of the first crash during program language runtime; when it is determined that the crash problem classification result is the second crash during program language runtime, analyze and filter the module names and stack traces of the target crash file to obtain the crash problem diagnosis result of the second crash during program language runtime.
[0090] Optionally, the crash type of process stuck includes the crash of application process stuck and the crash of service process stuck; the crash problem diagnosis result includes the dynamic shared library path and the crash address; the crash problem diagnosis result acquisition module 330 is further configured to: when it is determined that the crash problem classification result is the crash of application process stuck, analyze and filter the thread identifier, package name, and stack trace of the target crash file to obtain the crash problem diagnosis result of the crash of application process stuck; when it is determined that the crash problem classification result is the crash of service process stuck, analyze and filter the process identifier and package name of the target crash file to obtain the crash problem diagnosis result of the crash of service process stuck.
[0091] The above system crash problem diagnosis device can execute the system crash problem diagnosis method provided by any embodiment of the present invention, and has the corresponding function modules and beneficial effects for executing the method. For technical details not described in detail in this embodiment, reference can be made to the system crash problem diagnosis method provided by any embodiment of the present invention.
[0092] Since the above-introduced system crash problem diagnosis device is a device that can execute the system crash problem diagnosis method in the embodiments of the present invention, based on the system crash problem diagnosis method introduced in the embodiments of the present invention, those skilled in the art can understand the specific implementation manners and various variations of the system crash problem diagnosis device in this embodiment. Therefore, the specific implementation of how the system crash problem diagnosis device implements the system crash problem diagnosis method in the embodiments of the present invention will not be described in detail here. As long as the device adopted by those skilled in the art to implement the system crash problem diagnosis method in the embodiments of the present invention belongs to the scope to be protected by this application.
[0093] Embodiment 4
[0094] Figure 5 FIG. shows a schematic structural diagram of an electronic device 10 that can be used to implement the embodiments of the present invention. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or claimed herein.
[0095] As Figure 5 shown, the electronic device 10 includes at least one processor 11, and a memory communicatively connected to at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc. Among them, the memory stores a computer program executable by at least one processor. The processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. The input / output (I / O) interface 15 is also connected to the bus 14.
[0096] Multiple components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disc, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0097] The processor 11 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the system crash problem diagnosis method.
[0098] In some embodiments, the system crash problem diagnosis method can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the system crash problem diagnosis method described above can be executed. Alternatively, in other embodiments, the processor 11 can be configured to execute the system crash problem diagnosis method by any other suitable means (e.g., by means of firmware).
[0099] Optionally, the system crash problem diagnosis method may include: obtaining the hanging test information of the target system device; in the case of determining that there is a crash problem in the hanging test information of the target system device, classifying the crash problem according to the hanging test information of the target system device to obtain a crash problem classification result; wherein, the crash problem classification result includes a program language runtime crash type and a process stuck crash type; diagnosing and analyzing the crash problem classification result to obtain a crash problem diagnosis result.
[0100] The various embodiments of the systems and techniques described above in this specification can be implemented in digital electronic circuitry, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems-on-chip (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: being implemented in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be a special-purpose or general-purpose programmable processor that receives data and instructions from, and transmits data and instructions to, a storage system, at least one input device, and at least one output device.
[0101] The computer programs for implementing the methods of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions / operations specified in the flowchart and / or block diagram to be implemented. The computer programs can be executed entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
[0102] In the context of the present invention, a computer-readable storage medium can be a tangible medium that can contain or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer-readable storage medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, the computer-readable storage medium can be a machine-readable signal medium. More specific examples of the machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0103] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the electronic device. Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0104] The systems and techniques described herein can be implemented in a computing system including backend components (e.g., as a data server), or a computing system including middleware components (e.g., an application server), or a computing system including frontend components (e.g., a user computer having a graphical user interface or a web browser through which the user can interact with an implementation of the systems and techniques described herein), or a computing system including any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected to each other by digital data communication in any form or medium (e.g., a communication network). Examples of communication networks include: local area network (LAN), wide area network (WAN), blockchain network, and the Internet.
[0105] A computing system can include a client and a server. The client and the server are generally remote from each other and typically interact through a communication network. The client-server relationship is created by computer programs running on respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or a cloud host, which is a host product in the cloud computing service system and solves the defects of difficult management and weak business scalability existing in traditional physical hosts and VPS services.
[0106] It should be understood that various forms of the processes shown above can be used, with steps reordered, added, or deleted. For example, the steps recited in this disclosure can be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and no limitation is imposed herein.
[0107] The above specific embodiments do not constitute a limitation on the protection scope of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure shall be included within the protection scope of this disclosure.
Claims
1. A method for diagnosing system crash problems, characterized in that, Including: Obtaining the hanging test information of the target system device; When it is determined that there is a crash problem in the hanging test information of the target system device, classifying the crash problem according to the hanging test information of the target system device to obtain a crash problem classification result; wherein, the crash problem classification result includes a program language runtime crash type and a process stuck crash type; Diagnostically analyzing the crash problem classification result to obtain a crash problem diagnosis result.
2. The method according to claim 1, wherein The determination that there is a crash problem in the hanging test information of the target system device includes: Traversing the hanging test information of the target system device; When it is determined that the target crash folder exists in the hanging test information and it is determined that the target crash file exists in the target crash folder, it is determined that there is a crash problem in the hanging test information of the target device.
3. The method according to claim 2, wherein The classifying the crash problem according to the hanging test information of the target system device to obtain a crash problem classification result includes: Obtaining the file name of the target crash file in the hanging test information of the target system device; Classifying the crash problem of the target system device according to the file name of the target crash file to obtain a crash problem classification result.
4. The method according to claim 3, wherein After classifying the crash problem according to the hanging test information of the target system device to obtain a crash problem classification result, it further includes: Extracting the classification reference information of the sub-crash problems corresponding to each main crash problem according to the target crash file; Parsing the classification reference information of the sub-crash problems corresponding to each main crash problem to obtain a crash information parsing result; wherein, the crash information parsing result includes the crash type, crash path and crash information association data of the sub-crash problem; Deduplicating the sub-crash problems with the same crash type and the same crash path according to the crash information parsing result.
5. The method according to claim 4, characterized in that, The program language runtime crash type includes a first program language runtime crash and a second program language runtime crash; the crash problem diagnosis result includes a dynamic shared library path and the crash address; The diagnostically analyzing the crash problem classification result to obtain a crash problem diagnosis result includes: When it is determined that the crash problem classification result is the first program language runtime crash, parsing and screening the file header of the target crash file to obtain the crash problem diagnosis result of the first program language runtime crash; When it is determined that the crash problem classification result is the second program language runtime crash, parsing and screening the module names and stack traces of the target crash file to obtain the crash problem diagnosis result of the second program language runtime crash.
6. The method according to claim 4, wherein The process stuck crash type includes an application process stuck crash and a service process stuck crash; the crash problem diagnosis result includes a dynamic shared library path and the crash address; The diagnostically analyzing the crash problem classification result to obtain a crash problem diagnosis result includes: In the case where the classified result of the crash problem is determined to be the application process getting stuck and crashing, the thread identifier, package name, and stack trace of the target crash file are parsed and filtered to obtain the diagnostic result of the crash problem of the application process getting stuck and crashing; In the case where the classified result of the crash problem is determined to be the service process getting stuck and crashing, the process identifier and package name of the target crash file are parsed and filtered to obtain the diagnostic result of the crash problem of the service process getting stuck and crashing.
7. A system crash problem diagnosis device, characterized in that, It includes: A hanging test information acquisition module, configured to acquire the hanging test information of a target system device; A crash problem classification result acquisition module, configured to classify the crash problem according to the hanging test information of the target system device in the case where it is determined that there is a crash problem in the hanging test information of the target system device, so as to obtain a crash problem classification result; wherein, the crash problem classification result includes a program language runtime crash type and a process getting stuck and crashing type; A crash problem diagnostic result acquisition module, configured to perform diagnostic analysis on the crash problem classification result to obtain a crash problem diagnostic result.
8. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the system crash problem diagnostic method according to any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions, and the computer instructions are used to implement the system crash problem diagnostic method according to any one of claims 1-6 when executed by a processor.
10. A computer program product comprising a computer program / instructions, wherein, The computer program / instructions, when executed by a processor, implement the system crash problem diagnostic method according to any one of claims 1-6.