CN110865898A - Method, device, medium and equipment for clustering crash call stack - Google Patents

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

Info

Publication number
CN110865898A
CN110865898A CN201910967012.4A CN201910967012A CN110865898A CN 110865898 A CN110865898 A CN 110865898A CN 201910967012 A CN201910967012 A CN 201910967012A CN 110865898 A CN110865898 A CN 110865898A
Authority
CN
China
Prior art keywords
crash
call stack
parameter
name
function
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.)
Granted
Application number
CN201910967012.4A
Other languages
Chinese (zh)
Other versions
CN110865898B (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

Images

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

Abstract

The present disclosure provides a method, apparatus, medium, and device for crash call stack aggregation, the method comprising: monitoring a crash event in real time through a specified function, and when the crash event occurs, directly reflecting to obtain a crash call stack storage element; 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 name, the class name and the parameter type to a server for classifying the crash call stack. According to the method, the function name, the class name and the parameter type of the crash stack are accurately obtained, the function name, the class name and the parameter type are used as parameters to calculate the hash value of the crash stack, and the crash stacks with the same hash value are aggregated into one class, so that the aggregation accuracy of the crash call stack can be improved, a developer can better and faster troubleshoot problems, and the application quality is improved.

Description

Method, device, medium and equipment for clustering 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 call stack aggregation in crash.
Background
The convergence of the android application crash stack is very important for solving the bug of the application and improving the quality of the application: the server receives a large number of crashed call stacks, which is impractical (too many crashes) if not aggregated and resolved one by one. After the crash stacks are aggregated, a developer can check which crashes occur more times, so that the problem is solved preferentially, and can check distribution characteristics (such as machine type distribution characteristics and android version distribution characteristics) of the same crash to help to check the problem. But if the aggregation algorithm is imperfect (aggregating different crash problems together, or aggregating the same problem into different problems) it affects the accuracy of aggregation and thus the troubleshooting of the problem.
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 but does not consider the parameter type of the method, so that when different crash call stacks have methods with the same name but different parameter types, the two different crashes can be aggregated together, and the aggregation accuracy is influenced.
BRIEF SUMMARY OF THE PRESENT DISCLOSURE
The present disclosure is directed to a method, an apparatus, a medium, and a device for crash call stack aggregation, which can solve at least one of the above-mentioned technical problems. The specific scheme is as follows:
according to a specific implementation manner of the present disclosure, in a first aspect, the present disclosure provides a method for a crash call stack aggregation, including:
monitoring a crash event in real time through a specified function, and when the crash event occurs, directly reflecting to obtain a crash call stack storage element;
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 name, the class name and the parameter type to a server for classifying the crash call stack.
Optionally, the obtaining a method signature of a call stack frame based on the crashed call stack storage element includes:
strongly converting the call stack storage elements into element arrays;
taking a first element of the element array, and converting the first element into an array of a specified type;
traversing the call stack frame, taking an element with an index i of the specified type array as a first parameter, and taking an element with an index 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 stack frames;
and obtaining a method signature of the call stack frame through the first parameter and the second parameter.
Optionally, the obtaining a 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;
in a second language environment, inputting the first parameter and the second parameter into a conversion function to obtain a function object;
and in a first language environment, extracting the signature of the function object to obtain a method signature of the call stack frame.
Optionally, the classifying the crash call stack includes:
calculating the hash value of the crash call stack by taking the function name, the class name and the parameter type as factors;
and aggregating the crash call stacks with the same hash value into one class.
According to a specific embodiment of the present disclosure, in a second aspect, the present disclosure provides a method for a crash call stack aggregation, 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 crash call stack by taking the function name, the class name and the parameter type as factors;
and aggregating the crash call stacks with the same hash value into one class.
According to a specific embodiment of the present disclosure, in a third aspect, the present disclosure provides a crash call stack aggregation apparatus, including:
the first acquisition unit is used for monitoring a crash event in real time through a specified function, and directly reflecting and acquiring a crash call stack storage element when the crash event occurs;
the second obtaining unit is used for obtaining 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;
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 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 converting the first element into a specified type array;
the traversal unit is used for traversing the call stack frame, taking an element with an index i of the specified type array as a first parameter, and taking an element with an index 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 calculation 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;
in a second language environment, inputting the first parameter and the second parameter into a conversion function to obtain a function object;
and in a first language environment, extracting the signature of the function object to obtain a method signature of the call stack frame.
According to a fourth aspect, the present disclosure provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the method of any one of the above.
According to a fifth aspect thereof, the present disclosure provides an electronic device, comprising: one or more processors; storage means for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to carry out a method as claimed in any preceding claim.
Compared with the prior art, the scheme of the embodiment of the disclosure at least has the following beneficial effects: according to the method, the function name, the class name and the parameter type of the crash stack are accurately obtained, the function name, the class name and the parameter type are used as parameters to calculate the hash value of the crash stack, and the crash stacks with the same hash value are aggregated into one class, so that the aggregation accuracy of the crash call stack can be improved, a developer can better and faster troubleshoot problems, and 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 present disclosure and together with the description, serve to explain the principles of the disclosure. It is to be understood that the drawings in the following description are merely exemplary of the disclosure, and that other drawings may be derived from those drawings by one of ordinary skill in the art without the exercise of inventive faculty. In the drawings:
FIG. 1 illustrates a flow diagram of a method of crashing call stack aggregation in accordance with an embodiment of the present disclosure;
FIG. 2 illustrates a flow diagram of a method of crashing call stack aggregation in accordance with another embodiment of the present disclosure;
FIG. 3 illustrates a structural diagram of a crash call stack aggregation apparatus according to an embodiment of the disclosure;
fig. 4 shows an electronic device connection structure schematic according to an embodiment of the present disclosure.
Detailed Description
To make the objects, technical solutions and advantages of the present disclosure clearer, the present disclosure will be described in further detail with reference to the accompanying drawings, and it is apparent that the described embodiments are only a part of the embodiments of the present disclosure, rather than all embodiments. All other embodiments, which can be derived by one of ordinary skill in the art from the embodiments disclosed herein without making any creative effort, shall fall within the scope of protection of the present disclosure.
The terminology used in the embodiments of the present disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. As used in the disclosed 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, and "a plurality" typically includes at least two.
It should be understood that the term "and/or" as used herein is merely one type of association that describes an associated element, meaning that three relationships may exist, e.g., a and/or B may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the contextual elements are in an "or" relationship.
It should be understood that although the terms first, second, third, etc. may be used to describe … … in embodiments of the present disclosure, these … … should not be limited to these terms. These terms are used only to distinguish … …. For example, the first … … can also be referred to as the second … … and, similarly, the second … … can also be referred to as the first … … without departing from the scope of embodiments of the present disclosure.
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 phrases "if determined" or "if detected (a stated condition or event)" may be interpreted as "when determined" or "in response to a determination" or "when detected (a stated condition or event)" or "in response to a detection (a stated condition or event)", depending on the context.
It is also noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that an article 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 article or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in the article or device in which the element is included.
Alternative embodiments of the present disclosure are described in detail below with reference to the accompanying 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 in a mobile terminal, where the mobile terminal may be any android system such as a mobile phone and a PAD, and may be an intelligent terminal capable of operating an APK, and after the intelligent terminal installs an SDK, once a crash (for example, a flash screen) occurs during an operation process, the SDK may automatically obtain a required call stack to analyze a cause of the crash. And after the SDK acquires the signature of each stack frame method in the call stack, reporting the signature to a server side for analysis.
The method specifically comprises the following steps:
step S102: and monitoring the crash event in real time through a specified function, and directly reflecting and acquiring a crash call stack storage element when the crash event occurs.
Firstly, calling a setDefaultUncaudexceptionHandler method of a Thread class to monitor crash (when application initialization is carried out), obtaining a Thread element after crash, and obtaining a member (the name of which is usually backing) in the Thread element by java code reflection to obtain the backing element.
When the trigger event is a crash event (Throwable element), a call stack storage element (backing element) is directly obtained through reflection, wherein the crash event is that when problems such as invalid access of a memory, an invalid element, memory leakage, stack overflow and the like occur in the running process of a mobile phone application program, the application program cannot run normally, so that the program has phenomena such as flash back, no response and the like.
When the trigger event is a stuck event (Thread element), the stuck event refers to an unsmooth event such as delayed response occurring in the process of program running.
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 obtaining a method signature of a call stack frame based on the crashed call stack storage element includes:
step S104-2: and converting the call stack storage element into an element array.
Specifically, the call stack storage element backtrace is forced to an Object [ ] type element (hereinafter, backtraceArr).
Step S104-4: and taking a first element of the element array, and converting the first element into an integer array or a long integer array.
Taking a first element first of the backstraceArr; the first is then forced to an element of int [ ] type (32 bit run case) or long [ ] type (64 bit run case) (hereinafter called first il).
Step S104-6: and traversing the call stack frame, taking the element with the index of the specified type array as i as a first parameter, and taking the element with the index of the element array as i +1 as a second parameter, wherein i is a natural number from 0 to N-1, and N is the number of the stack frames.
Step S104-8: and obtaining a method signature of the call stack frame through the first parameter and the second parameter.
Optionally, the obtaining a 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);
in a second language environment, inputting the first parameter and the second parameter into a conversion function to obtain a function object;
and in a first language environment, extracting the signature of the function object to obtain a method signature of the call stack frame.
Wherein, the size of the backoff is the number N +1 of stack frames, so that the length of the backoff is-1; then i starts traversing from 0 to N-1, i.e. all stack frames are traversed, and each traversal process is as follows: taking an element (hereinafter referred to as mid) with an index of i of firstIL, which is jmehthodID of the method of the stack frame, taking an element (hereinafter referred to as cls) with an index of i +1 of backstraceArr, which is a class where the method of the stack frame is located, then transferring the mid and the cls from a java layer to a c layer, obtaining a function object (hereinafter referred to as method) by the c layer through a ToReflectMethod function of a java virtual machine, and then transferring the method to the java layer and recording a signature (including a method name, a parameter number and types of each parameter).
And obtaining the method name, the name of the class and the parameter type of each method in the java crash call stack after the traversal is completed.
Step S106: and sending the function name, the class name and the parameter type to a server for classifying the crash call stack.
The server is generally configured to receive the crash stack information uploaded by the client, and then calculate the received crash stack information according to a built-in algorithm. The method comprises the following specific steps:
optionally, the classifying the crash call stack includes:
step S106-2: and calculating the hash value of the crash call stack by taking the function name, the class name and the parameter type as factors.
Step S106-4: and aggregating the crash call stacks with the same hash value into one class.
According to the method, the function name, the class name and the parameter type of the crash stack are accurately obtained, the function name, the class name and the parameter type are used as parameters to calculate the hash value of the crash stack, and the crash stacks with the same hash value are aggregated into one class, so that the aggregation accuracy of the crash call stack can be improved, a developer can better and faster troubleshoot problems, and the application quality is improved.
As shown in fig. 2, according to a specific embodiment of the present disclosure, the present disclosure provides a method for a crash call stack aggregation, which is applied to a server side, and specifically includes the following method steps:
step S202: a method signature of a crash call stack is received, the method signature including a function name, a class name, and a parameter type.
Step S204: and calculating the hash value of the crash call stack by taking the function name, the class name and the parameter type as factors.
Step S206: and aggregating the crash call stacks with the same hash value into one class.
The server side needs to calculate a unique hash value for each received crash, and multiple crashes with the same hash value are considered to be the same type of crash. The original data of each crash needing to calculate the hash value is a method name corresponding to each stack frame in the crash stack, a name of a class where the method is located and a character string formed by all parameter types of the method.
According to the method, the function name, the class name and the parameter type of the crash stack are accurately obtained, the function name, the class name and the parameter type are used as parameters to calculate the hash value of the crash stack, and the crash stacks with the same hash value are aggregated into one class, so that the aggregation accuracy of the crash call stack can be improved, a developer can better and faster troubleshoot problems, and 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, and a transmission unit 306. The method comprises the following specific steps:
the first obtaining unit 302 is configured to monitor a crash event in real time through a specified function, and when the crash event occurs, directly reflect and obtain a crash call stack storage element;
a second obtaining unit 304, configured to obtain a method signature of a call stack frame based on the crashed call stack storage element, where the method signature includes a function name, a class name, and a parameter type;
a sending unit 306, configured to send the function name, the class name, and the parameter type to a server, and classify the crash call stack.
Optionally, the second obtaining unit 304 includes:
a first conversion unit (not shown) for converting 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 converting the first element into a specified type array;
a traversal 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 the number of stack frames;
and a computing 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;
in a second language environment, inputting the first parameter and the second parameter into a conversion function to obtain a function object;
and in a first language environment, extracting the signature of the function object to obtain a method signature of the call stack frame.
The device can improve the accuracy of the aggregation of the crash call stack by accurately acquiring the function name, the class name and the parameter type of the crash stack, taking the function name, the class name and the parameter type as parameters to calculate the hash value of the crash stack, and aggregating the crash stacks with the same hash value into one class, so that a developer can better and more quickly troubleshoot problems, thereby improving the application quality.
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 content of the first and second substances,
the memory stores instructions executable by the one processor to cause the at least one processor to perform the method steps of the above embodiments.
The disclosed embodiments provide a non-volatile computer storage medium having stored thereon computer-executable instructions that may perform the method steps as described in the embodiments above.
Referring now to FIG. 4, shown is a schematic diagram of an electronic device suitable for use in implementing embodiments of the present disclosure. The terminal device in the embodiments of the present disclosure may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle terminal (e.g., a car navigation terminal), and the like, and a stationary terminal such as a digital TV, a desktop computer, and the like. The electronic device shown in fig. 4 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 4, the electronic device may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 401 that 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 necessary for the operation of the electronic apparatus are also stored. The processing device 401, the ROM 402, and the RAM 403 are connected to each other via a bus 405. An input/output (I/O) interface 405 is also connected to bus 405.
Generally, the following devices may be connected to the I/O interface 405: input devices 406 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 405 including, for example, a Liquid Crystal Display (LCD), speakers, vibrators, or the like; storage 408 including, for example, tape, hard disk, etc.; and a communication device 405. The communication means 405 may allow the electronic device to communicate wirelessly or by wire with other devices to exchange data. While fig. 4 illustrates an electronic device having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the 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 illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication device 405, or may be installed from the storage device 408, or may be installed from the ROM 402. The computer program performs the above-described functions defined in the methods of the embodiments of the present disclosure when executed by the processing device 401.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination 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 present 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 contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. 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, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
Computer program code for carrying out operations for aspects of the present disclosure may be written in any combination of 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 type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart 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 described in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of an element does not in some cases constitute a limitation on the element itself.

Claims (10)

1. A method for crash call stack aggregation, comprising:
monitoring a crash event in real time through a specified function, and when the crash event occurs, directly reflecting to obtain a crash call stack storage element;
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 name, the class name and the parameter type to a server for classifying the crash call stack.
2. The method of claim 1, wherein obtaining a method signature of a call stack frame based on the crashed call stack storage element comprises:
strongly converting the call stack storage elements into element arrays;
taking a first element of the element array, and converting the first element into an array of a specified type;
traversing the call stack frame, taking an element with an index i of the specified type array as a first parameter, and taking an element with an index 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 stack frames;
and obtaining a method signature of the call stack frame through the first parameter and the second parameter.
3. The method of claim 2, wherein said obtaining a method signature of the call stack frame via the first parameter and the second parameter comprises:
performing language environment conversion on the first parameter and the second parameter, and converting from a first language environment to a second language environment;
in a second language environment, inputting the first parameter and the second parameter into a conversion function to obtain a function object;
and in a first language environment, extracting the signature of the function object to obtain a method signature of the call stack frame.
4. The method of claim 3, wherein the classifying the crash call stack comprises:
calculating the hash value of the crash call stack by taking the function name, the class name and the parameter type as factors;
and aggregating the crash call stacks with the same hash value into one class.
5. A method for crash call stack aggregation, comprising:
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 crash call stack by taking the function name, the class name and the parameter type as factors;
and aggregating the crash call stacks with the same hash value into one class.
6. A crash call stack aggregation apparatus, comprising:
the first acquisition unit is used for monitoring a crash event in real time through a specified function, and directly reflecting and acquiring a crash call stack storage element when the crash event occurs;
the second obtaining unit is used for obtaining 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;
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.
7. The apparatus of claim 6, wherein the second obtaining unit comprises:
the first conversion unit is used for 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 converting the first element into a specified type array;
the traversal unit is used for traversing the call stack frame, taking an element with an index i of the specified type array as a first parameter, and taking an element with an index 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 calculation unit is used for obtaining the method signature of the call stack frame through the first parameter and the second parameter.
8. The apparatus of claim 7, wherein the computing unit is further to:
converting the first and second parameters from a first language environment to a second language environment;
in a second language environment, inputting the first parameter and the second parameter into a conversion function to obtain a function object;
and in a first language environment, extracting the signature of the function object to obtain a method signature of the call stack frame.
9. A computer-readable storage medium, on which a computer program is stored, which program, when being executed by a processor, carries out the method according to any one of claims 1 to 5.
10. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to carry out the method of any one of claims 1 to 5.
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 true CN110865898A (en) 2020-03-06
CN110865898B 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)

Cited By (9)

* 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
CN111813641A (en) * 2020-06-19 2020-10-23 北京字节跳动网络技术有限公司 Method, device, medium and equipment for collecting crash information
CN111813465A (en) * 2020-06-19 2020-10-23 北京字节跳动网络技术有限公司 Information acquisition method, device, medium and equipment
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
CN112433877A (en) * 2020-12-01 2021-03-02 北京五八信息技术有限公司 Application startup crash detection method and device, electronic equipment and storage medium
CN113342431A (en) * 2021-06-29 2021-09-03 苏州科达科技股份有限公司 Function call stack backtracking and program exception handling method, device, equipment and medium
US11487601B2 (en) * 2020-03-26 2022-11-01 Arista Networks, Inc. Persistent crash logging
CN112433877B (en) * 2020-12-01 2024-05-17 北京五八信息技术有限公司 Method and device for detecting application start-up crash, electronic equipment and storage medium

Citations (9)

* 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
US20150261596A1 (en) * 2014-03-17 2015-09-17 Microsoft Corporation Framework for user-mode crash reporting
US20170177743A1 (en) * 2014-08-20 2017-06-22 Oracle International Corporation Multidimensional spatial searching for identifying substantially similar data fields
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

Patent Citations (10)

* 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
US20150261596A1 (en) * 2014-03-17 2015-09-17 Microsoft Corporation Framework for user-mode crash reporting
CN106133698A (en) * 2014-03-17 2016-11-16 微软技术许可有限责任公司 Framework for user model collapse report
US20170177743A1 (en) * 2014-08-20 2017-06-22 Oracle International Corporation Multidimensional spatial searching for identifying substantially similar data fields
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 (2)

* Cited by examiner, † Cited by third party
Title
唐渊等: "Web服务失败分类法", 《湖南工业大学学报》 *
唐渊等: "Web服务失败分类法", 《湖南工业大学学报》, no. 02, 15 March 2009 (2009-03-15) *

Cited By (12)

* 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
CN111813641A (en) * 2020-06-19 2020-10-23 北京字节跳动网络技术有限公司 Method, device, medium and equipment for collecting crash information
CN111813465A (en) * 2020-06-19 2020-10-23 北京字节跳动网络技术有限公司 Information acquisition method, device, medium and equipment
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
CN112433877A (en) * 2020-12-01 2021-03-02 北京五八信息技术有限公司 Application startup crash detection method and device, electronic 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
CN113342431A (en) * 2021-06-29 2021-09-03 苏州科达科技股份有限公司 Function call stack backtracking and program exception handling method, device, equipment and medium
CN113342431B (en) * 2021-06-29 2023-02-07 苏州科达科技股份有限公司 Function call stack backtracking and program exception handling method, device, equipment and medium

Also Published As

Publication number Publication date
CN110865898B (en) 2023-09-05

Similar Documents

Publication Publication Date Title
CN110865898B (en) Method, device, medium and equipment for converging crash call stack
US20230394671A1 (en) Image segmentation method and apparatus, and device, and storage medium
CN110489101B (en) Interface simulation method, system, medium and electronic equipment
US9948524B2 (en) Network element diagnostic evaluation
CN110489179B (en) Method, device, medium and equipment for acquiring call stack frame function signature
CN111258847B (en) File handle monitoring and analyzing method, device, medium and equipment
CN110377341B (en) Method, device, medium and electronic equipment for monitoring no-response exception
CN111813465B (en) Information acquisition method, device, medium and equipment
CN111738316B (en) Zero sample learning image classification method and device and electronic equipment
CN110764941A (en) Method, device, medium and equipment for acquiring call stack frame instruction offset
CN110489165B (en) Method, device, medium and equipment for acquiring call stack frame instruction offset
CN110059064B (en) Log file processing method and device and computer readable storage medium
CN110083529B (en) Automatic testing method, device, medium and electronic equipment
CN116225886A (en) Test case generation method, device, equipment, storage medium and program product
CN112182160B (en) Log data processing method and device, storage medium and electronic equipment
CN111382058B (en) Service testing method and device, server and storage medium
CN114510305B (en) Model training method and device, storage medium and electronic equipment
CN112379967B (en) Simulator detection method, device, equipment and medium
CN113807056B (en) Document name sequence error correction method, device and equipment
CN111382057B (en) Test case generation method, test method and device, server and storage medium
CN112882921B (en) Fault simulation method and device
CN110764995B (en) Method, device, medium and electronic equipment for detecting file access abnormality
CN109614137B (en) Software version control method, device, equipment and medium
CN111813641B (en) Method, device, medium and equipment for collecting crash information
CN114116238B (en) Data processing optimization method and device, electronic equipment and readable storage medium

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