CN112099982A - Collapse information positioning method, device, medium and electronic equipment - Google Patents

Collapse information positioning method, device, medium and electronic equipment Download PDF

Info

Publication number
CN112099982A
CN112099982A CN202010934912.1A CN202010934912A CN112099982A CN 112099982 A CN112099982 A CN 112099982A CN 202010934912 A CN202010934912 A CN 202010934912A CN 112099982 A CN112099982 A CN 112099982A
Authority
CN
China
Prior art keywords
function
information
called
crash
acquiring
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
CN202010934912.1A
Other languages
Chinese (zh)
Other versions
CN112099982B (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 CN202010934912.1A priority Critical patent/CN112099982B/en
Publication of CN112099982A publication Critical patent/CN112099982A/en
Application granted granted Critical
Publication of CN112099982B publication Critical patent/CN112099982B/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/079Root cause analysis, i.e. error or fault diagnosis

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The disclosure provides a crash information positioning method, device, medium and electronic equipment. According to the method and the device, each piece of stack frame information in the stack information is called to only obtain the characteristic information of the called function when the thread crashes, and the characteristic information of the called function provides a positioning basis for further positioning the crash information. The method and the device avoid the interference of additional information on positioning, reduce data processing amount, shorten data analysis time and ensure the rapidity of aggregation. The method enables a developer to quickly find the reason causing the thread crash, and shortens the elimination time.

Description

Collapse information positioning method, device, medium and electronic equipment
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method, an apparatus, a medium, and an electronic device for locating crash information.
Background
In the android system, after an application program crashes, a crash collection program can collect crash information and then report the crash information to a server. The server may receive a large amount of crash information reported from different devices. And analyzing the crash information to obtain the characteristic information of the called function, such as the function name of the called function. And performing aggregation calculation on the feature information of the called function to obtain an id value, wherein all the crash information with the same id value is the crash information of the same type.
For such a method for acquiring crash information, it is critical to acquire the feature information of the function to be called, but in the prior art, the feature information of the function to be called (for example, the function name of the function to be called) can only be acquired through an analysis tool (for example, addr2line tool), and some columns of additional information (for example, the source code file name, the source code line number, and the analysis function name) can also be found, so that the tool is time-consuming and inefficient.
Disclosure of Invention
This summary is provided to introduce a selection of concepts in a simplified form that are further described below in the detailed description. This summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
An object of the present disclosure is to provide a method, an apparatus, a medium, and an electronic device for locating crash information, 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 locating crash information, including:
acquiring call stack information of the crash thread from the crash information;
acquiring frame information of each stack according to the call stack information;
and acquiring the characteristic information of the called function when the thread crashes based on the information of each stack frame.
According to a second aspect of the present disclosure, there is provided a crash information positioning apparatus, including:
the acquiring call stack information unit is used for acquiring call stack information of the crash thread from the crash information;
the stack frame information acquiring unit is used for acquiring each stack frame information according to the call stack information;
and the called function characteristic information obtaining unit is used for obtaining the called function characteristic information when the thread crashes based on the information of each stack frame.
According to a third aspect, the present disclosure provides a computer-readable storage medium, on which a computer program is stored, the program, when executed by a processor, implementing the crash information locating method according to any one of the first aspect.
According to a fourth aspect thereof, 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 crash information locating method of any of the first aspects.
Compared with the prior art, the scheme of the embodiment of the disclosure at least has the following beneficial effects:
the disclosure provides a crash information positioning method, device, medium and electronic equipment. According to the method and the device, each piece of stack frame information in the stack information is called to only obtain the characteristic information of the called function when the thread crashes, and the characteristic information of the called function provides a positioning basis for further positioning the crash information. The method and the device avoid the interference of additional information on positioning, reduce data processing amount, shorten data analysis time and ensure the rapidity of aggregation. The method enables a developer to quickly find the reason causing the thread crash, and shortens the elimination time.
Drawings
The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and features are not necessarily drawn to scale. In the drawings:
FIG. 1 illustrates a flow diagram of a crash information locating method in accordance with an embodiment of the disclosure;
FIG. 2 shows a block diagram of elements of a crash information locating device, according to an embodiment of the disclosure;
fig. 3 shows an electronic device connection structure schematic according to an embodiment of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order, and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "include" and variations thereof as used herein are open-ended, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
Alternative embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.
A first embodiment provided by the present disclosure is an embodiment of a crash information positioning method.
The embodiments of the present disclosure are described in detail below with reference to fig. 1.
And step S101, acquiring call stack information of the crash thread from the crash information.
The call stack is a section of specific memory in computer science and is composed of stack frames. Each stack frame is an array in which information associated with the called function is stored.
All the called functions in the embodiment of the present disclosure are dynamically called functions. The called function is stored in the dynamic function library file.
And when the thread is crashed, acquiring the crash information and storing the crash information in a crash file. For large network systems, crash files are typically reported to the server.
Crash information, comprising: the method comprises the steps of calling stack information, the register information of a crash thread, the memory value of a memory area pointed by a crash thread register, memory occupation information, file handle information and a memory mapping table.
The call stack information of the crash thread is obtained from the crash information, namely, the crash file is generated when the crash occurs to the thread, the crash information is obtained from the crash file, and the call stack information is obtained from the crash information.
The purpose of the embodiment of the present disclosure is to traverse each stack frame information in the call stack information, and obtain the called function feature information from each stack frame information. Furthermore, the function which causes the thread crash can be determined by aggregating the characteristic information of the called function.
And step S102, acquiring the frame information of each stack according to the call stack information.
Each stack frame information, at least comprising: and providing the file name of the dynamic function library file of the called function and the function offset of the called function loaded into the memory by the dynamic function library file. For example, in an android system, a dynamic function library file is a so file, the so file is a shared library file for dynamic calling, and the so file can be mapped into a memory through a mmap function; when the function in the so file is called, the so file name and the function offset of the called function in the memory for loading the so file are stored in the stack frame; when a thread crash occurs, the crash information will save the information in the stack frame at the time of the crash. Some stack frame information also includes called function feature information, e.g., the function name of the called function.
Step S103, acquiring the characteristic information of the called function when the thread crashes based on the information of each stack frame.
Due to the difference of the crash information, some stack frame information includes function characteristic information, and some stack frame information does not include function characteristic information. Therefore, the method for acquiring the function characteristic information of the called function when the thread crashes based on the stack frame information comprises the following steps:
step S102-1, retrieving whether the stack frame information includes the called function characteristic information.
Step S102-2, when the stack frame information includes the called function characteristic information, the called function characteristic information is obtained from the stack frame information.
Step S102-3, when the stack frame information does not include the called function feature information, obtaining, from the stack frame information, a file name of a dynamic function library file providing a called function and a function offset of the called function, where the dynamic function library file is loaded into a memory, and obtaining the called function feature information based on the file name and the function offset.
That is, when there is no called function feature information in the stack frame information, the embodiment of the present disclosure acquires the called function feature information through other stack frame information.
Specifically, the obtaining the feature information of the called function based on the file name and the function offset includes the following steps:
and S102-3-1, inquiring whether a matched dynamic function library file exists according to the file name and the preset dynamic function library identity information.
Each dynamic function library file comprises a dynamic function library identity information which is used for distinguishing different dynamic function library files. For the same dynamic function library file, because the versions are different, the dynamic function library identity information is also different, and developers can know the dynamic function library identity information when applying the dynamic function library file. Therefore, when analyzing the crash information, the dynamic function library identity information can be preset.
The matched dynamic function library file can be inquired from a local dynamic function library file, and also can be inquired from a dynamic function library file stored in a specified network terminal.
And S102-3-2, when a matched dynamic function library file exists, acquiring the characteristic information of the called function based on the matched dynamic function library file and the function offset.
Specifically, the obtaining the feature information of the called function based on the matching dynamic function library file and the function offset includes the following steps:
and S102-3-3-1, acquiring function partition information from the matched dynamic function library file based on preset function partition characteristics.
The dynamic function library file comprises different types of information, and the different types of information are stored by taking the partitions as units. In order to identify the type of each partition, each partition contains characteristic information of the partition type. For example, in the android system, the so file is an elf format file, and information of all partitions of the so file is obtained through elf header information; the function partition information is characterized by the function partition characteristic of the function partition information, and the function partition information can be inquired from the so file according to the preset function partition characteristic of the function partition characteristic.
And S102-3-3-2, inquiring the function partition information according to a preset function type and the function offset, and acquiring the function characteristic information.
The function partition information comprises a plurality of types of information, wherein the plurality of types of information comprise function type information, and the function characteristic information can be acquired only in the function type information.
Specifically, the method comprises the following steps:
and S102-3-3-2-1, acquiring each piece of function information from the function partition information according to a preset function type.
The function information includes: and the function characteristic information and the relative starting address and the relative ending address of the function corresponding to the function characteristic information in the matching dynamic function library file.
And S102-3-3-2-2, acquiring a relative address of the called function in the matched dynamic function library file according to the function offset.
And S102-3-3-2-3, comparing the relative address of the called function with the function address range of each function information.
The function address range includes an address range from the relative start address to the relative end address.
Step S102-3-3-2-4, when the relative address of the function to be called is in the function address range, determining the function characteristic information corresponding to the function address range as the function characteristic information to be called.
Optionally, after querying whether a matching dynamic function library file exists according to the file name and the preset dynamic function library identity information, the method further includes the following steps:
and S102-3-4, when the matched dynamic function library file does not exist, acquiring the information of the next stack frame.
That is, when there is no matching dynamic function library file, the method abandons searching the called function characteristic information from the stack frame information, and continues searching the called function characteristic information from the next stack frame information.
And step S104, performing aggregation calculation on all the called function characteristic information to acquire aggregation characteristic information.
For example, a hash algorithm is used to perform aggregation calculation on all the feature information of the function to be tuned, and an ID value is obtained. Under normal conditions, the called function should be released by the thread after the application is finished. If the aggregation characteristic information after the multiple times of thread crash is the same value, it indicates that the functions corresponding to the called function characteristic information associated with the aggregation characteristic information are the same batch of functions, and the batch of functions causes the thread crash.
The embodiment of the disclosure only obtains the feature information of the called function when the thread crashes by calling each stack frame information in the stack information, and the feature information of the called function provides a positioning basis for further positioning the crash information. The method and the device avoid the interference of additional information on positioning, reduce data processing amount, shorten data analysis time and ensure the rapidity of aggregation. The method enables a developer to quickly find the reason causing the thread crash, and shortens the elimination time.
Corresponding to the first embodiment provided by the present disclosure, the present disclosure also provides a second embodiment, namely, a crash information positioning device. Since the second embodiment is basically similar to the first embodiment, the description is simple, and the relevant portions should be referred to the corresponding description of the first embodiment. The device embodiments described below are merely illustrative.
Fig. 2 shows an embodiment of a crash information locating device provided by the present disclosure.
Referring to fig. 2, the present disclosure provides a crash information positioning device, including:
an obtain call stack information unit 201, configured to obtain call stack information of the crash thread from the crash information;
a stack frame information acquiring unit 202, configured to acquire each stack frame information according to the call stack information;
a get called function feature information unit 203, configured to get called function feature information when the thread crashes based on each stack frame information.
Optionally, the unit 203 for obtaining called function feature information includes:
a stack frame information retrieving subunit, configured to retrieve whether the stack frame information includes the called function feature information;
a first obtaining called function feature information subunit, configured to, when the stack frame information includes the called function feature information, obtain the called function feature information from the stack frame information;
a second obtaining called function feature information subunit, configured to, when the stack frame information does not include the called function feature information, obtain, from the stack frame information, a file name of a dynamic function library file that provides a called function and a function offset of the called function, where the dynamic function library file is loaded into a memory, and obtain, based on the file name and the function offset, the called function feature information.
Optionally, in the second obtaining called function feature information subunit, the method includes:
the sub-unit for inquiring the existence of the matched dynamic function library file is used for inquiring whether the matched dynamic function library file exists according to the file name and the preset dynamic function library identity information;
and a third obtaining called function characteristic information subunit, configured to, when there is a matching dynamic function library file, obtain the called function characteristic information based on the matching dynamic function library file and the function offset.
Optionally, in the third obtaining called function feature information subunit, the method includes:
the function partition information obtaining subunit is used for obtaining function partition information from the matched dynamic function library file based on preset function partition characteristics;
and a fourth called function feature information obtaining subunit, configured to query the function partition information according to a preset function type and the function offset, and obtain the called function feature information.
Optionally, in the fourth sub-unit for obtaining feature information of a called function, the method includes:
the function information obtaining subunit is used for obtaining each piece of function information from the function partition information according to a preset function type; the function information includes: function characteristic information and a relative starting address and a relative ending address of a function corresponding to the function characteristic information in the matched dynamic function library file;
a called function relative address obtaining subunit, configured to obtain, according to the function offset, a called function relative address of the called function in the matching dynamic function library file;
a comparison function address range subunit, configured to compare the called function relative address with the function address range of each function information; the function address range comprises an address range from the relative start address to the relative end address;
and a called function characteristic information determining subunit, configured to determine, when the relative address of the called function is within the function address range, that the function characteristic information corresponding to the function address range is the called function characteristic information.
Optionally, in the second obtaining called function feature information subunit, the method further includes:
and the sub-unit for obtaining the next stack frame information is used for obtaining the next stack frame information when no matching dynamic function library file exists.
Optionally, the called function feature information includes a function name of the called function.
The embodiment of the disclosure only obtains the feature information of the called function when the thread crashes by calling each stack frame information in the stack information, and the feature information of the called function provides a positioning basis for further positioning the crash information. The method and the device avoid the interference of additional information on positioning, reduce data processing amount, shorten data analysis time and ensure the rapidity of aggregation. The method enables a developer to quickly find the reason causing the thread crash, and shortens the elimination time.
The embodiment of the present disclosure provides a third embodiment, that is, an electronic device, where the electronic device is used in a method for locating crash information, and the electronic device includes: at least one processor; and a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the one processor to cause the at least one processor to perform the crash information locating method of the first embodiment.
The fourth embodiment provides a crash information positioning computer storage medium, where the computer storage medium stores computer-executable instructions, and the computer-executable instructions can execute the crash information positioning method in the first embodiment.
Referring now to FIG. 3, 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. 3 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. 3, the electronic device may include a processing device (e.g., a central processing unit, a graphics processor, etc.) 301 that may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)302 or a program loaded from a storage device 308 into a Random Access Memory (RAM) 303. In the RAM 303, various programs and data necessary for the operation of the electronic apparatus are also stored. The processing device 301, the ROM 302, and the RAM 303 are connected to each other via a bus 304. An input/output (I/O) interface 305 is also connected to bus 304.
Generally, the following devices may be connected to the I/O interface 305: input devices 306 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 307 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage devices 308 including, for example, magnetic tape, hard disk, etc.; and a communication device 309. The communication means 309 may allow the electronic device to communicate wirelessly or by wire with other devices to exchange data. While fig. 3 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 carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication means 309, or installed from the storage means 308, or installed from the ROM 302. The computer program, when executed by the processing device 301, performs the above-described functions defined in the methods of the embodiments of the present disclosure.
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.
In some embodiments, the clients, servers may communicate using any currently known or future developed network Protocol, such as HTTP (HyperText Transfer Protocol), and may interconnect with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
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 the present disclosure may be written in any combination of one or more programming languages, including but not limited to an object 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.
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.
Further, while operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, although several implementation-specific subdivisions are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.

Claims (10)

1. A crash information locating method is characterized by comprising the following steps:
acquiring call stack information of the crash thread from the crash information;
acquiring frame information of each stack according to the call stack information;
and acquiring the characteristic information of the called function when the thread crashes based on the information of each stack frame.
2. The crash information locating method according to claim 1, wherein the obtaining the function feature information that is called when the thread crashes based on stack frame information comprises:
retrieving whether the stack frame information comprises the called function characteristic information or not;
when the stack frame information comprises the called function characteristic information, acquiring the called function characteristic information from the stack frame information;
when the stack frame information does not include the called function characteristic information, acquiring a file name of a dynamic function library file providing a called function and a function offset of the called function loaded into a memory by the dynamic function library file from the stack frame information, and acquiring the called function characteristic information based on the file name and the function offset.
3. The crash information locating method according to claim 2, wherein the obtaining the called function feature information based on the file name and the function offset comprises:
inquiring whether a matched dynamic function library file exists according to the file name and preset dynamic function library identity information;
and when the matched dynamic function library file exists, acquiring the characteristic information of the called function based on the matched dynamic function library file and the function offset.
4. The crash information locating method of claim 3, wherein said obtaining the called function feature information based on the matching dynamic function library file and the function offset comprises:
acquiring function partition information from the matched dynamic function library file based on preset function partition characteristics;
and inquiring the function partition information according to a preset function type and the function offset to acquire the characteristic information of the called function.
5. The crash information locating method according to claim 4, wherein the querying the function partition information according to a preset function type and the function offset to obtain the called function feature information comprises:
acquiring each piece of function information from the function partition information according to a preset function type; the function information includes: function characteristic information and a relative starting address and a relative ending address of a function corresponding to the function characteristic information in the matched dynamic function library file;
acquiring a relative address of a called function of the called function in the matched dynamic function library file according to the function offset;
comparing the relative address of the called function with the function address range of each function information; the function address range comprises an address range from the relative start address to the relative end address;
and when the relative address of the called function is in the function address range, determining the function characteristic information corresponding to the function address range as the called function characteristic information.
6. The crash information locating method according to claim 3, wherein after said querying whether there is a matching dynamic function library file according to the file name and preset dynamic function library identity information, further comprising:
and when the matched dynamic function library file does not exist, acquiring the next stack frame information.
7. The crash information locating method of claim 1, wherein the called function characteristic information comprises a function name of the called function.
8. A crash information locating device, comprising:
the acquiring call stack information unit is used for acquiring call stack information of the crash thread from the crash information;
the stack frame information acquiring unit is used for acquiring each stack frame information according to the call stack information;
and the called function characteristic information obtaining unit is used for obtaining the called function characteristic information when the thread crashes based on the information of each stack frame.
9. A computer-readable storage medium on which a computer program is stored, the program, when executed by a processor, implementing a crash information locating method according to any one of claims 1 to 7.
10. 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 a crash information locating method as recited in any one of claims 1-7.
CN202010934912.1A 2020-09-08 2020-09-08 Crash information positioning method and device, medium and electronic equipment Active CN112099982B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010934912.1A CN112099982B (en) 2020-09-08 2020-09-08 Crash information positioning method and device, medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010934912.1A CN112099982B (en) 2020-09-08 2020-09-08 Crash information positioning method and device, medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN112099982A true CN112099982A (en) 2020-12-18
CN112099982B CN112099982B (en) 2024-07-05

Family

ID=73752158

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010934912.1A Active CN112099982B (en) 2020-09-08 2020-09-08 Crash information positioning method and device, medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN112099982B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112905378A (en) * 2021-03-03 2021-06-04 广州虎牙科技有限公司 Crash information analysis method and device, electronic equipment and readable storage medium
CN113434150A (en) * 2021-08-30 2021-09-24 麒麟软件有限公司 Linux kernel crash information positioning method
WO2023185335A1 (en) * 2022-03-28 2023-10-05 北京字节跳动网络技术有限公司 Crash clustering method and apparatus, electronic device and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101539883A (en) * 2009-05-05 2009-09-23 北京和利时系统工程有限公司 Error tracking method of embedded system and device thereof
CN105653432A (en) * 2015-12-22 2016-06-08 北京奇虎科技有限公司 Processing method and device of crash data
US20170185467A1 (en) * 2015-12-29 2017-06-29 EMC IP Holding Company LLC Method and apparatus for determining failure similarity in computing device
WO2018236141A1 (en) * 2017-06-20 2018-12-27 넷마블 주식회사 Crash report grouping method, server and computer program
CN110413432A (en) * 2019-07-02 2019-11-05 Oppo广东移动通信有限公司 A kind of information processing method, electronic equipment and storage medium
CN110489345A (en) * 2019-08-08 2019-11-22 北京字节跳动网络技术有限公司 A kind of collapse polymerization, device, medium and equipment

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101539883A (en) * 2009-05-05 2009-09-23 北京和利时系统工程有限公司 Error tracking method of embedded system and device thereof
CN105653432A (en) * 2015-12-22 2016-06-08 北京奇虎科技有限公司 Processing method and device of crash data
US20170185467A1 (en) * 2015-12-29 2017-06-29 EMC IP Holding Company LLC Method and apparatus for determining failure similarity in computing device
CN106933689A (en) * 2015-12-29 2017-07-07 伊姆西公司 A kind of method and apparatus for computing device
WO2018236141A1 (en) * 2017-06-20 2018-12-27 넷마블 주식회사 Crash report grouping method, server and computer program
CN110413432A (en) * 2019-07-02 2019-11-05 Oppo广东移动通信有限公司 A kind of information processing method, electronic equipment and storage medium
CN110489345A (en) * 2019-08-08 2019-11-22 北京字节跳动网络技术有限公司 A kind of collapse polymerization, device, medium and equipment

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112905378A (en) * 2021-03-03 2021-06-04 广州虎牙科技有限公司 Crash information analysis method and device, electronic equipment and readable storage medium
CN112905378B (en) * 2021-03-03 2024-03-08 广州虎牙科技有限公司 Crash information analysis method, device, electronic equipment and readable storage medium
CN113434150A (en) * 2021-08-30 2021-09-24 麒麟软件有限公司 Linux kernel crash information positioning method
CN113434150B (en) * 2021-08-30 2021-12-17 麒麟软件有限公司 Linux kernel crash information positioning method
WO2023185335A1 (en) * 2022-03-28 2023-10-05 北京字节跳动网络技术有限公司 Crash clustering method and apparatus, electronic device and storage medium

Also Published As

Publication number Publication date
CN112099982B (en) 2024-07-05

Similar Documents

Publication Publication Date Title
CN111581563B (en) Page response method and device, storage medium and electronic equipment
CN111679990B (en) Test data generation method and device, readable medium and electronic equipment
CN112099982B (en) Crash information positioning method and device, medium and electronic equipment
CN111400625B (en) Page processing method and device, electronic equipment and computer readable storage medium
CN111241137B (en) Data processing method, device, electronic equipment and storage medium
CN111262907B (en) Service instance access method and device and electronic equipment
CN111309366B (en) Method, device, medium and electronic equipment for managing registration core
CN113220281A (en) Information generation method and device, terminal equipment and storage medium
CN110888773B (en) Method, device, medium and electronic equipment for acquiring thread identification
CN111596992A (en) Navigation bar display method and device and electronic equipment
CN116302271A (en) Page display method and device and electronic equipment
CN112084086B (en) Information collection method, device, medium and electronic equipment
CN111209042B (en) Method, device, medium and electronic equipment for establishing function stack
CN111143355B (en) Data processing method and device
CN110764995B (en) Method, device, medium and electronic equipment for detecting file access abnormality
CN111399730A (en) Image processing method, image processing device, electronic equipment and computer readable storage medium
CN111831655B (en) Data processing method, device, medium and electronic equipment
CN111309549B (en) Monitoring method, monitoring system, readable medium and electronic equipment
CN116431523B (en) Test data management method, device, equipment and storage medium
CN111581305B (en) Feature processing method, device, electronic equipment and medium
CN112286773A (en) Method, device, medium and electronic equipment for collecting crash information
CN114844741A (en) CAN bus data storage method and device, electronic equipment and computer readable medium
CN116610719A (en) Data query method, device, equipment and storage medium
CN115705193A (en) Distributed compiling method, device, equipment and medium
CN118488017A (en) Traffic mirroring method, traffic mirroring device, traffic mirroring equipment and 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