CN110727566A - Method, device, medium and electronic equipment for acquiring process crash information - Google Patents
Method, device, medium and electronic equipment for acquiring process crash information Download PDFInfo
- Publication number
- CN110727566A CN110727566A CN201910838285.9A CN201910838285A CN110727566A CN 110727566 A CN110727566 A CN 110727566A CN 201910838285 A CN201910838285 A CN 201910838285A CN 110727566 A CN110727566 A CN 110727566A
- Authority
- CN
- China
- Prior art keywords
- information
- crash
- instruction
- memory
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 310
- 230000008569 process Effects 0.000 title claims abstract description 270
- 238000002347 injection Methods 0.000 claims abstract description 33
- 239000007924 injection Substances 0.000 claims abstract description 33
- 238000004590 computer program Methods 0.000 claims description 9
- 238000000926 separation method Methods 0.000 claims description 8
- 238000004806 packaging method and process Methods 0.000 claims description 7
- 230000007246 mechanism Effects 0.000 abstract description 6
- 230000006870 function Effects 0.000 description 15
- 238000010586 diagram Methods 0.000 description 12
- 238000004891 communication Methods 0.000 description 7
- 238000012545 processing Methods 0.000 description 7
- 230000003287 optical effect Effects 0.000 description 6
- 230000006399 behavior Effects 0.000 description 5
- 239000013307 optical fiber Substances 0.000 description 2
- 230000000644 propagated effect Effects 0.000 description 2
- 239000004065 semiconductor Substances 0.000 description 2
- 241000700605 Viruses Species 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 239000000243 solution Substances 0.000 description 1
- 208000024891 symptom Diseases 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/34—Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
- G06F11/3466—Performance evaluation by tracing or monitoring
- G06F11/3476—Data logging
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3051—Monitoring arrangements for monitoring the configuration of the computing system or of the computing system component, e.g. monitoring the presence of processing resources, peripherals, I/O links, software programs
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3065—Monitoring arrangements determined by the means or processing involved in reporting the monitored data
-
- Y—GENERAL 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
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- Computing Systems (AREA)
- Debugging And Monitoring (AREA)
Abstract
The disclosure provides a method, a device, a medium and an electronic device for acquiring process crash information. The method comprises the following steps: acquiring first process parameter information sent by a first process after the crash; generating a first process injection instruction based on the first process parameter information; and acquiring the crash information of the first process according to the first process injection instruction. According to the method and the device, the instruction injection is carried out on the first process through the dump process, the crash information is obtained, the information before and after the process runs when the first process crashes can be obtained from the crash information, and the crash problem is conveniently located. By comprehensively analyzing the crash information of the first process, the crash reason of the first process crash can be obtained. The problem that the process crash cannot be analyzed due to the fact that a core dump mechanism is not available is solved, and further, the problem of system crash is solved.
Description
Technical Field
The present disclosure relates to the field of system debugging, and in particular, to a method, an apparatus, a medium, and an electronic device for acquiring process crash information.
Background
The system crash is a symptom that a computer cannot normally operate and frequently crashes due to system operation problems or software design problems or virus malicious intrusion.
The core dump (CoreDump) is a mechanism for dealing with system crash in the Linux system, and is to write the content of the process address space at this time and other information about the process state into a disk file when the process terminates running after receiving some signals. The disk file and the GDB debugging tool in the Linux system can be used for comprehensively analyzing the crash process, so that the problem of system crash can be solved.
However, there is no core dump mechanism and similar debugging tools for android systems, and thus there is no effective means to analyze system crash issues.
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.
The present disclosure is directed to a method, an apparatus, a medium, and an electronic device for obtaining process 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 obtaining process crash information, including:
acquiring first process parameter information sent by a first process after the crash;
generating a first process injection instruction based on the first process parameter information;
and acquiring the crash information of the first process according to the first process injection instruction.
According to a specific embodiment of the present disclosure, in a second aspect, the present disclosure provides an apparatus for acquiring process crash information, including:
the crash parameter obtaining unit is used for obtaining first process parameter information sent by a first process after crash;
the generation injection instruction unit is used for generating a first process injection instruction based on the first process parameter information;
and the crash information obtaining unit is used for obtaining the crash information of the first process according to the first process injection instruction.
According to a third aspect, there is provided a computer readable storage medium, on which a computer program is stored, the program, when executed by a processor, implementing the method for acquiring process crash information 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 which, when executed by the one or more processors, cause the one or more processors to implement the method of obtaining process crash information as described in 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 method, a device, a medium and an electronic device for acquiring process crash information. The method comprises the following steps: acquiring first process parameter information sent by a first process after the crash; generating a first process injection instruction based on the first process parameter information; and acquiring the crash information of the first process according to the first process injection instruction. According to the method and the device, the instruction injection is carried out on the first process through the dump process, the crash information is obtained, the information before and after the process runs when the first process crashes can be obtained from the crash information, and the crash problem is conveniently located. By comprehensively analyzing the crash information of the first process, the crash reason of the first process crash can be obtained. The problem that the process crash cannot be analyzed due to the fact that a core dump mechanism is not available is solved, and further, the problem of system crash is solved.
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 method of obtaining process crash information in accordance with an embodiment of the disclosure;
FIG. 2 illustrates a call relationship diagram with a first process according to an embodiment of the disclosure;
FIG. 3 shows a block diagram of an ELF format file according to an embodiment of the present disclosure;
FIG. 4 shows a block diagram of elements of an apparatus to obtain process crash information, in accordance with an embodiment of the present disclosure;
fig. 5 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 method for acquiring process crash information.
The following describes an embodiment of the present disclosure in detail with reference to fig. 1, fig. 2, and fig. 3, where fig. 1 shows a flowchart of a method for obtaining process crash information according to an embodiment of the present disclosure; FIG. 2 illustrates a call relationship diagram with a first process according to an embodiment of the disclosure; fig. 3 illustrates a structure diagram of an ELF format file according to an embodiment of the present disclosure.
Referring to fig. 1, in step S101, first process parameter information sent by the first process after the crash is acquired.
The crash refers to process crash, and because a program of the process has a design error, when the process runs, the error is accumulated to a certain degree, the process cannot continue to run normally, so that the problem of process crash occurs. For example, a process has a problem of memory leak, and when the leaked memory cannot be released all the time and finally the memory is full, the process may be crashed, or even the system may be crashed.
Referring to fig. 2, the embodiment of the present disclosure is applied to a dump process, where the dump process is used to obtain crash information of a first process. An exception handling function is set in a program of the first process, and the exception handling function is registered in an initialization stage of starting the first process. And calling back the exception handling function when the first process crashes, and sending the parameter information of the first process to the dump process by the exception handling function. And the first process exits after the dump completion information sent by the dump process is acquired.
The dump process may be started by the first process during an initialization phase of the start-up, or may be started by the exception handling function when the first process calls back the exception handling function. The disclosed embodiments are not limiting.
Optionally, the obtaining the first process parameter information sent by the first process after the crash includes:
step S101-1, acquiring first process parameter information sent by the first process after the crash through the shared memory of the first process.
In the embodiment of the disclosure, the first process and the dump process perform inter-process communication in a memory sharing manner.
The first process parameter information includes: the first process identification information, the first process memory address information and the first process memory size information.
The first process identification information is unique information representing the first process. For example, the first process ID.
Step S102, generating a first process injection instruction based on the first process parameter information.
The first process injection instruction is an instruction for acquiring the first process crash information by the dump process.
Optionally, the injecting, by the first process, an instruction includes: the method comprises the steps of adding a first process additional instruction, reading a first process register instruction, reading a first process memory instruction and a first process separation instruction.
For example, in an operating system of a mobile phone, a Ptrace instruction may be used to generate a first process injection instruction, where parameters include: behavior parameters, injected process ID, address parameters, and data size parameters; the Ptrace instruction can directly and remotely call functions such as dlopen \ dlsym and the like to be loaded into the first process and execute first process injection instructions with different parameters.
The generating a first process injection instruction based on the first process parameter information comprises the following steps:
step S102-1, acquiring the first process additional instruction based on the first process identification information.
For example, continuing the above example, when the behavior parameter is PTRACE _ ATTACH and the injected process ID is the first process ID, then a first process additional instruction is generated.
Step S102-2, obtaining the first process register reading instruction based on the first process identification information.
For example, continuing with the above example, when the behavior parameter is PTRACE _ SETREGS and the injected process ID is the first process ID, then a first process register instruction is generated.
Step S102-3, obtaining the read first process memory instruction based on the first process identification information, the first process memory address information, and the first process memory size information.
For example, continuing with the above example, when the behavior parameter is PTRACE _ PEEKTEXT, the injected process ID is the first process ID, the address parameter is the first process memory address information, and the data size parameter is the first process memory size information, then the first process memory command is generated.
Step S102-4, the first process separation instruction is obtained based on the first process identification information.
For example, continuing with the above example, when the behavior parameter is PTRACE _ DETACH and the injected process ID is the first process ID, then a first process DETACH instruction is generated.
Step S103, obtaining the crash information of the first process according to the first process injection instruction.
The crash information includes: and the first register information and the first memory information are saved when the first process crashes.
The obtaining of the crash information of the first process according to the first process injection instruction specifically includes the following steps:
and step S103-1, establishing connection with the first process according to the first process additional instruction.
Step S103-2, the first register information is obtained according to the instruction for reading the first process register.
Step S103-3, the first memory information is obtained according to the read first process memory instruction.
And S103-4, disconnecting from the first process according to the first process separation instruction.
At this time, the dump completion information is information that the dump process is disconnected, and after the information that the dump process is disconnected is obtained, the first process exits.
After the crash information of the first process is obtained according to the remote injection instruction, the method further comprises the following steps:
and step S104, generating a first file in a preset packaging format based on the first process parameter information and the crash information.
The preset packaging format comprises an ELF format.
In computer science, an ELF format file is a file used in binary, executable, object code, shared library, and core dump (CoreDump) formats.
Referring to fig. 3, the ELF format includes: ELF header information, a program header, first process identification information, first register information and first memory information.
For example, the first file is a file in CoreDump format.
The file in the CoreDump format in combination with the GDB debugging tool of the operating system can check the call stack, register state, memory value, check code, obtain thread state, and switch other threads and check the call stack when the first process crashes. And the information before and after the process runs when the first process crashes can be obtained from the crash information, so that the crash problem can be conveniently positioned. By comprehensively analyzing the crash information of the first process, the crash reason of the first process crash can be obtained.
Step S105 writes the first file to the disk.
In step S106, the dump process exits.
According to the method and the device for processing the crash information, the first process is subjected to instruction injection through the dump process, the crash information is obtained, information before and after the process runs when the first process crashes can be obtained from the crash information, and the crash problem is conveniently located. By comprehensively analyzing the crash information of the first process, the crash reason of the first process crash can be obtained. The problem that the process crash cannot be analyzed due to the fact that a core dump mechanism is not available is solved, and further, the problem of system crash is solved.
Corresponding to the first embodiment provided by the present disclosure, the present disclosure also provides a second embodiment, that is, an apparatus for acquiring process crash information. 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. 4 illustrates an embodiment of an apparatus for acquiring process crash information provided by the present disclosure. Fig. 4 is a block diagram of a unit of an apparatus for acquiring process crash information according to an embodiment of the present disclosure.
Referring to fig. 4, the present disclosure provides an apparatus for acquiring process crash information, including: crash parameter acquisition section 401, injection instruction generation section 402, and crash information acquisition section 403.
A crash parameter obtaining unit 401, configured to obtain first process parameter information sent by the first process after crash;
a generate injection instruction unit 402, configured to generate a first process injection instruction based on the first process parameter information;
a crash information obtaining unit 403, configured to obtain crash information of the first process according to the first process injection instruction.
Optionally, the obtaining crash parameter unit 401 includes:
and the crash parameter obtaining subunit is configured to obtain, through the shared memory of the first process, the first process parameter information sent by the first process after crash.
Optionally, the first process parameter information includes: first process identification information, first process memory address information and first process memory size information;
the first process injects instructions comprising: the method comprises the steps of adding a first process instruction, reading a first process register instruction, reading a first process memory instruction and a first process separation instruction;
in the generate-inject-instruction unit 402, the method includes:
an acquiring additional instruction subunit, configured to acquire the first process additional instruction based on the first process identification information;
an obtaining register instruction subunit, configured to obtain, based on the first process identification information, the read first process register instruction;
a memory instruction obtaining subunit, configured to obtain the first process memory instruction based on the first process identification information, the first process memory address information, and the first process memory size information;
and the acquiring and separating instruction subunit is used for acquiring the first process separating instruction based on the first process identification information.
Optionally, the crash information includes: first register information and first memory information which are saved when the first process crashes;
the unit 403 for acquiring crash information includes:
a connection establishing subunit, configured to establish a connection with the first process according to the first process additional instruction;
the register information obtaining subunit is configured to obtain the first register information according to the first process register instruction reading instruction;
the memory information obtaining subunit is used for obtaining the first memory information according to the read first process memory instruction;
and the disconnection subunit is used for disconnecting the first process according to the first process separation instruction.
Optionally, in the apparatus, the apparatus further includes:
and the packaging unit is used for generating a first file in a preset packaging format based on the first process parameter information and the crash information.
Optionally, the preset packaging format includes an ELF format.
Optionally, the ELF format includes: ELF header information, a program header, first process identification information, first register information and first memory information.
According to the method and the device for processing the crash information, the first process is subjected to instruction injection through the dump process, the crash information is obtained, information before and after the process runs when the first process crashes can be obtained from the crash information, and the crash problem is conveniently located. By comprehensively analyzing the crash information of the first process, the crash reason of the first process crash can be obtained. The problem that the process crash cannot be analyzed due to the fact that a core dump mechanism is not available is solved, and further, the problem of system crash is solved.
The disclosed embodiment provides a third embodiment, that is, an electronic device, where the device is used for acquiring process 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 at least one processor to enable the at least one processor to perform the method of obtaining process crash information as described in the first embodiment.
The fourth embodiment provides a computer storage medium for acquiring process crash information, where the computer storage medium stores computer-executable instructions that can execute the method for acquiring process crash information as described in the first embodiment.
Referring now to FIG. 5, 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. 5 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. 5, the electronic device may include a processing means (e.g., central processing unit, graphics processor, etc.) 501 that may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)502 or a program loaded from a storage means 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data necessary for the operation of the electronic apparatus are also stored. The processing device 501, the ROM 502, and the RAM 503 are connected to each other through a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
Generally, the following devices may be connected to the I/O interface 505: input devices 506 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 507 including, for example, a Liquid Crystal Display (LCD), speakers, vibrators, and the like; storage devices 508 including, for example, magnetic tape, hard disk, etc.; and a communication device 509. The communication means 509 may allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. While fig. 5 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 via the communication means 509, or installed from the storage means 508, or installed from the ROM 502. 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 501.
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 be interconnected 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, while several specific implementation details 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 method for obtaining process crash information is characterized by comprising the following steps:
acquiring first process parameter information sent by a first process after the crash;
generating a first process injection instruction based on the first process parameter information;
and acquiring the crash information of the first process according to the first process injection instruction.
2. The method of claim 1, wherein the obtaining the first process parameter information sent by the first process after the crash comprises:
and acquiring first process parameter information sent by the first process after the crash through the shared memory of the first process.
3. The method of claim 1, wherein the first process parameter information comprises: first process identification information, first process memory address information and first process memory size information;
the first process injects instructions comprising: the method comprises the steps of adding a first process instruction, reading a first process register instruction, reading a first process memory instruction and a first process separation instruction;
the generating a first process injection instruction based on the first process parameter information includes:
acquiring the first process additional instruction based on the first process identification information;
acquiring the instruction for reading the first process register based on the first process identification information;
acquiring the first process memory reading instruction based on the first process identification information, the first process memory address information and the first process memory size information;
and acquiring the first process separation instruction based on the first process identification information.
4. The method of claim 3, wherein the crash information comprises: first register information and first memory information which are saved when the first process crashes;
the obtaining the crash information of the first process according to the first process injection instruction includes:
establishing connection with the first process according to the first process additional instruction;
acquiring the first register information according to the instruction for reading the first process register;
reading a first process memory instruction according to the reading to obtain first memory information;
disconnecting from the first process according to the first process separation instruction.
5. The method of claim 1, after obtaining crash information for the first process according to the remote injection instruction, further comprising:
and generating a first file in a preset packaging format based on the first process parameter information and the crash information.
6. The method of claim 5, wherein the predetermined packaging format comprises an ELF format.
7. The method of claim 1, wherein the ELF format comprises: ELF header information, a program header, first process identification information, first register information and first memory information.
8. An apparatus for obtaining process crash information, comprising:
the crash parameter obtaining unit is used for obtaining first process parameter information sent by a first process after crash;
the generation injection instruction unit is used for generating a first process injection instruction based on the first process parameter information;
and the crash information obtaining unit is used for obtaining the crash information of the first process according to the first process injection instruction.
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 7.
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 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910838285.9A CN110727566B (en) | 2019-09-05 | 2019-09-05 | Method, device, medium and electronic equipment for acquiring process crash information |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910838285.9A CN110727566B (en) | 2019-09-05 | 2019-09-05 | Method, device, medium and electronic equipment for acquiring process crash information |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110727566A true CN110727566A (en) | 2020-01-24 |
CN110727566B CN110727566B (en) | 2023-08-11 |
Family
ID=69217790
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910838285.9A Active CN110727566B (en) | 2019-09-05 | 2019-09-05 | Method, device, medium and electronic equipment for acquiring process crash information |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110727566B (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111563000A (en) * | 2020-04-28 | 2020-08-21 | 深圳震有科技股份有限公司 | File generation method, intelligent terminal and storage medium |
CN112084086A (en) * | 2020-08-14 | 2020-12-15 | 北京字节跳动网络技术有限公司 | Information collection method, device, medium and electronic equipment |
CN113407368A (en) * | 2020-03-16 | 2021-09-17 | 广东龙芯中科电子科技有限公司 | Process management method and device and electronic equipment |
CN113553211A (en) * | 2021-09-23 | 2021-10-26 | 统信软件技术有限公司 | Core dump file generation method, computing device and storage medium |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1215578A2 (en) * | 2000-12-15 | 2002-06-19 | Microsoft Corporation | Creation of mini dump files from full dump files |
US20020078404A1 (en) * | 2000-12-20 | 2002-06-20 | Vachon Andre F. | System and method for remotely creating a physical memory snapshot over a serial bus |
US20120304015A1 (en) * | 2011-05-26 | 2012-11-29 | International Business Machines Corporation | Generating appropriately sized core files used in diagnosing application crashes |
US20130247186A1 (en) * | 2012-03-15 | 2013-09-19 | Aaron LeMasters | System to Bypass a Compromised Mass Storage Device Driver Stack and Method Thereof |
US20140040671A1 (en) * | 2012-07-31 | 2014-02-06 | International Business Machines Corporation | Securing crash dump files |
US20170371734A1 (en) * | 2016-06-23 | 2017-12-28 | Vmware, Inc. | Monitoring of an automated end-to-end crash analysis system |
CN108170552A (en) * | 2018-01-05 | 2018-06-15 | 武汉斗鱼网络科技有限公司 | A kind of method, apparatus and equipment for capturing Dump files |
CN108763060A (en) * | 2018-04-27 | 2018-11-06 | 广州华多网络科技有限公司 | Native layers of collapse source tracing method, device, storage medium and terminal in android system |
CN109032909A (en) * | 2018-07-18 | 2018-12-18 | 携程旅游信息技术(上海)有限公司 | Processing method, system, equipment and the storage medium of application crash log |
CN109614290A (en) * | 2018-12-10 | 2019-04-12 | 苏州思必驰信息科技有限公司 | Process exception information recording method and system in container |
-
2019
- 2019-09-05 CN CN201910838285.9A patent/CN110727566B/en active Active
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1215578A2 (en) * | 2000-12-15 | 2002-06-19 | Microsoft Corporation | Creation of mini dump files from full dump files |
US20020078404A1 (en) * | 2000-12-20 | 2002-06-20 | Vachon Andre F. | System and method for remotely creating a physical memory snapshot over a serial bus |
US20120304015A1 (en) * | 2011-05-26 | 2012-11-29 | International Business Machines Corporation | Generating appropriately sized core files used in diagnosing application crashes |
US20130247186A1 (en) * | 2012-03-15 | 2013-09-19 | Aaron LeMasters | System to Bypass a Compromised Mass Storage Device Driver Stack and Method Thereof |
US20140040671A1 (en) * | 2012-07-31 | 2014-02-06 | International Business Machines Corporation | Securing crash dump files |
US20170371734A1 (en) * | 2016-06-23 | 2017-12-28 | Vmware, Inc. | Monitoring of an automated end-to-end crash analysis system |
CN108170552A (en) * | 2018-01-05 | 2018-06-15 | 武汉斗鱼网络科技有限公司 | A kind of method, apparatus and equipment for capturing Dump files |
CN108763060A (en) * | 2018-04-27 | 2018-11-06 | 广州华多网络科技有限公司 | Native layers of collapse source tracing method, device, storage medium and terminal in android system |
CN109032909A (en) * | 2018-07-18 | 2018-12-18 | 携程旅游信息技术(上海)有限公司 | Processing method, system, equipment and the storage medium of application crash log |
CN109614290A (en) * | 2018-12-10 | 2019-04-12 | 苏州思必驰信息科技有限公司 | Process exception information recording method and system in container |
Non-Patent Citations (2)
Title |
---|
张起贵: "最新DSP技术 "达芬奇"系统、框架和组件", 国防工业出版社, pages: 158 - 160 * |
湛辉来, 曾一: "X86体系中保护模式下的内存访问机制", 重庆大学学报(自然科学版), no. 06, pages 158 - 160 * |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113407368A (en) * | 2020-03-16 | 2021-09-17 | 广东龙芯中科电子科技有限公司 | Process management method and device and electronic equipment |
CN113407368B (en) * | 2020-03-16 | 2023-03-21 | 广东龙芯中科电子科技有限公司 | Process management method and device and electronic equipment |
CN111563000A (en) * | 2020-04-28 | 2020-08-21 | 深圳震有科技股份有限公司 | File generation method, intelligent terminal and storage medium |
CN111563000B (en) * | 2020-04-28 | 2023-08-18 | 深圳市震有软件科技有限公司 | File generation method, intelligent terminal and storage medium |
CN112084086A (en) * | 2020-08-14 | 2020-12-15 | 北京字节跳动网络技术有限公司 | Information collection method, device, medium and electronic equipment |
CN112084086B (en) * | 2020-08-14 | 2024-03-22 | 北京字节跳动网络技术有限公司 | Information collection method, device, medium and electronic equipment |
CN113553211A (en) * | 2021-09-23 | 2021-10-26 | 统信软件技术有限公司 | Core dump file generation method, computing device and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN110727566B (en) | 2023-08-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110727566B (en) | Method, device, medium and electronic equipment for acquiring process crash information | |
CN111274503B (en) | Data processing method, device, electronic equipment and computer readable medium | |
CN111309304B (en) | Method, device, medium and electronic equipment for generating IDL file | |
CN113835992B (en) | Memory leakage processing method and device, electronic equipment and computer storage medium | |
CN111240801A (en) | Method, device, medium and electronic equipment for generating heap memory snapshot file | |
CN111625422B (en) | Thread monitoring method, thread monitoring device, electronic equipment and computer readable storage medium | |
CN111459822B (en) | Method, device, equipment and readable medium for extracting system component data | |
CN111367720A (en) | Data protection method and device, electronic equipment and computer readable storage medium | |
CN114064431A (en) | Stuck detection method and device, readable medium and electronic equipment | |
CN113391860B (en) | Service request processing method and device, electronic equipment and computer storage medium | |
CN110764995B (en) | Method, device, medium and electronic equipment for detecting file access abnormality | |
CN111984496B (en) | Method, device, medium and electronic equipment for monitoring stack memory leakage | |
CN111538717B (en) | Data processing method, device, electronic equipment and computer readable medium | |
CN111324386B (en) | Method and device for starting split application program, electronic equipment and storage medium | |
CN113138883A (en) | Message processing method and device, storage medium and electronic equipment | |
CN111309323A (en) | Parameter initialization method and device and electronic equipment | |
CN111694747B (en) | Thread detection method, device, equipment and computer readable medium | |
CN111367590A (en) | Interrupt event processing method and device | |
CN111626787B (en) | Resource issuing method, device, medium and equipment | |
CN111258852B (en) | Abnormal data monitoring method, device, electronic equipment and storage medium | |
CN111782410B (en) | Lock jam monitoring method and device, electronic equipment and computer readable medium | |
CN111367555B (en) | Assertion method, assertion device, electronic equipment and computer readable medium | |
CN111324888B (en) | Verification method and device for application program starting, electronic equipment and storage medium | |
CN116701013A (en) | Message consumption method, device, electronic equipment and computer readable medium | |
CN117093284A (en) | Plug-in calling method, device, medium and electronic equipment |
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 |