CN110865898B - Method, device, medium and equipment for converging crash call stack - Google Patents

Method, device, medium and equipment for converging crash call stack Download PDF

Info

Publication number
CN110865898B
CN110865898B CN201910967012.4A CN201910967012A CN110865898B CN 110865898 B CN110865898 B CN 110865898B CN 201910967012 A CN201910967012 A CN 201910967012A CN 110865898 B CN110865898 B CN 110865898B
Authority
CN
China
Prior art keywords
parameter
crash
call stack
function
call
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910967012.4A
Other languages
Chinese (zh)
Other versions
CN110865898A (en
Inventor
刘洪凯
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN201910967012.4A priority Critical patent/CN110865898B/en
Publication of CN110865898A publication Critical patent/CN110865898A/en
Application granted granted Critical
Publication of CN110865898B publication Critical patent/CN110865898B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0766Error or fault reporting or storing
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/50Reducing energy consumption in communication networks in wire-line communication networks, e.g. low power modes or reduced link rate

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The present disclosure provides a method, apparatus, medium and device for crash call stack aggregation, where the method includes: monitoring a crash event in real time through a designated function, and directly reflecting to acquire a crash call stack storage element when the crash event occurs; acquiring a method signature of a call stack frame based on the crash call stack storage element, wherein the method signature comprises a function name, a class name and a parameter type; and sending the function names, the class names and the parameter types to a server for classifying the crash call stack. According to the method, the function names, the class names and the parameter types of the crash stacks are accurately obtained, the function names, the class names and the parameter types are used as parameters to calculate the hash values of the crash stacks, and the crash stacks with the same hash values are aggregated into one type, so that the aggregation accuracy of crash call stacks can be improved, and an issuer can better and faster arrange the query problems, so that the application quality is improved.

Description

Method, device, medium and equipment for converging crash call stack
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method, an apparatus, a medium, and a device for crash call stack aggregation.
Background
Aggregation of android application crash stacks is very important for solving bug of applications and improving quality of the applications: the server receives a large number of crash call stacks, which would be impractical (too many crashes) if not aggregated, but solved one by one. After aggregating crash stacks, a developer can look at which crashes occur more often, thus preferentially solving the problem, and can look at the distribution features of the same crash (such as model distribution features, android version distribution features) to help troubleshoot the problem. However, if the aggregation algorithm is not perfect (different crash problems are aggregated together, or the same problem is aggregated into different problems), the accuracy of the aggregation is affected, and thus the troubleshooting of the problem is affected.
The existing crash call stack aggregation algorithm only considers the method name and the class name corresponding to each stack frame in the call stack without considering the parameter type of the method, so that when different crash call stacks have the same name but different parameter types, the two different crashes can be aggregated together, and the aggregation accuracy is affected.
BRIEF SUMMARY OF THE PRESENT DISCLOSURE
The disclosure aims to provide a method, a device, a medium and equipment for converging crash call stacks, which can solve at least one technical problem. The specific scheme is as follows:
according to a specific embodiment of the present disclosure, in a first aspect, the present disclosure provides a crash call stack aggregation method, including:
monitoring a crash event in real time through a designated function, and directly reflecting to acquire a crash call stack storage element when the crash event occurs;
acquiring a method signature of a call stack frame based on the crash call stack storage element, wherein the method signature comprises a function name, a class name and a parameter type;
and sending the function names, the class names and the parameter types to a server for classifying the crash call stack.
Optionally, the acquiring a method signature of the call stack frame based on the crash call stack storage element includes:
the call stack storage element is converted into an element array;
taking a first element of the element array, and strongly converting the first element into an appointed type array;
traversing the call stack frame, taking an element with the index of i of the specified type array as a first parameter, and taking an element with the index of i+1 of the element array as a second parameter, wherein i is a natural number from 0 to N-1, and N is the number of the stack frame;
and obtaining the method signature of the call stack frame through the first parameter and the second parameter.
Optionally, the obtaining the method signature of the call stack frame through the first parameter and the second parameter includes:
converting the first and second parameters from a first language environment to a second language environment;
inputting the first parameter and the second parameter into a conversion function in a second language environment to obtain a function object;
and in the first language environment, extracting the signature of the function object to obtain the method signature of the call stack frame.
Optionally, the classifying the crash call stack includes:
calculating the hash value of the collapse call stack by taking the function name, the class name and the parameter type as factors;
and aggregating the crashed call stacks with the same hash value into one type.
According to a second aspect of the specific embodiment of the present disclosure, the present disclosure provides a crash call stack aggregation method, including:
receiving a method signature of a crash call stack, wherein the method signature comprises a function name, a class name and a parameter type;
calculating the hash value of the collapse call stack by taking the function name, the class name and the parameter type as factors;
and aggregating the crashed call stacks with the same hash value into one type.
According to a third aspect of the present disclosure, the present disclosure provides a crash call stack aggregation apparatus, including:
the first acquisition unit is used for monitoring the crash event in real time through a designated function, and directly reflecting to acquire the crash call stack storage element when the crash event occurs;
the second acquisition unit acquires a method signature of a call stack frame based on the crash call stack storage element, wherein the method signature comprises a function name, a class name and a parameter type;
and the sending unit is used for sending the function name, the class name and the parameter type to a server and classifying the crash call stack.
Optionally, the second obtaining unit includes:
the first conversion unit is used for strongly converting the call stack storage element into an element array;
the second conversion unit is used for taking a first element of the element array and strongly converting the first element into an appointed type array;
the traversing unit is used for traversing the call stack frame, taking an element with the index of i of the specified type array as a first parameter, and taking an element with the index of i+1 of the element array as a second parameter, wherein i is a natural number from 0 to N-1, and N is the number of the stack frame;
and the calculating unit is used for obtaining the method signature of the call stack frame through the first parameter and the second parameter.
Optionally, the computing unit is further configured to:
converting the first and second parameters from a first language environment to a second language environment;
inputting the first parameter and the second parameter into a conversion function in a second language environment to obtain a function object;
and in the first language environment, extracting the signature of the function object to obtain the method signature of the call stack frame.
According to a fourth aspect of the present disclosure, there is provided a computer readable storage medium having stored thereon a computer program which when executed by a processor implements a method as claimed in any one of the preceding claims.
According to a fifth aspect of particular embodiments of the present disclosure, the present disclosure provides an electronic device comprising: one or more processors; storage means for storing one or more programs that, when executed by the one or more processors, cause the one or more processors to implement the method of any of the preceding claims.
Compared with the prior art, the scheme of the embodiment of the disclosure has at least the following beneficial effects: according to the method, the function names, the class names and the parameter types of the crash stacks are accurately obtained, the function names, the class names and the parameter types are used as parameters to calculate the hash values of the crash stacks, and the crash stacks with the same hash values are aggregated into one type, so that the aggregation accuracy of crash call stacks can be improved, and an issuer can better and faster arrange the query problems, so that the application quality is improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure. It will be apparent to those of ordinary skill in the art that the drawings in the following description are merely examples of the disclosure and that other drawings may be derived from them without undue effort. In the drawings:
FIG. 1 illustrates a method flow diagram for crashing call stack aggregation in accordance with an embodiment of the present disclosure;
FIG. 2 illustrates a method flow diagram of crashing call stack aggregation in accordance with another embodiment of the present disclosure;
FIG. 3 illustrates a schematic diagram of a crashed call stack aggregation apparatus in accordance with an embodiment of the disclosure;
fig. 4 shows a schematic diagram of an electronic device connection structure according to an embodiment of the present disclosure.
Detailed Description
For the purpose of promoting an understanding of the principles and advantages of the disclosure, reference will now be made in detail to the drawings, in which it is apparent that the embodiments described are only some, but not all embodiments of the disclosure. Based on the embodiments in this disclosure, all other embodiments that a person of ordinary skill in the art would obtain without making any inventive effort are within the scope of protection of this disclosure.
The terminology used in the embodiments of the disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. As used in this disclosure of embodiments and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise, the "plurality" generally includes at least two.
It should be understood that the term "and/or" as used herein is merely one relationship describing the association of association elements, meaning that there may be three relationships, e.g., a and/or B, may represent: a exists alone, A and B exist together, and B exists alone. In addition, the character "/" herein generally indicates that the associated element is an "or" relationship.
It should be understood that although the terms first, second, third, etc. may be used to describe … … in the presently disclosed embodiments, these … … should not be limited to these terms. These terms are only used to distinguish … …. For example, the first … … may also be referred to as the second … …, and similarly the second … … may also be referred to as the first … …, without departing from the scope of the disclosed embodiments.
The words "if", as used herein, may be interpreted as "at … …" or "at … …" or "in response to a determination" or "in response to a detection", depending on the context. Similarly, the phrase "if determined" or "if detected (stated condition or event)" may be interpreted as "when determined" or "in response to determination" or "when detected (stated condition or event)" or "in response to detection (stated condition or event), depending on the context.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a product or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such product or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a commodity or device comprising such element.
Alternative embodiments of the present disclosure are described in detail below with reference to the drawings.
As shown in fig. 1, according to a specific embodiment of the present disclosure, the present disclosure provides a crash call stack aggregation method, which is applied to a client installed on a mobile terminal, where the mobile terminal may be any android system such as a mobile phone, a PAD, or the like, and may operate an intelligent terminal of an APK. After the SDK obtains the signature of each stack frame method in the call stack, the signature is reported to the server for analysis.
The method specifically comprises the following steps:
step S102: and monitoring the crash event in real time through a designated function, and directly reflecting to acquire the crash call stack storage element when the crash event occurs.
Firstly, invoking a setDefaultUncaugExceptionHandler method of a Thread class to monitor breakdown (when an application is initialized), obtaining a threadable element after the breakdown occurs, and obtaining a member (usually named backtrace) in the threadable element by using java code reflection to obtain the backtrace element.
When the triggering event is a crash event (a threadable element), the call stack storage element (a backtrace element) is directly obtained by reflection, wherein the crash event is when a mobile phone application program has problems such as memory invalid access, invalid element, memory leakage, stack overflow and the like in the running process, the application program cannot normally run, so that the program has phenomena such as flash back, no response and the like.
When the trigger event is a click event (Thread element), the click event refers to an unsmooth event such as delayed response in the process of program operation.
Step S104: and acquiring a method signature of the call stack frame based on the crash call stack storage element, wherein the method signature comprises a function name, a class name and a parameter type.
Optionally, the acquiring a method signature of the call stack frame based on the crash call stack storage element includes:
step S104-2: and strongly converting the call stack storage element into an element array.
Specifically, the call stack storage element backtrace is strongly converted into an element of the Object [ ] type (hereinafter referred to as backtraceArr).
Step S104-4: and taking the first element of the element array, and strongly converting the first element into an integer array or a long integer array.
Taking a first element first of a backtraceArr; the first is then strongly converted into an element of the int [ ] type (in the case of 32-bit operation) or of the long [ ] type (in the case of 64-bit operation) (hereinafter referred to as first il).
Step S104-6: traversing the call stack frame, taking the element with the index of i of the specified type array as a first parameter, and taking the element with the index of i+1 of the element array as a second parameter, wherein i is a natural number from 0 to N-1, and N is the number of the stack frame.
Step S104-8: and obtaining the method signature of the call stack frame through the first parameter and the second parameter.
Optionally, the obtaining the method signature of the call stack frame through the first parameter and the second parameter includes:
converting the first and second parameters from a first language environment (java language) to a second language environment (c language);
inputting the first parameter and the second parameter into a conversion function in a second language environment to obtain a function object;
and in the first language environment, extracting the signature of the function object to obtain the method signature of the call stack frame.
The size of the backtraceArr is n+1 stack frames, so that the length of n=backtracearr can be obtained as-1; thereafter i traverses from 0 to N-1, i.e. all stack frames have been traversed, each traversal being as follows: taking an element with index i of firstIL (hereinafter referred to as mid), which is jmehthod ID of the method of the stack frame, taking an element with index i+1 of backtraceArr (hereinafter referred to as cls), which is the class where the method of the stack frame is located, then transferring mid and cls from a java layer to a c layer, obtaining the function object (hereinafter referred to as method) through the ToReflectedmethod function of the java virtual machine, and then transferring the method to the java layer and recording the signature (comprising the name of the method, the number of parameters and the types of each parameter) of the function object.
After the traversing is completed, the method name, the class name and the parameter type of each method in the java crash call stack are obtained.
Step S106: and sending the function names, the class names and the parameter types to a server for classifying the crash call stack.
The server is generally used for receiving the crash stack information uploaded by the client, and then calculating the received crash stack information according to a built-in algorithm. The method comprises the following steps:
optionally, the classifying the crash call stack includes:
step S106-2: and calculating the hash value of the collapse call stack by taking the function name, the class name and the parameter type as factors.
Step S106-4: and aggregating the crashed call stacks with the same hash value into one type.
According to the method, the function names, the class names and the parameter types of the crash stacks are accurately obtained, the function names, the class names and the parameter types are used as parameters to calculate the hash values of the crash stacks, and the crash stacks with the same hash values are aggregated into one type, so that the aggregation accuracy of crash call stacks can be improved, and an issuer can better and faster arrange the query problems, so that the application quality is improved.
As shown in fig. 2, according to a specific embodiment of the present disclosure, the present disclosure provides a crash call stack aggregation method, which is applied to a server side, and specifically includes the following method steps:
step S202: and receiving a method signature of the crashed call stack, wherein the method signature comprises a function name, a class name and a parameter type.
Step S204: and calculating the hash value of the collapse call stack by taking the function name, the class name and the parameter type as factors.
Step S206: and aggregating the crashed call stacks with the same hash value into one type.
The server needs to calculate a unique hash value for each received crash, and multiple crashes with the same hash value are regarded as the same class of crashes. The original data needed to calculate the hash value for each crash is a character string composed of the name of the method corresponding to each stack frame in the crash stack, the name of the class where the method is located, and all the parameter types of the method.
According to the method, the function names, the class names and the parameter types of the crash stacks are accurately obtained, the function names, the class names and the parameter types are used as parameters to calculate the hash values of the crash stacks, and the crash stacks with the same hash values are aggregated into one type, so that the aggregation accuracy of crash call stacks can be improved, and an issuer can better and faster arrange the query problems, so that the application quality is improved.
As shown in fig. 3, according to a specific embodiment of the present disclosure, the present disclosure provides a crash call stack aggregation apparatus, including: a first acquisition unit 302, a second acquisition unit 304, a transmission unit 306. The method comprises the following steps:
the first obtaining unit 302 is configured to monitor a crash event in real time through a specified function, and directly reflect and obtain a crash call stack storage element when the crash event occurs;
a second obtaining unit 304, configured to obtain a method signature of a call stack frame based on the crash call stack storage element, where the method signature includes a function name, a class name, and a parameter type;
and the sending unit 306 is configured to send the function name, the class name and the parameter type to a server, and is configured to categorize the crash call stack.
Optionally, the second obtaining unit 304 includes:
a first converting unit (not shown) configured to convert the call stack storage element into an element array;
a second conversion unit (not shown) for taking a first element of the element array and strongly converting the first element into an array of a specified type;
a traversing unit (not shown), configured to traverse the call stack frame, take an element with an index i of the integer array or the long integer array as a first parameter, and take an element with an index i+1 of the element array as a second parameter, where i is a natural number from 0 to N-1, and N is a stack frame number;
a calculating unit (not shown) for obtaining a method signature of the call stack frame through the first parameter and the second parameter.
Optionally, the computing unit is further configured to:
converting the first and second parameters from a first language environment to a second language environment;
inputting the first parameter and the second parameter into a conversion function in a second language environment to obtain a function object;
and in the first language environment, extracting the signature of the function object to obtain the method signature of the call stack frame.
The device can accurately acquire the function name, class name and parameter type of the crash stack, and calculate the hash value of the crash stack by taking the function name, class name and parameter type as parameters, and can improve the accuracy of crash call stack aggregation by aggregating the crash stacks with the same hash value into one class, so that an issuer can better and faster arrange the query problem, thereby improving the quality of application.
As shown in fig. 4, the present embodiment provides an electronic device, including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein, the liquid crystal display device comprises a liquid crystal display device,
the memory stores instructions executable by the one processor to enable the at least one processor to perform the method steps described in the embodiments above.
The disclosed embodiments provide a non-transitory computer storage medium storing computer executable instructions that perform the method steps described in the embodiments above.
Referring now to fig. 4, a schematic diagram of an electronic device suitable for use in implementing embodiments of the present disclosure is shown. The terminal devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and the like, and stationary terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 4 is merely an example and should not be construed to limit the functionality and scope of use of the disclosed embodiments.
As shown in fig. 4, the electronic device may include a processing means (e.g., a central processor, a graphics processor, etc.) 401, which may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 402 or a program loaded from a storage means 408 into a Random Access Memory (RAM) 403. In the RAM 403, various programs and data required for the operation of the electronic device are also stored. The processing device 401, the ROM 402, and the RAM 403 are connected to each other by a bus 405. An input/output (I/O) interface 405 is also connected to bus 405.
In general, the following devices may be connected to the I/O interface 405: input devices 406 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 405 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, etc.; storage 408 including, for example, magnetic tape, hard disk, etc.; and a communication device 405. The communication means 405 may allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. While fig. 4 shows an electronic device having various means, it is to be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network via communication device 405, or from storage device 408, or from ROM 402. The above-described functions defined in the methods of the embodiments of the present disclosure are performed when the computer program is executed by the processing device 401.
It should be noted that the computer readable medium described in the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having 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. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present disclosure, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
The computer readable medium may be contained in the electronic device; or may exist alone without being incorporated into the electronic device.
Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, including an element oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units involved in the embodiments of the present disclosure may be implemented by means of software, or may be implemented by means of hardware. Wherein the names of the units do not constitute a limitation of the units themselves in some cases.

Claims (7)

1. A crash call stack aggregation method, comprising:
monitoring a crash event in real time through a designated function, and directly reflecting to acquire a crash call stack storage element when the crash event occurs;
based on the crash call stack storage element, obtaining a method signature of a call stack frame, wherein the method signature comprises a function name of a function object corresponding to the call stack frame, a class name of a class where the function object is located and a parameter type of the function object, and the method signature is obtained by the following steps: converting a first parameter and a second parameter from a first language environment to a second language environment, inputting the first parameter and the second parameter into a conversion function in the first language environment to obtain a function object, extracting a signature of the function object in the first language environment to obtain a method signature of the call stack frame, wherein the first parameter and the second parameter are determined based on an element array, and the element array is obtained after the call stack storage element is subjected to strong conversion;
the function name, the class name and the parameter type are sent to a server and used for classifying the crash call stack, and the classifying the crash call stack comprises the following steps: and calculating the hash value of the crash call stack according to the function name, the class name and the character string formed by the parameter types, and aggregating the crash call stacks with the same hash value into one class.
2. The method of claim 1, wherein the obtaining a method signature of a call stack frame based on the crashed call stack storage element comprises:
the call stack storage element is converted into an element array;
taking a first element of the element array, and strongly converting the first element into an appointed type array;
traversing the call stack frame, taking an element with the index of i of the specified type array as a first parameter, and taking an element with the index of i+1 of the element array as a second parameter, wherein i is a natural number from 0 to N-1, and N is the number of the stack frame;
and obtaining the method signature of the call stack frame through the first parameter and the second parameter.
3. A crash call stack aggregation method, comprising:
receiving a method signature of a collapse call stack, wherein the method signature comprises a function name of a function object corresponding to a stack frame in the collapse call stack, a class name of a class where the function object is located and a parameter type of the function object, and the method signature is obtained by the following steps: converting a first parameter and a second parameter from a first language environment to a second language environment, inputting the first parameter and the second parameter into a conversion function in the first language environment to obtain a function object, extracting a signature of the function object in the first language environment to obtain a method signature of the call stack frame, wherein the first parameter and the second parameter are determined based on an element array, and the element array is obtained after the call stack storage element is subjected to strong conversion;
calculating hash values of the crash call stacks by taking the function names, the class names and the parameter types as factors, wherein the hash values of the crash call stacks are calculated according to character strings formed by the function names, the class names and the parameter types;
and aggregating the crashed call stacks with the same hash value into one type.
4. A crash call stack aggregation apparatus, comprising:
the first acquisition unit is used for monitoring the crash event in real time through a designated function, and directly reflecting to acquire the crash call stack storage element when the crash event occurs;
the second obtaining unit obtains a method signature of a call stack frame based on the crash call stack storage element, wherein the method signature comprises a function name of a function object corresponding to the call stack frame, a class name of a class where the function object is located and a parameter type of the function object, and the method signature is obtained by the following steps: converting a first parameter and a second parameter from a first language environment to a second language environment, inputting the first parameter and the second parameter into a conversion function in the first language environment to obtain a function object, extracting a signature of the function object in the first language environment to obtain a method signature of the call stack frame, wherein the first parameter and the second parameter are determined based on an element array, and the element array is obtained after the call stack storage element is subjected to strong conversion;
the sending unit is configured to send the function name, the class name and the parameter type to a server, and is configured to classify the crash call stack, where classifying the crash call stack includes: and calculating the hash value of the crash call stack according to the function name, the class name and the character string formed by the parameter types, and aggregating the crash call stacks with the same hash value into one class.
5. The apparatus of claim 4, wherein the second acquisition unit comprises:
the first conversion unit is used for strongly converting the call stack storage element into an element array;
the second conversion unit is used for taking a first element of the element array and strongly converting the first element into an appointed type array;
the traversing unit is used for traversing the call stack frame, taking an element with the index of i of the specified type array as a first parameter, and taking an element with the index of i+1 of the element array as a second parameter, wherein i is a natural number from 0 to N-1, and N is the number of the stack frame;
and the calculating unit is used for obtaining the method signature of the call stack frame through the first parameter and the second parameter.
6. A computer readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method according to any one of claims 1 to 3.
7. An electronic device, comprising:
one or more processors;
a storage means for storing one or more programs which when executed by the one or more processors cause the one or more processors to implement the method of any of claims 1 to 3.
CN201910967012.4A 2019-10-12 2019-10-12 Method, device, medium and equipment for converging crash call stack Active CN110865898B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910967012.4A CN110865898B (en) 2019-10-12 2019-10-12 Method, device, medium and equipment for converging crash call stack

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910967012.4A CN110865898B (en) 2019-10-12 2019-10-12 Method, device, medium and equipment for converging crash call stack

Publications (2)

Publication Number Publication Date
CN110865898A CN110865898A (en) 2020-03-06
CN110865898B true CN110865898B (en) 2023-09-05

Family

ID=69652349

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910967012.4A Active CN110865898B (en) 2019-10-12 2019-10-12 Method, device, medium and equipment for converging crash call stack

Country Status (1)

Country Link
CN (1) CN110865898B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111400185A (en) * 2020-03-18 2020-07-10 北京字节跳动网络技术有限公司 Memory leak processing method and device, readable medium and electronic equipment
US11487601B2 (en) * 2020-03-26 2022-11-01 Arista Networks, Inc. Persistent crash logging
CN111813465B (en) * 2020-06-19 2023-11-21 北京字节跳动网络技术有限公司 Information acquisition method, device, medium and equipment
CN111813641B (en) * 2020-06-19 2024-05-17 北京字节跳动网络技术有限公司 Method, device, medium and equipment for collecting crash information
CN112083976A (en) * 2020-08-12 2020-12-15 北京字节跳动网络技术有限公司 Information acquisition method, device, medium and equipment
CN112306833A (en) * 2020-10-28 2021-02-02 广州虎牙科技有限公司 Application program crash statistical method and device, computer equipment and storage medium
CN112433877B (en) * 2020-12-01 2024-05-17 北京五八信息技术有限公司 Method and device for detecting application start-up crash, electronic equipment and storage medium
CN113342431B (en) * 2021-06-29 2023-02-07 苏州科达科技股份有限公司 Function call stack backtracking and program exception handling method, device, equipment and medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103106132A (en) * 2013-03-05 2013-05-15 中标软件有限公司 Kernel function calling stack analyzing and debugging method in case of Linux system breakdown
CN106133698A (en) * 2014-03-17 2016-11-16 微软技术许可有限责任公司 Framework for user model collapse report
US9842017B1 (en) * 2015-03-30 2017-12-12 Amazon Technologies, Inc. Collection and aggregation of device health metrics
CN107506256A (en) * 2017-09-07 2017-12-22 北京京东尚科信息技术有限公司 A kind of method and apparatus of crash data monitoring
CN108694108A (en) * 2017-04-11 2018-10-23 北京京东尚科信息技术有限公司 A kind of method and apparatus of iOS crash datas classification and statistics
CN108763060A (en) * 2018-04-27 2018-11-06 广州华多网络科技有限公司 Native layers of collapse source tracing method, device, storage medium and terminal in android system
CN109298960A (en) * 2018-08-15 2019-02-01 中国平安人寿保险股份有限公司 Application crashes processing method, device, computer installation and storage medium
CN109800100A (en) * 2018-12-25 2019-05-24 福建天晴在线互动科技有限公司 A kind of method and terminal for preventing IOS project from collapsing

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9589074B2 (en) * 2014-08-20 2017-03-07 Oracle International Corporation Multidimensional spatial searching for identifying duplicate crash dumps

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103106132A (en) * 2013-03-05 2013-05-15 中标软件有限公司 Kernel function calling stack analyzing and debugging method in case of Linux system breakdown
CN106133698A (en) * 2014-03-17 2016-11-16 微软技术许可有限责任公司 Framework for user model collapse report
US9842017B1 (en) * 2015-03-30 2017-12-12 Amazon Technologies, Inc. Collection and aggregation of device health metrics
CN108694108A (en) * 2017-04-11 2018-10-23 北京京东尚科信息技术有限公司 A kind of method and apparatus of iOS crash datas classification and statistics
CN107506256A (en) * 2017-09-07 2017-12-22 北京京东尚科信息技术有限公司 A kind of method and apparatus of crash data monitoring
CN108763060A (en) * 2018-04-27 2018-11-06 广州华多网络科技有限公司 Native layers of collapse source tracing method, device, storage medium and terminal in android system
CN109298960A (en) * 2018-08-15 2019-02-01 中国平安人寿保险股份有限公司 Application crashes processing method, device, computer installation and storage medium
CN109800100A (en) * 2018-12-25 2019-05-24 福建天晴在线互动科技有限公司 A kind of method and terminal for preventing IOS project from collapsing

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Web服务失败分类法;唐渊等;《湖南工业大学学报》;20090315(第02期);全文 *

Also Published As

Publication number Publication date
CN110865898A (en) 2020-03-06

Similar Documents

Publication Publication Date Title
CN110865898B (en) Method, device, medium and equipment for converging crash call stack
CN110489101B (en) Interface simulation method, system, medium and electronic equipment
CN110489345B (en) Crash aggregation method, device, medium and equipment
CN111625473B (en) Interface test case generation method and device, storage medium and electronic equipment
CN111813641B (en) Method, device, medium and equipment for collecting crash information
CN110489179B (en) Method, device, medium and equipment for acquiring call stack frame function signature
CN110377341B (en) Method, device, medium and electronic equipment for monitoring no-response exception
CN111274503B (en) Data processing method, device, electronic equipment and computer readable medium
CN111813465B (en) Information acquisition method, device, medium and equipment
CN111738316B (en) Zero sample learning image classification method and device and electronic equipment
CN111258847B (en) File handle monitoring and analyzing method, device, medium and equipment
CN110489165A (en) Obtain method, apparatus, medium and the equipment of call stack stack frame command offsets
CN111258998A (en) Data verification method, device, medium and electronic equipment
CN111783010B (en) Webpage blank page monitoring method, device, terminal and storage medium
CN110941549B (en) Memory leak detection method, device, medium and electronic equipment
CN110888773B (en) Method, device, medium and electronic equipment for acquiring thread identification
CN113807056B (en) Document name sequence error correction method, device and equipment
CN112379967B (en) Simulator detection method, device, equipment and medium
CN111680754B (en) Image classification method, device, electronic equipment and computer readable storage medium
CN111241368B (en) Data processing method, device, medium and equipment
CN110764995B (en) Method, device, medium and electronic equipment for detecting file access abnormality
CN110908860B (en) Java thread acquisition method and device, medium and electronic equipment
CN111382057B (en) Test case generation method, test method and device, server and storage medium
CN114398233B (en) Load abnormality detection method and device, server and storage medium
CN111026983B (en) Method, device, medium and electronic equipment for realizing hyperlink

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant