Data processing method and device, equipment, storage medium and computer program product
By storing the core dump data of the coroutine in the storage area of the thread, and using the thread core dump data to analyze the coroutine fault, the problem of rapid location and repair of the coroutine fault is solved, and the fault repair rate and efficiency are improved.
Patent Information
- Application Number
- CN202410934950.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-12
- Publication Date
- 2024-10-08
AI Technical Summary
The existing technology is difficult to quickly locate and repair the fault of the main scheduling process of the coroutine through the core dump method. Especially when the application crashes or terminates abnormally, the thread core dump data cannot be effectively used to analyze the coroutine fault.
By determining the coroutine identification information, obtain and store the core dump data of the coroutine into the storage area of the target thread, and use the thread core dump data to analyze the coroutine core dump data to achieve rapid location and repair of coroutine faults.
It improves the repair rate of coroutine faults, reduces development costs and resource consumption, directly uses thread core dump data to analyze coroutine core dump data, and solves the problem of rapid location and repair of coroutine faults.
Smart Images

Figure CN118747110A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer applications, and in particular to a data processing method, apparatus, device, storage medium and computer program product. Background Art
[0002] With the rapid development of Internet technology, the Internet has been widely used. In the process of Internet application, various services are usually implemented through different applications. However, during the operation of the application, due to the influence of various conditions, it is easy to have failures such as application crash or abnormal termination, causing business crash. How to quickly solve the failures such as sudden crash or abnormal termination of such applications has become a technical problem that needs to be solved urgently. At present, a commonly used solution is to implement it through a core dump mode, that is, during the operation of the application, the memory state and thread call stack information when the failures such as program crash or abnormal termination occur are stored in an executable and linkable format (Executable and Linkable Format, ELF format) to implement core dump, and then read the thread call stack information in the core dump through a debugger and parse it to locate the failures such as program crash or abnormal termination, so that the application can quickly resume normal operation.
[0003] At present, the above scheme is mainly implemented for threads. However, when some threads are implemented by processes mainly scheduled by coroutines, they cannot be implemented by the above method. How to quickly confirm faults such as program crashes or abnormal terminations of processes mainly scheduled by coroutines has become a technical problem that urgently needs to be solved.
[0004] Application Contents
[0005] In order to solve the above-mentioned technical problems, the present application hopes to provide a data processing method, apparatus, equipment, storage medium and computer program product, which solves the problem that core dump cannot be used to quickly repair faults in processes mainly scheduled by coroutines, and proposes a technical solution for quickly locating faults by using core dump for processes mainly scheduled by coroutines, thereby ensuring the fault repair rate.
[0006] The technical solution of this application is implemented as follows:
[0007] The present application provides a data processing method, the method comprising:
[0008] Determine the coroutine identification information of m first coroutines; wherein m is an integer greater than or equal to 1;
[0009] Based on each of the coroutine identification information, determining a target storage area for storing the core dump data corresponding to each of the coroutine identification information;
[0010] Acquire core dump data from each of the target storage areas to obtain m target core dump data of the first coroutines;
[0011] Storing m target core dump data in a thread storage area of a target thread to which the coroutine identification information belongs;
[0012] The target core dump data of the m first coroutines in the thread storage area are displayed.
[0013] In the above scheme, before storing the m target core dump data in the thread storage area of the target thread to which the coroutine identification information belongs, the method further includes:
[0014] Obtaining thread core dump data in the thread storage area;
[0015] Back up the thread core dump data.
[0016] In the above solution, after displaying the target core dump data of the m first coroutines in the thread storage area, the method further includes:
[0017] The backed-up thread core dump data is stored in the thread storage area.
[0018] In the above solution, before determining the coroutine identification information of the m first coroutines, the method further includes:
[0019] Determine n second coroutines included in the target thread; wherein the n second coroutines include m first coroutines;
[0020] Creating a corresponding data storage area for each of the second coroutines to obtain n data storage areas; wherein the n data storage areas include m target storage areas;
[0021] Obtaining n coroutine core dump data of the second coroutine;
[0022] The coroutine core dump data of each second coroutine is stored in the corresponding data storage area.
[0023] In the above solution, the step of obtaining the coroutine core dump data of n second coroutines includes:
[0024] Obtaining thread core dump data of the target thread;
[0025] Parse the thread core dump data to obtain n pieces of the coroutine core dump data of the second coroutine.
[0026] In the above solution, obtaining the thread core dump data of the target thread includes:
[0027] Determine a data storage format of a data file including the thread core dump data;
[0028] Based on the data storage format, determining a target storage location of the thread core dump data;
[0029] The thread core dump data is obtained from the target storage location.
[0030] In the above solution, determining the target storage location of the thread core dump data based on the data storage format includes:
[0031] Read the file header of the data storage format;
[0032] Determine a program header of a target application program including the target thread based on the file header;
[0033] Determine the additional information header and offset position of the target application based on the program header;
[0034] The target storage position is determined based on the additional information header and the offset position.
[0035] In the above solution, obtaining the thread core dump data from the target storage location includes:
[0036] Acquire, from the target storage location, additional information corresponding to at least one reference thread included in the target application; wherein at least one of the reference threads includes the target thread;
[0037] The thread core dump data is obtained from the additional information.
[0038] The present application provides a data processing device, the device comprising: a first determining unit, a second determining unit, a first acquiring unit, a storage unit and a display unit; wherein:
[0039] The first determining unit is used to determine the coroutine identification information of m first coroutines; wherein m is an integer greater than or equal to 1;
[0040] The second determining unit is used to determine, based on each of the coroutine identification information, a target storage area for storing the core dump data corresponding to each of the coroutine identification information;
[0041] The first acquisition unit is used to acquire core dump data from each of the target storage areas to obtain m target core dump data of the first coroutines;
[0042] The storage unit is used to store the m target core dump data into the thread storage area of the target thread to which the coroutine identification information belongs;
[0043] The display unit is used to display the target core dump data of the m first coroutines in the thread storage area.
[0044] The present application provides a data processing device, the device comprising at least: a memory, a processor and a communication bus; wherein:
[0045] The memory is used to store executable instructions;
[0046] The communication bus is used to realize the communication connection between the processor and the memory;
[0047] The processor is used to execute the data processing program stored in the memory to implement the steps of any of the data processing methods described above.
[0048] The present application provides a storage medium, on which a data processing program is stored. When the data processing program is executed, it is used to implement the steps of any of the data processing methods described above.
[0049] The present application provides a computer program product, including a computer program, which implements the steps of any of the above-mentioned data processing methods when executed by a processor.
[0050] The embodiment of the present application provides a data processing method, device, apparatus, storage medium and computer program product. After determining the coroutine identification information of m first coroutines through a data processing device, based on each coroutine identification information, determine the target storage area for storing the core dump data corresponding to each coroutine identification information, obtain the core dump data from each target storage area, and after obtaining the target core dump data of the m first coroutines, store the m target core dump data in the thread storage area of the target thread to which the coroutine identification information belongs, and display the target core dump data of the m first coroutines in the thread storage area. In this way, by storing the core dump data of the coroutine in the storage area of the thread to display the coroutine, the analysis process of the thread core dump data can be directly used to realize the analysis of the coroutine core dump data, which solves the problem that the core dump cannot be used to realize the rapid repair of faults for the process mainly scheduled by the coroutine, and proposes a technical solution for realizing the rapid positioning of faults for the process mainly scheduled by the coroutine by using the core dump, thereby ensuring the fault repair rate. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 A schematic diagram of a data processing method provided in an embodiment of the present application Figure 1 ;
[0052] Figure 2 A schematic diagram of a data processing method provided in an embodiment of the present application Figure 2 ;
[0053] Figure 3 A schematic diagram of a data processing method provided in an embodiment of the present application Figure 3 ;
[0054] Figure 4 A schematic diagram of a data processing method provided in an embodiment of the present application Figure 4 ;
[0055] Figure 5 A schematic diagram of the data structure of a core dump file provided in an embodiment of the present application;
[0056] Figure 6 A schematic diagram of a thread structure provided in an embodiment of the present application;
[0057] Figure 7 A schematic diagram of an implementation flow of an application embodiment provided in the present application;
[0058] Figure 8 A schematic diagram of the structure of a data processing device provided in an embodiment of the present application;
[0059] Fig. 9 A schematic diagram of the structure of a data processing device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0060] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.
[0061] The embodiment of the present application provides a data processing method, referring to Figure 1 As shown, the method is applied to a data processing device, and the method comprises the following steps:
[0062] Step 101: Determine the coroutine identification information of m first coroutines.
[0063] Here, m is an integer greater than or equal to 1.
[0064] In the embodiment of the present application, the coroutine identification information is identification information used to uniquely identify the first coroutine, for example, it may be the coroutine number of the first coroutine, the coroutine name, etc. The coroutine identification information of the m first coroutines may be determined by specifying the coroutine to be viewed when the user locates the fault for the coroutine after the application crashes.
[0065] Step 102: Based on each coroutine identification information, determine a target storage area for storing core dump data corresponding to each coroutine identification information.
[0066] In an embodiment of the present application, according to each coroutine identification information obtained, the target storage area corresponding to each coroutine identification information is searched and determined, and the target storage area stores the core dump data of the first coroutine corresponding to the coroutine identification information. Normally, the target storage area corresponding to each coroutine identification information only stores the core dump data of the corresponding first coroutine.
[0067] Step 103: Obtain core dump data from each target storage area to obtain target core dump data of m first coroutines.
[0068] In the embodiment of the present application, core dump data is read from each target storage area to obtain m target core dump data of the first coroutine.
[0069] Step 104: store the m target core dump data into the thread storage area of the target thread to which the coroutine identification information belongs.
[0070] In an embodiment of the present application, the target thread to which the coroutine identification information belongs is determined, the thread storage area of the target thread is determined, and the target core dump data of the m first coroutines read are stored in the thread storage area. It should be noted that the m first coroutines can belong to the same thread or multiple threads. When there are multiple threads in the time domain of the m first coroutines, the target core dump data of the corresponding first coroutine is respectively stored in the thread storage area of the corresponding target thread.
[0071] Step 105: Display the target core dump data of the m first coroutines in the thread storage area.
[0072] In an embodiment of the present application, the target core dump data of the m first coroutines in the thread storage area are displayed and processed. In this way, the existing debugger that calls and analyzes the core dump data for the thread can be used directly, and there is no need to develop a new debugger for the coroutine, which reduces the consumption of storage resources and computing resources of the data processing equipment and ensures the rapid location and analysis of the coroutine fault.
[0073] The data processing method provided by the embodiment of the present application determines the coroutine identification information of m first coroutines through a data processing device, and then determines the target storage area for storing the core dump data corresponding to each coroutine identification information based on each coroutine identification information, obtains the core dump data from each target storage area, and after obtaining the target core dump data of the m first coroutines, stores the m target core dump data in the thread storage area of the target thread to which the coroutine identification information belongs, and displays the target core dump data of the m first coroutines in the thread storage area. In this way, the coroutine is displayed by storing the core dump data of the coroutine in the storage area of the thread, and the analysis process of the thread core dump data can be directly used to realize the analysis of the coroutine core dump data, which solves the problem that the core dump cannot be used to realize rapid fault repair for the process mainly scheduled by the coroutine, and proposes a technical solution for realizing rapid fault location by using the core dump for the process mainly scheduled by the coroutine, thereby ensuring the fault repair rate.
[0074] Based on the above embodiments, the embodiments of the present application provide a data processing method, referring to Figure 2 As shown, the method is applied to a data processing device, and the method comprises the following steps:
[0075] Step 201: Determine the coroutine identification information of m first coroutines.
[0076] Here, m is an integer greater than or equal to 1.
[0077] In an embodiment of the present application, a user inputs m first coroutines for which faults are desired to be located, and a data processing device determines coroutine identification information of the m first coroutines input by the user.
[0078] Step 202: Based on each coroutine identification information, determine a target storage area for storing core dump data corresponding to each coroutine identification information.
[0079] In an embodiment of the present application, the target storage area may be a corresponding register pre-allocated for at least one coroutine included in each target thread, so that the register for storing the core dump data of the coroutine identification information is determined according to each coroutine identification information.
[0080] Step 203: Obtain core dump data from each target storage area to obtain target core dump data of m first coroutines.
[0081] In the embodiment of the present application, the target core dump data of m first coroutines can be obtained by acquiring the corresponding core dump data from each determined register.
[0082] Step 204: Obtain thread core dump data in the thread storage area.
[0083] In the embodiment of the present application, the thread storage area is a storage area for storing thread core dump data of the target thread. In order to store the target core dump data of the m first coroutines in the thread storage area, the thread core dump data in the thread storage area needs to be read out.
[0084] Step 205: Back up thread core dump data.
[0085] In an embodiment of the present application, the read thread core dump data is backed up so that after the core dump data of the coroutine included in the target thread is processed, the thread core dump data is restored to the thread storage area again, so as to perform other analysis operations on the target thread later.
[0086] Step 206: Store the m target core dump data into the thread storage area of the target thread to which the coroutine identification information belongs.
[0087] In an embodiment of the present application, the acquired target core dump data of the m first coroutines are stored in the thread storage area.
[0088] Step 207: Display the target core dump data of the m first coroutines in the thread storage area.
[0089] Based on the above embodiments, in other embodiments of the present application, refer to Figure 3 As shown, after the data processing device executes step 207, it is further used to execute step 208:
[0090] Step 208: Store the backed-up thread core dump data in the thread storage area.
[0091] Based on the above embodiments, in other embodiments of the present application, refer to Figure 4 As shown, before the data processing device executes step 201, it is also used to execute steps 209 to 212:
[0092] Step 209: Determine the n second coroutines included in the target thread.
[0093] Among them, the n second coroutines include m first coroutines.
[0094] In an embodiment of the present application, the target thread schedules n second coroutines to implement business services.
[0095] Step 210: Create a corresponding data storage area for each second coroutine to obtain n data storage areas.
[0096] The n data storage areas include m target storage areas.
[0097] In an embodiment of the present application, a data storage area is created for each of the n second coroutines included in the target thread, for storing the coroutine core dump data of each second coroutine, so that n data storage areas corresponding to the target thread can be obtained.
[0098] Step 211: Obtain the coroutine core dump data of n second coroutines.
[0099] Step 212: Store the coroutine core dump data of each second coroutine into a corresponding data storage area.
[0100] Based on the above embodiments, in other embodiments of the present application, step 211 can be implemented by steps 211a to 211b:
[0101] Step 211a: Obtain thread core dump data of the target thread.
[0102] Step 211b: parse the thread core dump data to obtain the coroutine core dump data of n second coroutines.
[0103] In an embodiment of the present application, the thread core dump data of the target thread is parsed and processed, from which the coroutine core dump data of n second coroutines can be obtained.
[0104] Based on the above embodiment, in other embodiments of the present application, step 211a can be implemented by steps a11 to a13:
[0105] Step a11: Determine the data storage format of the data file including the thread core dump data.
[0106] Step a12: Determine a target storage location for the thread core dump data based on the data storage format.
[0107] Step a13: Obtain thread core dump data from the target storage location.
[0108] Based on the above embodiments, in other embodiments of the present application, step a12 can be implemented by steps a121 to a124:
[0109] Step a121, read the file header of the data storage format.
[0110] Step a122: Determine the program header of the target application including the target thread based on the file header.
[0111] Step a123: Determine the additional information header and offset position of the target application based on the program header.
[0112] Step a124: Determine the target storage location based on the additional information header and the offset position.
[0113] Based on the above embodiment, in other embodiments of the present application, step a13 can be implemented by steps a131 to a132:
[0114] Step a131: Acquire additional information corresponding to at least one reference thread included in the target application from the target storage location.
[0115] Wherein, at least one reference thread includes a target thread.
[0116] Step a132: Obtain thread core dump data from the additional information.
[0117] Based on the foregoing embodiments, the embodiments of the present application provide a data processing method, which is applied to a scenario where fault location needs to be performed after a program process crashes or terminates abnormally. When a program process crashes or terminates abnormally, the operating system generates a debug dump file, namely a core dump file. In some operating application environments, the core dump file can be stored in ELF format, which contains the memory state and thread call stack information when the program crashes. The thread call stack information is a stack structure formed by the order and nested relationship of function calls during the execution of the program process. Core dump files, especially the thread call stack information, are often used to debug and analyze the state when the program crashes.
[0118] A coroutine, also known as a lightweight thread, is a program component that is based on thread scheduling in user mode rather than kernel mode. It allows programs to efficiently implement multitasking similar to thread scheduling through function calls without creating additional threads.
[0119] The present application embodiment provides an ELF format storage, referring to Figure 5 As shown, it includes 4 parts, which are: ELF file consists of 4 parts, namely ELF header, program header table, section and section header table. Core dump files are usually stored in Figure 5 In the PT_NOTE segment of the program header table shown in the figure. A thread can run multiple coroutines, see Figure 6 As shown, a thread includes N coroutines. Common debuggers, such as gdb under Linux, can read and parse all thread stack information of PT_NOTE Segment in the core dump file, that is, the debugger is a program with thread as the scheduling granularity. Correspondingly, the embodiment of the present application provides a data processing method for debugging and analyzing the state of a program process crash based on the coroutine as the scheduling granularity, referring to Figure 7As shown, the specific steps include:
[0120] Step b11: Read the core dump file.
[0121] The core dump file here is a thread core dump file.
[0122] Step b12: Read the ELF Header.
[0123] Step b13: traverse and search for the offset of the PT_NOTE Header in the core dump file according to the ELF Header information.
[0124] Step b14: Read the PT_NOTE Header.
[0125] Step b15: Read the PT_NOTE information based on the size of the PT_NOTE and the offset of the PT_NOTE in the core dump file.
[0126] Step b16: Read thread call stack information of at least one thread from the PT_NOTE information.
[0127] Among them, during the implementation process, the debugger adds N arrays for each thread in the thread data structure management process for each thread information, and each array corresponds to a coroutine among the N coroutines included in each thread, which is used to store coroutine register values.
[0128] Step b17: parse the thread call stack information of the target thread to obtain the coroutine call stack information of each coroutine included in the target thread.
[0129] After loading and reading the core dump file, the debugger parses the coroutine registers of each thread in the core dump file. The coroutine registers are usually recorded in the thread global variables of the program, and saves the coroutine register values in the coroutine registers to the corresponding newly added array.
[0130] Step b18: Receive the coroutine identification information input by the user through the debugger interaction window.
[0131] Step b19: back up the thread call stack information in the thread register of the target thread to obtain a backup file.
[0132] Step b20: store the coroutine call stack information corresponding to the coroutine identification information into the thread register.
[0133] Step b21: Display the coroutine call stack information in the debugger interaction window.
[0134] Step b22: store the backup file in the thread register.
[0135] Exemplarily, the process of displaying the coroutine call stack information can be implemented by adding the following coroutine-related commands in the debugger:
[0136] t <coid>: Display the specified coroutine id stack
[0137] a. Back up the value of the elf_gregset_t register in the current thread (for example, variable t) to the temporary variable t1
[0138] b. Find the register value of the specified coroutine under the thread according to coid (for example, c)
[0139] c. Copy the coroutine register value c to t and display it to the user
[0140] It should be noted that what is displayed at this time is the coroutine call stack information of the coroutine specified by the user.
[0141] co bt 0: switch back to the original thread stack
[0142] a. Copy the temporary variable t1 to t and display it to the user
[0143] It should be noted that the thread call stack information of the target thread is displayed at this time.
[0144] co bt-all: Display all coroutine stacks under the current thread
[0145] a. Traverse and parse the N newly added coroutine register values under the current thread and display them to the user
[0146] In this way, the existing caller is used to debug and analyze program crash failures using coroutines as the scheduling granularity, solving the problem that processes mainly scheduled with coroutines cannot use core dump files to analyze and locate product failures when they exit abnormally due to an abnormal crash. This reduces development costs, improves fault location efficiency, and reduces the consumption of operating resources.
[0147] It should be noted that, for the description of the same steps and the same contents in this embodiment as those in other embodiments, reference can be made to the description in other embodiments and will not be repeated here.
[0148] The data processing method provided by the embodiment of the present application determines the coroutine identification information of m first coroutines through a data processing device, and then determines the target storage area for storing the core dump data corresponding to each coroutine identification information based on each coroutine identification information, obtains the core dump data from each target storage area, and after obtaining the target core dump data of the m first coroutines, stores the m target core dump data in the thread storage area of the target thread to which the coroutine identification information belongs, and displays the target core dump data of the m first coroutines in the thread storage area. In this way, the coroutine is displayed by storing the core dump data of the coroutine in the storage area of the thread, and the analysis process of the thread core dump data can be directly used to realize the analysis of the coroutine core dump data, which solves the problem that the core dump cannot be used to realize rapid fault repair for the process mainly scheduled by the coroutine, and proposes a technical solution for realizing rapid fault location by using the core dump for the process mainly scheduled by the coroutine, thereby ensuring the fault repair rate.
[0149] Based on the above embodiments, the embodiments of the present application provide a data processing device, which can be applied to Figures 1 to 4 In the data processing method provided in the corresponding embodiment, refer to Figure 8 As shown, the data processing device 3 may include: a first determining unit 31, a second determining unit 32, a first acquiring unit 33, a storage unit 34 and a display unit 35; wherein:
[0150] A first determining unit 31 is used to determine the coroutine identification information of m first coroutines; wherein m is an integer greater than or equal to 1;
[0151] A second determining unit 32 is used to determine, based on each coroutine identification information, a target storage area for storing core dump data corresponding to each coroutine identification information;
[0152] A first acquisition unit 33 is used to acquire core dump data from each target storage area to obtain target core dump data of m first coroutines;
[0153] A storage unit 34, used to store m target core dump data into a thread storage area of a target thread to which the coroutine identification information belongs;
[0154] The display unit 35 is used to display the target core dump data of the m first coroutines in the thread storage area.
[0155] In other embodiments of the present application, before the storage unit, the data processing device further includes: a first acquisition unit and a backup unit; wherein:
[0156] A first acquisition unit is used to acquire thread core dump data in the thread storage area;
[0157] A backup unit is used to back up thread core dump data.
[0158] In other embodiments of the present application, after the display unit displays the target core dump data of the m first coroutines in the thread storage area, the storage unit is further configured to perform the following steps:
[0159] Store the backed-up thread core dump data in the thread storage area.
[0160] In other embodiments of the present application, before the first determining unit, the data processing device further includes: a creating unit and a second acquiring unit; wherein:
[0161] The first determining unit is further used to determine n second coroutines included in the target thread; wherein the n second coroutines include m first coroutines;
[0162] A creating unit, used for creating a corresponding data storage area for each second coroutine, to obtain n data storage areas; wherein the n data storage areas include m target storage areas;
[0163] The second acquisition unit is further used to acquire the coroutine core dump data of n second coroutines;
[0164] The storage unit is also used to store the coroutine core dump data of each second coroutine in a corresponding data storage area.
[0165] In other embodiments of the present application, the second acquisition unit includes: an acquisition module and a parsing module; wherein:
[0166] An acquisition module, used for acquiring thread core dump data of a target thread;
[0167] The parsing module is used to parse the thread core dump data to obtain the coroutine core dump data of n second coroutines.
[0168] In other embodiments of the present application, the acquisition module is specifically used to implement the following steps:
[0169] determining a data storage format for a data file including thread core dump data;
[0170] Determine a target storage location for the thread core dump data based on the data storage format;
[0171] Get the thread core dump data from the target storage location.
[0172] In other embodiments of the present application, when the acquisition module implements the step of determining the target storage location of the thread core dump data based on the data storage format, it can be implemented by the following steps:
[0173] Read the file header of the data storage format;
[0174] determining a program header of a target application including a target thread based on the file header;
[0175] Determine the additional information header and offset position of the target application based on the program header;
[0176] Based on the additional information header and the offset position, the target storage location is determined.
[0177] In other embodiments of the present application, when the acquisition module implements the step of acquiring the thread core dump data from the target storage location, it can be specifically implemented by the following steps:
[0178] Acquire additional information corresponding to at least one reference thread included in the target application from the target storage location; wherein the at least one reference thread includes the target thread;
[0179] From the additional information, obtain the thread core dump data.
[0180] It should be noted that the specific process of interaction between the units and modules in this embodiment can refer to the description in other embodiments and will not be repeated here.
[0181] The data processing device provided in the embodiment of the present application determines the coroutine identification information of m first coroutines through the data processing device, and then determines the target storage area for storing the core dump data corresponding to each coroutine identification information based on each coroutine identification information, obtains the core dump data from each target storage area, and after obtaining the target core dump data of the m first coroutines, stores the m target core dump data in the thread storage area of the target thread to which the coroutine identification information belongs, and displays the target core dump data of the m first coroutines in the thread storage area. In this way, the coroutine is displayed by storing the core dump data of the coroutine in the storage area of the thread, and the analysis process of the thread core dump data can be directly used to realize the analysis of the coroutine core dump data, which solves the problem that the core dump cannot be used to realize the rapid repair of faults for the process mainly scheduled by the coroutine, and proposes a technical solution for realizing the rapid positioning of faults for the process mainly scheduled by the coroutine by using the core dump, thereby ensuring the fault repair rate.
[0182] Based on the above embodiments, the embodiments of the present application provide a data processing device, which can be applied to Figures 1 to 4 In the data processing method provided in the corresponding embodiment, refer to Fig. 9 As shown, the data processing device 4 may include: a memory 41, a processor 42 and a communication bus 43; wherein:
[0183] A memory 41, used for storing executable instructions;
[0184] A communication bus 43, used to realize the communication connection between the processor 42 and the memory 41;
[0185] Processor 42, used to execute the data processing method stored in the memory, to implement Figures 1 to 4 The implementation process of the data processing method provided in the corresponding embodiment will not be repeated here.
[0186] Based on the foregoing embodiments, the embodiments of the present application provide a computer-readable storage medium, referred to as a storage medium, which stores one or more programs, and the one or more programs can be executed by one or more processors to implement reference Figures 1 to 4 The implementation process of the data processing method provided in the corresponding embodiment will not be repeated here.
[0187] Based on the foregoing embodiments, the embodiments of the present application further provide a computer program product, including a computer program, which can be executed by the processor 42 in the data processing device 4 to complete any of the foregoing method steps.
[0188] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of hardware embodiments, software embodiments, or embodiments in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) that contain computer-usable program code.
[0189] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0190] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0191] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0192] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application.< / coid>
Claims
1. A data processing method, characterized in that: The method comprises: Determine the coroutine identification information of m first coroutines; wherein m is an integer greater than or equal to 1; Based on each of the coroutine identification information, determining a target storage area for storing the core dump data corresponding to each of the coroutine identification information; Acquire core dump data from each of the target storage areas to obtain m target core dump data of the first coroutines; Storing m target core dump data in a thread storage area of a target thread to which the coroutine identification information belongs; The target core dump data of the m first coroutines in the thread storage area are displayed.
2. The method according to claim 1, characterized in that: Before storing the m target core dump data in the thread storage area of the target thread to which the coroutine identification information belongs, the method further includes: Obtaining thread core dump data in the thread storage area; Back up the thread core dump data.
3. The method according to claim 2, characterized in that After displaying the target core dump data of the m first coroutines in the thread storage area, the method further includes: The backed-up thread core dump data is stored in the thread storage area.
4. The method according to claim 1, characterized in that Before determining the coroutine identification information of the m first coroutines, the method further includes: Determine n second coroutines included in the target thread; wherein the n second coroutines include m first coroutines; Creating a corresponding data storage area for each of the second coroutines to obtain n data storage areas; wherein the n data storage areas include m target storage areas; Obtaining n coroutine core dump data of the second coroutine; The coroutine core dump data of each second coroutine is stored in the corresponding data storage area.
5. The method according to claim 4, characterized in that The obtaining of the coroutine core dump data of n second coroutines includes: Obtaining thread core dump data of the target thread; Parse the thread core dump data to obtain n pieces of the coroutine core dump data of the second coroutine.
6. The method according to claim 5, characterized in that The obtaining of the thread core dump data of the target thread includes: Determine a data storage format of a data file including the thread core dump data; Based on the data storage format, determining a target storage location of the thread core dump data; The thread core dump data is obtained from the target storage location.
7. The method according to claim 6, characterized in that The determining, based on the data storage format, a target storage location of the thread core dump data comprises: Read the file header of the data storage format; Determine a program header of a target application program including the target thread based on the file header; Determine the additional information header and offset position of the target application based on the program header; The target storage position is determined based on the additional information header and the offset position.
8. The method according to claim 7, characterized in that The obtaining the thread core dump data from the target storage location includes: Acquire, from the target storage location, additional information corresponding to at least one reference thread included in the target application; wherein at least one of the reference threads includes the target thread; The thread core dump data is obtained from the additional information.
9. A data processing device, characterized in that: The device comprises: a first determining unit, a second determining unit, a first acquiring unit, a storage unit and a display unit; wherein: The first determining unit is used to determine the coroutine identification information of m first coroutines; wherein m is an integer greater than or equal to 1; The second determining unit is used to determine, based on each of the coroutine identification information, a target storage area for storing the core dump data corresponding to each of the coroutine identification information; The first acquisition unit is used to acquire core dump data from each of the target storage areas to obtain m target core dump data of the first coroutines; The storage unit is used to store the m target core dump data into the thread storage area of the target thread to which the coroutine identification information belongs; The display unit is used to display the target core dump data of the m first coroutines in the thread storage area.
10. A data processing device, characterized in that: The device comprises at least: a memory, a processor and a communication bus; wherein: The memory is used to store executable instructions; The communication bus is used to realize the communication connection between the processor and the memory; The processor is used to execute the data processing program stored in the memory to implement the steps of the data processing method according to any one of claims 1 to 8.
11. A storage medium, characterized in that: The storage medium stores a data processing program, which is used to implement the steps of the data processing method according to any one of claims 1 to 8 when executed.
12. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the computer program implements the steps of the data processing method according to any one of claims 1 to 8.
