WO2014082495A1 - 一种崩溃的定位方法和装置 - Google Patents

一种崩溃的定位方法和装置 Download PDF

Info

Publication number
WO2014082495A1
WO2014082495A1 PCT/CN2013/084394 CN2013084394W WO2014082495A1 WO 2014082495 A1 WO2014082495 A1 WO 2014082495A1 CN 2013084394 W CN2013084394 W CN 2013084394W WO 2014082495 A1 WO2014082495 A1 WO 2014082495A1
Authority
WO
WIPO (PCT)
Prior art keywords
target
parameters
monitoring point
monitoring
tested
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.)
Ceased
Application number
PCT/CN2013/084394
Other languages
English (en)
French (fr)
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 Qihoo Technology Co Ltd
Qizhi Software Beijing Co Ltd
Original Assignee
Beijing Qihoo Technology Co Ltd
Qizhi Software Beijing 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 Qihoo Technology Co Ltd, Qizhi Software Beijing Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to US14/648,605 priority Critical patent/US9594617B2/en
Publication of WO2014082495A1 publication Critical patent/WO2014082495A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0766Error or fault reporting or storing
    • G06F11/0778Dumping, i.e. gathering error/state information after a fault for later diagnosis
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/0706Error 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 the processing taking place on a specific hardware platform or in a specific software environment
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/302Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a software system
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3089Monitoring arrangements determined by the means or processing involved in sensing the monitored data, e.g. interfaces, connectors, sensors, probes, agents
    • G06F11/3093Configuration details thereof, e.g. installation, enabling, spatial arrangement of the probes
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2201/00Indexing scheme relating to error detection, to error correction, and to monitoring
    • G06F2201/865Monitoring of software

Definitions

  • This application relates to computer software technology, and more particularly to a method and apparatus for locating a crash. Background technique
  • Software is a collection of computer data and instructions organized in a specific order. Often software can be divided into system software, application software, and middleware between the two. The software does not only include computer programs running on a computer, but also files associated with these computer programs, that is, software can be considered as a collection of programs plus files.
  • Software is the interface between the user and the hardware, that is, the user communicates with the computer through software. Users can use the computer through software, use the software to access the Internet, or use the software to work. However, the software may crash for a variety of reasons. Once the software crashes, the software may have to wait a long time to continue using it, or even continue to use it. Therefore, you need to find out the cause of the software crash to determine if the crash is caused by a problem in the software, so as to avoid the crash caused by the software to affect the user's use.
  • a method for locating a software crash is to obtain a DUMP file of the crashed software, that is, an image file of the software process, and then use an analysis tool, such as windbg, to open the image file, and the analysis tool can view related data of the process. For example, the loading of the library, etc., to locate the cause of the crash, but if the data related to the above process cannot locate the cause of the crash, more complicated analysis, such as viewing the stack, is required.
  • the above method when performing positioning, needs to view related data of the software process, and even needs to analyze the relevant data of the stack in the software, so it takes a relatively long time to locate the cause of the collapse, and the efficiency Relatively low.
  • the present application has been made in order to provide a positioning device and a corresponding collapse positioning method that overcome the above problems or at least partially solve the above problems.
  • a method for locating a crash including: pre-setting a monitoring point in a terminal and a target to be tested;
  • the parameter of the monitoring point includes the parameter of the monitoring point in the target to be tested and the monitoring point in the terminal Parameter
  • the parameters of the monitoring point and the parameter values thereof are analyzed to locate the cause of the collapse of the target to be tested.
  • analyzing the parameters of the monitoring point and the parameter values thereof, and locating the cause of the collapse of the target to be tested including: classifying parameters of the monitoring point, and classifying and analyzing parameter values of each parameter, and positioning The reason why the target to be tested collapsed.
  • the image file further includes: a crash address; classifying the parameters of the monitoring point, and classifying and analyzing parameter values of each parameter, and locating the cause of the object to be tested, including: The address classifies the parameters of the monitoring points in the target to be determined, and determines a crash address corresponding to the parameter of the monitoring point in each target to be tested; and analyzes the monitoring point of the target to be tested under the crash address for each crash address.
  • the parameter value corresponding to the parameter combined with the parameter value corresponding to the parameter of the monitoring point in the terminal, locates the cause of the collapse of the target to be tested.
  • the operation of the target to be tested in the monitoring terminal includes: monitoring, by using a parameter of the monitoring point, a monitoring point in the target to be measured, and generating a parameter value corresponding to the parameter of the monitoring point in the target to be tested. And through the monitoring interface using the parameters of the monitoring point to the terminal The monitoring point is monitored to generate a parameter value corresponding to the parameter of the monitoring point in the terminal.
  • acquiring the parameter of the monitoring point and the parameter value thereof to generate an image file includes: obtaining, by the monitoring interface, the monitoring point of the target to be tested when the target to be tested collapses The parameter and its current parameter value, and the parameter of the monitoring point in the terminal and its current parameter value; the parameter of the monitoring point in the obtained target to be measured and its parameter value, and the parameter of the monitoring point in the terminal and its parameter value, Generate an image file.
  • the setting a monitoring point in the terminal and the object to be tested in advance includes: analyzing a cause of the target object to be detected in advance, determining a key position of the target to be detected, and setting a monitoring point at the key position; .
  • the target to be tested is a browser
  • the monitoring point is set in the terminal and the object to be tested in advance, including: analyzing the cause of the browser crash in advance, and determining a key position of the browser crash;
  • the monitoring point is set at the key location, and the key location includes at least one of the following: a browser process, a thread, a function, and memory data of a terminal where the browser is located.
  • the object to be tested is a browser
  • the image file further includes: a crash address; the parameter of the monitoring point and the parameter value thereof are analyzed, and the cause of the target object collapse is located.
  • the method includes: classifying the monitoring points in the browser according to the crash address; for each crash address, analyzing the parameters of the monitoring point of the browser and the parameter values thereof, and combining the parameters of the monitoring points in the terminal and their parameter values, and positioning The cause of the target crash.
  • the parameter of the monitoring point in the target to be tested includes a state parameter of the monitoring point, and is suitable for identifying a state of the monitoring point when the target to be tested collapses, and the parameter of the monitoring point in the terminal includes the total memory of the terminal. Volume and memory usage.
  • a crash location device including: a monitoring point setting module configured to pre-set a monitoring point in a target to be tested of the terminal; and a monitoring and generating module configured to monitor the to-be-tested The operation of the target, and when the target to be tested is collapsed, the parameters of the monitoring point and the parameter values thereof are generated to generate an image file, and the parameters of the monitoring point include parameters of the monitoring point in the target to be tested and parameters of the monitoring point in the terminal;
  • Obtaining and viewing a module configured to obtain the image file, and view parameters of the monitoring point in the image file and parameter values thereof;
  • the analysis positioning module is configured to analyze the parameters of the monitoring point and the parameter values thereof, and locate the cause of the collapse of the target to be tested.
  • the analyzing and positioning module is configured to classify the parameters of the monitoring point, and analyze and analyze the parameter values of each parameter to locate the cause of the object to be tested.
  • the image file further includes: a crash address;
  • the analysis and location module includes: a classification module, configured to classify parameters of the monitoring point in the object to be tested according to the crash address, and determine The crash address corresponding to the parameter of the monitoring point in each target to be tested;
  • the analysis module is configured to analyze the parameter value corresponding to the parameter of the monitoring point in the target to be tested under the crash address for each crash address, and combine the monitoring in the terminal
  • the parameter value corresponding to the parameter of the point locates the cause of the collapse of the target to be tested.
  • the monitoring and generating module includes: a first monitoring module configured to monitor, by using a parameter of a monitoring point, a monitoring point in a target to be measured, and generate a parameter corresponding to a monitoring point in the target to be tested.
  • the parameter value of the second monitoring module is configured to monitor the monitoring point in the terminal by using the parameter of the monitoring point through the monitoring interface, and generate a parameter value corresponding to the parameter of the monitoring point in the terminal.
  • the monitoring and generating module includes: an acquiring module, configured to acquire, by using the monitoring interface, a parameter of a monitoring point in the target to be tested and a current parameter value thereof, and a terminal when the target to be tested collides The parameter of the monitoring point and its current parameter value; the generating module is configured to generate the image file by using the obtained parameter of the monitoring point in the target to be tested and its parameter value, and the parameter of the monitoring point in the terminal and its parameter value.
  • the monitoring point setting module is specifically configured to analyze a cause of a target object crash in advance, and determine a key position of the target object to be detected; and set a monitoring point at the key position.
  • the target to be tested is a browser
  • the monitoring point setting module is configured to analyze the cause of the browser crash in advance, and determine a key location of the browser crash; Setting a monitoring point, the key location includes at least one of the following: a browser process, a thread, a function, and memory data of a terminal where the browser is located.
  • the object to be tested is a browser
  • the image file further includes:
  • the analysis location module the classification module is specifically configured to classify the monitoring points in the browser according to the crash address; the analysis module is specifically configured to: for each crash address, the parameters of the monitoring point of the browser and The parameter value is combined with the parameters of the monitoring point in the terminal and its parameter values to analyze the cause of the collapse of the target to be tested.
  • the parameter of the monitoring point in the target to be tested includes a state parameter of the monitoring point, and is suitable for identifying a state of the monitoring point when the target to be tested collapses, and the parameter of the monitoring point in the terminal includes the total memory of the terminal. Volume and memory usage.
  • the operation of the target to be tested can be monitored, and when the target to be tested collapses, the parameters of the monitoring point in the target to be tested and the parameter values thereof are generated to generate an image file. . Since a large number of monitoring points can be set in the terminal and the software to be tested, a large number of parameters and their parameter values can be obtained from the image file, so that when the cause of the crash is located, more data can be analyzed and analyzed. The data analyzed is sufficient to quickly locate the cause of the crash. Moreover, the parameters of the monitoring points in the terminal and their parameter values can be obtained, so that the collapse caused by the non-measurement target itself can also be located, thereby ensuring the cause of the positioning collapse.
  • FIG. 1 is a flowchart of a method for locating a crash according to an embodiment of the present application
  • FIG. 2 is a flowchart of a method for classifying analysis according to another embodiment of the present application
  • a browser crash location method provided by an embodiment 4 is a flowchart of a method for monitoring and generating an image file according to another embodiment of an embodiment of the present application;
  • FIG. 5 is a structural diagram of a positioning apparatus for a crash according to an embodiment of the present application
  • FIG. 6 is a structural diagram of a positioning apparatus for a crash according to another embodiment of the present application. detailed description
  • Software is the interface between the user and the hardware, that is, the user communicates with the computer through software. Once the software crashes, the software may have to wait a long time to continue using it, or even continue to use it. Therefore, you need to find out the cause of the software crash to determine if the crash is caused by a problem in the software, so as to avoid the user's use of the crash caused by the software problem.
  • the embodiment of the present application provides a method for locating a crash, which can obtain a large number of parameters and parameter values from the image file, so that when the cause of the crash is located, more data can be compared and analyzed, and data can be analyzed. Full, so you can quickly locate the cause of the crash. Moreover, the parameters of the monitoring points in the terminal and their parameter values can be obtained, so that the collision caused by the non-measurement target itself can also be located, thereby ensuring the cause of the positioning collapse.
  • FIG. 1 is a flowchart of a method for locating a crash according to an embodiment of the present application.
  • Step 101 Set a monitoring point in the target to be tested in advance.
  • the software may crash in the terminal for various reasons.
  • the software can be used as the target to be tested, and then the monitoring point is set in the terminal and the target to be tested, so as to pass the software as described above.
  • the monitoring point monitors the target in real time.
  • one or more parameters may be set for each monitoring point, and the parameter pairs of the monitoring points generate corresponding parameter values as the target to be tested progresses. Therefore, a large number of monitoring points can be set in the terminal and the software to be tested, and the central location in the monitoring terminal and the software to be tested, such as the process, thread, function, etc. of the target to be tested, such as the memory of the terminal, system files, and the like.
  • the setting a monitoring point in the terminal and the object to be tested in advance includes: analyzing a cause of the target object to be detected in advance, determining a key position of the target to be detected, and setting a monitoring point at the key position; .
  • the collapse of the target to be tested is usually caused by a series of reasons, which may be caused by problems at certain critical locations in the target or terminal, so it is possible to pre-summarize the various causes of the collapse of the target to be tested, and then The reason is analyzed, and the key position of the target to be detected collapse can be determined through analysis. Then, the monitoring point is set at the key position, so that the target to be tested is monitored by the monitoring point at the critical position when the target is running, and the running condition of the target to be tested is detected.
  • the key position refers to a location where a crash occurs in the target to be tested, and a related location thereof, for example, a crash occurs during execution of a process, a thread, a function call, and the like of the target to be tested, then the process and the thread , function calls can be called key locations.
  • the key position is not limited to the target to be tested. If the crash of the target to be tested is caused by insufficient memory of the terminal, the key location is the memory data of the terminal.
  • Step 102 Monitor the operation of the target to be tested, and obtain an image file of the parameter of the monitoring point and the parameter value of the target to be tested when the target to be tested collapses.
  • the software that is, the target to be tested is running in the terminal
  • monitoring the operation of the target to be tested and when detecting that the target to be tested is collapsed, acquiring parameters of the monitoring point and parameter values of the parameter, and setting parameters of the monitoring point And its parameter values generate an image file.
  • the image file may include a large number of parameters and parameter values of the monitoring points.
  • the parameters of the monitoring point include: a parameter set in a monitoring point in the target to be tested, and a parameter set in the monitoring point in the terminal.
  • the parameter of the monitoring point in the target to be tested includes a state parameter of the monitoring point, and the state parameter is adapted to identify a state of the monitoring point when the target to be tested collapses.
  • the state parameter may be set in a monitoring point of a process, a thread, and a function in the target to be tested. Therefore, the state of the process parameter may be used to know the state of each process, thread, function, and the like when the target to be tested collapses.
  • the monitoring point is set in the main process of the target to be tested, and the status parameter may identify the status of the main process, and the status may include start, run, and end, and the parameter values of the corresponding status may be 0, 1, and 2, respectively. According to the parameter value, it can be up to which stage the main process executes.
  • the target to be tested includes other parameters, such as the number of handles, the number of processes, and the name of the process. These are used to locate and analyze the cause of the crash, such as analyzing whether the number of handles reaches the upper limit of the system, the exception of the process, etc., where the handle Is an identifier that identifies an object or item.
  • the parameter of the monitoring point in the terminal may include the total memory of the terminal and the memory usage.
  • the total amount of memory and the memory usage in the terminal may be used, thereby understanding the memory usage during the crash, and The reason for the location crash.
  • the crash of the target to be tested may be caused by a problem of non-measurement target avatars, such as a crash due to insufficient memory in the terminal, etc., and the parameters of the monitoring point set in the terminal can quickly locate the collapsed The reason, especially for the collapse caused by the problem of non-test target separation.
  • Step 103 Obtain the image file, and view parameters of the monitoring point in the image file and parameter values thereof.
  • the image file can then be obtained, and the image file needs to use a specific tool, such as
  • WinDbg is opened, that is, the image file can be viewed by WinDbg, and then the parameters of the monitoring point and the parameter values thereof in the image file can be obtained therefrom, including: parameters of the monitoring point in the terminal and their parameter values, and monitoring in the target to be tested The parameters of the point and its parameter values.
  • Step 104 Analyze the parameters of the monitoring point and the parameter values thereof, and locate the cause of the collapse of the target to be tested.
  • the parameters of the monitoring point and the parameter values thereof may be analyzed, because the parameters of the monitoring point in the terminal and the parameter values thereof, and the parameters of the monitoring point in the target to be tested and The parameter values, so the parameters and their parameter values can be analyzed together, and the parameters and their parameter values can also be classified and analyzed.
  • the data that can be analyzed is very rich. It is possible to obtain corresponding parameters and parameter values from a large number of terminals and a large number of monitoring points in the software to be tested, and to check whether the parameter values of each parameter are abnormal or can pass parameters. The value is used to check the status of the monitoring point corresponding to the parameter, and then locate the cause of the target to be detected.
  • Some of the crashes are caused by the non-measurement target itself. For example, due to insufficient memory, the target to be tested collapses. Since the parameters of the monitoring points in the terminal and their parameter values can be obtained, they can be used in terminals other than the target to be tested. The data is analyzed so that the crash caused by the non-measurement target itself can be located, which ensures that the cause of the crash is located.
  • the parameter belongs to the monitoring point in the main process of the target to be tested, and the parameter is a state parameter. If the parameter value of the state parameter in the image file is 0 after the target is crashed, the main When the process is executed to the startup state, the positioning occurs before the startup to run, then the processes, threads, functions, etc. between the startup and the execution of the target to be tested can be analyzed, and the cause of the crash can be quickly located.
  • the embodiment of the present application pre-sets a monitoring point in the terminal and the object to be tested, monitors the operation of the object to be tested, and acquires parameters and parameters of the monitoring point in the target to be tested when the target to be tested collapses.
  • the value produces an image file. Since a large number of monitoring points can be set in the terminal and the software to be tested, a large number of parameters and their parameter values can be obtained from the image file, so that when the cause of the crash is located, more data can be analyzed and analyzed. The data analyzed is sufficient to quickly locate the cause of the crash. Moreover, the parameters of the monitoring points in the terminal and their parameter values can be obtained, so that the crash caused by the non-measurement target itself can also be located, thereby ensuring the cause of the positioning collapse.
  • the parameter of the monitoring point in the target to be tested includes a state parameter of the monitoring point, and the state parameter is adapted to identify a state of the monitoring point when the target to be tested collapses, and then the state parameter may be used.
  • the parameters of the monitoring point in the terminal include the total amount of memory and the memory usage, so that the memory occupancy condition when the target to be tested collapses can be known, so that whether the crash is caused by the non-measurement target itself, such as insufficient memory, etc., can be analyzed. The problem can be used to further quickly locate the cause of the crash.
  • analyzing the parameters of the monitoring point and the parameter values thereof, and locating the cause of the collapse of the target to be tested including: classifying parameters of the monitoring point, and classifying and analyzing parameter values of each parameter, and positioning is to be tested.
  • the reason for the target crash is to be tested.
  • the monitoring point can be set to the terminal, it can also be set in the target to be tested, and there are many types of parameters of the monitoring point. Therefore, the parameters of the monitoring point can be classified, and then the parameter values of each parameter are separately analyzed according to the classification result, and the cause of the collapse of the target to be tested is located.
  • the image file further includes: a crash address; the crash address is a stack address of a process of the target to be tested, that is, a storage location of the data in the process is obtained.
  • FIG. 2 shows a flow chart of a classification analysis method according to another embodiment of the present application.
  • the parameters of the monitoring point are classified, and the parameter values of each parameter are classified and analyzed, and the cause of the collapse of the target to be measured is located, including:
  • Step 201 Classify the parameters of the monitoring points in the target to be tested according to the crash address, and determine a crash address corresponding to the parameter of the monitoring point in each target to be tested.
  • the parameters of the monitoring point in the target to be tested may be classified according to the crash address, and the crash address corresponding to the parameter of the monitoring point in each target to be tested is determined, that is, the determining location The process to which the parameters of each monitoring point in the target are to be processed.
  • Step 202 Analyze, according to each crash address, a parameter value corresponding to the parameter of the monitoring point in the target to be tested under the crash address, and combine the parameter value corresponding to the parameter of the monitoring point in the terminal to locate the cause of the target target collapse.
  • the parameter value corresponding to the parameter of the monitoring point in the target to be tested under the crash address is analyzed, and it can be determined by the parameter value which parameter has an abnormality, and the process, the thread, and the function are analyzed when the software crashes. What kind of state, etc.
  • the parameter values corresponding to the parameters of the monitoring points in the terminal such as the total amount of memory and the amount of memory used, to further determine the cause of the collapse of the guessing target.
  • the embodiment of the present application can classify the parameters of the monitoring points in the target according to the crash address, and then analyze the parameters of the monitoring points in the target under each crash address, and combine the parameters of the monitoring points in the terminal to jointly Analysis, so that whether it is a crash caused by the target to be tested, or a crash caused by the terminal, it can be quickly located.
  • the object to be tested may be various types of software in the terminal, such as office software, game software, browser, system software, etc., and the content of the embodiment of the present application is discussed by using a browser as a target to be tested. .
  • FIG. 3 illustrates a browser crash location method provided by another embodiment of the present application.
  • Step 301 Analyze the cause of the browser crash in advance to determine the key location of the browser crash.
  • Browser crashes are often not sudden, and are caused by a number of reasons, such as insufficient memory, failure of function calls in the browser, and so on. These reasons may be caused by problems in the target or terminal at certain critical locations. For example, insufficient memory is related to the memory data in the terminal, and the failure of the function call is a function call in the browser.
  • the key location includes at least one of the following: a browser process, a thread, a function, and memory data of a terminal where the browser is located.
  • Step 302 Set a monitoring point at the key location.
  • the monitoring point is set at the key position, for example, setting a monitoring point in each process, each thread, various functions of the browser, and a related position of the function call, or setting a monitoring point in the terminal where the browser is located.
  • Set monitoring points such as memory data, CPU operation data, etc. This provides a comprehensive view of the health of the browser and the terminal while the browser is running.
  • Step 303 Monitor the running of the browser, and when the browser crashes, acquire a parameter of the monitoring point and a parameter value thereof to generate an image file. Then, when the browser is running, the running of the browser can be monitored through the monitoring point. When the browser is detected to be crashed, the parameters of each monitoring point in the browser and the parameter values thereof can be obtained, thereby setting the parameters of the monitoring point. And its parameter values generate an image file.
  • Step 304 Obtain the image file, and view parameters of the monitoring point and parameter values in the image file.
  • the image file can then be retrieved and opened using a specific tool, such as WinDbg, to view the parameters of the monitoring points and their parameter values in the image file.
  • a specific tool such as WinDbg
  • Step 305 Sort the monitoring points in the browser according to the crash address.
  • the monitoring points in the browser belong to each crash address, and the crash address is the stack address of the browser process, that is, the storage location of the data in the process. Therefore, the monitoring points in the browser can be classified according to the crash address, and the crash address corresponding to the parameters of the monitoring points in each target to be tested is determined.
  • Step 306 For each crash address, analyze the parameters of the monitoring point of the browser and the parameter values thereof, and combine the parameters of the monitoring point in the terminal and the parameter values thereof to locate the cause of the collapse of the target to be tested.
  • the parameter value corresponding to the parameter of the monitoring point in the browser under the crash address is analyzed, and the parameter value can be used to determine which parameter has an abnormality, and the process, the thread, and the function in the browser crash can be analyzed. What kind of state, etc.
  • the analysis also combines the parameter values corresponding to the parameters of the monitoring points in the terminal, such as the total amount of memory and memory usage, to further determine the cause of the guessing target collapse.
  • the monitoring point of the browser by adding a status parameter to the monitoring point of the browser, it is possible to determine the state of the browser when the crash occurs, and the severity of the problem can be quickly determined. If there is a crash at startup, it will cause the user to be unable to use, the problem is more serious, need to analyze and locate the cause of the crash as soon as possible, and minimize the inconvenience of the user; if there is a crash at the end, the user has already used it, instead The seriousness of the problem is relatively low. Of course, it is necessary to analyze and locate the cause of the collapse as soon as possible, and minimize the inconvenience of users.
  • the embodiment of the present application can monitor the target to be tested by using dbghelp.dll, which is a debug tracking related module, which is suitable for tracking the work of the process, and collecting the stack information when the abnormality of the program is generated when the target to be tested is collapsed, For developers to analyze to find out why the process is abnormal.
  • dbghelp.dll which is a debug tracking related module, which is suitable for tracking the work of the process, and collecting the stack information when the abnormality of the program is generated when the target to be tested is collapsed, For developers to analyze to find out why the process is abnormal.
  • MiniDumpWriteDump is an API (Application Programming Interface) in DbgHelp.dll that is suitable for exporting DUMP files of currently running software, ie image files.
  • This parameter is an interface parameter, which is the monitoring interface, allowing the user to add its own parameters.
  • the parameter value corresponding to the self-set parameter can be obtained by the parameter MINIDUMP_USER_STREAM, and then the parameter and the parameter value are added to the image file for further analysis.
  • FIG. 4 is a flow chart showing a method of monitoring and generating an image file according to another embodiment of the present application.
  • an image file which specifically includes:
  • Step 401 Monitor the monitoring point in the target to be measured by using the parameter of the monitoring point through the monitoring interface, and generate a parameter value corresponding to the parameter of the monitoring point in the target to be tested.
  • the embodiment of the present application sets a monitoring point in the target to be tested, so when the target to be tested is running,
  • the monitoring point can be monitored by the monitoring interface using the parameters of the monitoring point, that is, with the operation of the target to be tested, the parameter of the monitoring point in the target to be tested can generate a corresponding parameter value, and the parameter value can identify the monitoring.
  • Point information such as the status, location, etc.
  • Step 402 Monitor the monitoring point in the terminal by using the parameter of the monitoring point through the monitoring interface, and generate a parameter value corresponding to the parameter of the monitoring point in the terminal.
  • the monitoring point is also set in the terminal. Therefore, when the target to be tested is running, the monitoring point can be monitored by using the parameter of the monitoring point through the monitoring interface, that is, the operation of the target to be tested, in the terminal
  • the parameter of the monitoring point may generate a corresponding parameter value, and the parameter value may identify information of the monitoring point, such as the state of the monitoring point in the terminal, the usage of the monitoring point in the terminal, and the like.
  • Step 403 Obtain, by the monitoring interface, the parameter of the monitoring point in the target to be tested and its current parameter value, and the parameter of the monitoring point in the terminal and the current parameter value thereof.
  • dbghelp.dll can detect the event that the target is crashing.
  • dbghelp.dll collects the data when the target is abnormal according to the parameters set in it, such as stack information. Wait.
  • dbghelp.dll can also collect the parameters of the monitoring points set in the terminal and the parameter values when the current target is crashed, and collect the monitoring points set in the target to be tested by the parameter MINIDUMP_USER_STREAM. The parameter and its current parameter value.
  • Step 404 Generate an image file by using the obtained parameter of the monitoring point in the target to be tested and its parameter value, and the parameter of the monitoring point in the terminal and its parameter value.
  • DbgHelp.dll can obtain the parameters of the monitoring point in the target to be tested and its current parameter value, the parameters of the monitoring point in the terminal and its current parameter value, and the data when the target to be detected generates an abnormality, which can be passed through MiniDumpWriteDump.
  • MiniDumpWriteDump The above data is exported and an image file is generated.
  • the method in the embodiment of the present application may be completed by the terminal and the server, and the steps in the foregoing FIG. 3 may be completed in the terminal.
  • the image file After the image file is generated in the terminal, the image may be uploaded to the server, and after receiving the file, the server receives the file. The steps for subsequent review and analysis can be performed.
  • the server can be used for remote monitoring, and the data is generated and the image file is returned and analyzed.
  • This embodiment of the present application does not limit this.
  • FIG. 5 is a structural diagram of a positioning device for crashing according to an embodiment of the present application.
  • the embodiment of the present application further provides a crash location device, including: a monitoring point setting module 10, a monitoring and generating module 11, an acquiring and viewing module 12, and an analyzing positioning module 13, the towel:
  • the monitoring point setting module 10 is configured to set a monitoring point in the target to be tested in advance;
  • the monitoring and generating module 11 is configured to monitor the running of the object to be tested, and acquire the parameter of the monitoring point when the target to be tested collapses And the parameter value of the parameter is generated, and the parameter of the monitoring point includes the parameter of the monitoring point in the target to be tested and the parameter of the monitoring point in the terminal;
  • acquiring and viewing the module 12, configured to acquire the image file, and view the image The parameter of the monitoring point in the file and the parameter value thereof;
  • the analysis positioning module 13 is configured to analyze the parameter of the monitoring point and the parameter value thereof, and locate the cause of the collapse of the target to be tested.
  • FIG. 6 is a block diagram showing the structure of a crashing positioning device according to another embodiment of the present application.
  • the analysis and location module 13 is configured to classify the parameters of the monitoring point, and analyze and analyze the parameter values of each parameter to locate the cause of the object to be tested.
  • the image file further includes: a crash address;
  • the analysis and location module 13 includes: a classification module 131, configured to classify parameters of the monitoring point in the object to be tested according to the crash address, and determine The crash address corresponding to the parameter of the monitoring point in each target to be tested;
  • the analyzing module 132 is configured to analyze, for each crash address, a parameter value corresponding to the parameter of the monitoring point in the target to be tested under the crash address, and combined with the terminal The parameter value corresponding to the parameter of the monitoring point, and the reason for the collapse of the target to be tested.
  • the monitoring and generating module 11 includes: a first monitoring module 111 configured to monitor, by using a parameter of the monitoring point, a monitoring point in the target to be measured, and generate a parameter corresponding to the monitoring point in the target to be tested. Parameter value; second monitoring module 112, configured and monitored The interface monitors the monitoring points in the terminal by using the parameters of the monitoring point, and generates parameter values corresponding to the parameters of the monitoring points in the terminal.
  • the obtaining module 113 is configured to: when the target to be tested collides, obtain the parameter of the monitoring point in the target to be tested and the current parameter value thereof, and the parameter of the monitoring point in the terminal and the current parameter value thereof; 114. Configure to use the obtained parameters of the monitoring point in the target to be tested and the parameter values thereof, and the parameters of the monitoring point in the terminal and the parameter values thereof to generate an image file.
  • the monitoring point setting module 10 is configured to analyze a cause of the target object crash in advance, and determine a critical position where the target to be tested collapses; and set a monitoring point at the key position.
  • the target to be tested is a browser
  • the monitoring point setting module 10 is configured to analyze the cause of the browser crash in advance, determine a key location of the browser crash, and set the key location.
  • the monitoring point, the key location includes at least one of the following: a browser process, a thread, a function, and memory data of a terminal where the browser is located.
  • the object to be tested is a browser
  • the image file further includes: a crash address
  • the analysis and location module 13 is: the classification module 131 is configured to perform a monitoring point in the browser according to the crash address.
  • the analysis module 132 is specifically configured to analyze the parameters of the monitoring point of the browser and the parameter values thereof in combination with the parameters of the monitoring points in the terminal and their parameter values for each crash address, and locate the cause of the collapse of the target to be tested.
  • the parameter of the monitoring point in the target to be tested includes a state parameter of the monitoring point, and is adapted to identify a state of the monitoring point when the target to be tested collapses, and the parameter of the monitoring point in the terminal includes a total amount of memory of the terminal. Memory usage.
  • the embodiment of the present application further provides a computer readable recording medium having recorded thereon a program for executing the positioning method applied to the crash described in the above embodiment.
  • the computer readable recording medium includes any mechanism for storing or transmitting information in a form readable by a computer.
  • a machine-readable medium includes a read only memory (ROM), a random access memory (RAM), a magnetic disk storage medium, an optical storage medium, a flash storage medium, an electrical, optical, acoustic or other form of propagated signal (eg, a carrier wave) , infrared signals, digital signals, etc.).
  • modules in the devices of the embodiments can be adaptively changed and placed in one or more devices different from the embodiment.
  • the modules or units or components of the embodiments may be combined into one module or unit or component, and further they may be divided into a plurality of sub-modules or sub-units or sub-components.
  • any combination of the features disclosed in the specification, including the accompanying claims, the abstract, and the drawings any combination of the features disclosed in the specification, including the accompanying claims, the abstract, and the drawings, Each of the features disclosed in the accompanying claims, the abstract and the drawings may be replaced by alternative features that provide the same, equivalent or similar purpose.
  • the various component embodiments of the present application can be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof.
  • a microprocessor or digital signal processor may be used in practice to implement some or all of the functionality of some or all of the components of the collapsed positioning device in accordance with embodiments of the present application.
  • the application can also be implemented as a device or device program (e.g., a computer program and a computer program product) for performing some or all of the methods described herein.
  • Such a program implementing the present application may be stored on a computer readable medium or may be in the form of one or more signals. Such signals may be downloaded from an Internet website, provided on a carrier signal, or provided in any other form.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Quality & Reliability (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Biomedical Technology (AREA)
  • Health & Medical Sciences (AREA)
  • Mathematical Physics (AREA)
  • Debugging And Monitoring (AREA)
  • Image Analysis (AREA)
  • Computer Hardware Design (AREA)

Abstract

一种崩溃的定位方法和装置,以解决现有技术不能确保定位崩溃的原因的问题。所述的方法包括:预先在终端和待测目标中设置监控点;监控所述待测目标的运行,并在待测目标崩溃时,获取监控点的参数及其参数值生成镜像文件,所述监控点的参数包括待测目标中监控点的参数和终端中监控点的参数;获取所述镜像文件,并查看所述镜像文件中监控点的参数及其参数值;对所述监控点的参数及其参数值进行分析,定位待测目标崩溃的原因。

Description

一种崩溃的定位方法和装置
本申请要求在 2012 年 11 月 29 日提交中国专利局、 申请号为 201210500909.4、 发明名称为 "一种崩溃的定位方法和装置" 的中国专利申 请的优先权, 其全部内容通过引用结合在本申请中。 技术领域
本申请涉及计算机软件技术, 特别是涉及一种崩溃的定位方法和装 置。 背景技术
Software (软件)是一系列按照特定顺序组织的计算机数据和指令的集 合。 通常软件可划分为系统软件、 应用软件和介于这两者之间的中间件。 软件并不只包括在计算机上运行的电脑程序, 还可以包括与这些电脑程序 相关的文件, 即可以认为软件就是程序加文件的集合体。
软件是用户与硬件之间的接口界面, 即用户是通过软件与计算机进行 交流的。 用户可以通过软件使用计算机, 可以使用软件上网, 还可以使用 软件办公。 但是, 软件可能由于种种原因而出现崩溃的问题, 一旦软件崩 溃, 该软件就可能需要等待很长一段时间才能继续使用, 甚至无法继续使 用。 因此, 需要找到软件崩溃的原因, 以确定崩溃是否是由于软件中的问 题导致的, 从而避免由于软件的问题而导致崩溃影响用户的使用。
一种软件崩溃的定位方法是, 获取已崩溃软件的 DUMP文件, 即该软 件进程的镜像文件, 然后采用分析工具, 如 windbg打开所述镜像文件, 通 过所述分析工具可以查看进程的相关数据, 例如库的加载等, 进而定位造 成崩溃的原因, 但是若通过上述进程的相关数据无法定位崩溃的原因, 则 需要进行更复杂的分析, 如查看堆栈等。
上述的方法, 进行定位时需要查看软件的进程的相关数据, 甚至需要 分析软件中堆栈的相关数据, 因此定位崩溃原因花费比较长的时间, 效率 比较低。
并且, 有些崩溃不是由于软件本身引起的, 采用上述方法很难分析出 这类崩溃的原因, 因此上述的方法并不能确保定位崩溃的原因。 发明内容
鉴于上述问题, 提出了本申请以便提供一种克服上述问题或者至少部 分地解决上述问题的崩溃的定位装置和相应的崩溃的定位方法。
依据本申请的一个方面, 提供了一种崩溃的定位方法, 包括: 预先在终端和待测目标中设置监控点;
监控所述待测目标的运行, 并在待测目标崩溃时, 获取监控点的参数 及其参数值生成镜像文件, 所述监控点的参数包括待测目标中监控点的参 数和终端中监控点的参数;
获取所述镜像文件, 并查看所述镜像文件中监控点的参数及其参数 值;
对所述监控点的参数及其参数值进行分析, 定位待测目标崩溃的原 因。
本申请实施例中, 对所述监控点的参数及其参数值进行分析, 定位待 测目标崩溃的原因, 包括: 对所述监控点的参数进行分类, 并分类分析各 参数的参数值, 定位待测目标崩溃的原因。
本申请实施例中, 所述镜像文件中还包括: 崩溃地址; 对所述监控点 的参数进行分类, 并分类分析各参数的参数值, 定位待测目标崩溃的原 因, 包括: 按照所述崩溃地址对所述待测目标中监控点的参数进行分类, 确定每一个待测目标中监控点的参数所对应的崩溃地址; 针对每一个崩溃 地址, 分析该崩溃地址下待测目标中监控点的参数对应的参数值, 并结合 终端中监控点的参数对应的参数值, 定位待测目标崩溃的原因。
本申请实施例中, 所述监控终端中待测目标的运行, 包括: 通过监控 接口采用监控点的参数对待测目标中的监控点进行监控, 生成待测目标中 监控点的参数对应的参数值; 并通过监控接口采用监控点的参数对终端中 的监控点进行监控, 生成终端中监控点的参数对应的参数值。
本申请实施例中, 所述在待测目标崩溃时, 获取监控点的参数及其参 数值生成镜像文件, 包括: 在待测目标崩溃时通过所述监控接口, 获取待 测目标中监控点的参数及其当前的参数值, 和终端中监控点的参数及其当 前的参数值; 采用获取的待测目标中监控点的参数及其参数值, 和终端中 监控点的参数及其参数值, 生成镜像文件。
本申请实施例中, 所述预先在终端和待测目标中设置监控点, 包括: 预先对待测目标崩溃的原因进行分析, 确定待测目标崩溃的关键位置; 在 所述关键位置上设置监控点。
本申请实施例中, 所述待测目标为浏览器, 所述预先在终端和待测目 标中设置监控点, 包括: 预先对浏览器崩溃的原因进行分析, 确定浏览器 崩溃的关键位置; 在所述关键位置上设置监控点, 所述关键位置包括以下 至少一项: 浏览器的进程、 线程、 函数和浏览器所在终端的内存数据。
本申请实施例中, 所述待测目标为浏览器, 所述镜像文件中还包括: 崩溃地址; 所述对所述监控点的参数及其参数值进行分析, 定位待测目标 崩溃的原因, 包括: 按照崩溃地址对浏览器中的监控点进行分类; 针对每 一崩溃地址, 将浏览器的监控点的参数及其参数值, 结合终端中监控点的 参数及其参数值进行分析, 定位待测目标崩溃的原因。
本申请实施例中, 所述待测目标中监控点的参数包括监控点的状态参 数, 适于标识监控点在待测目标崩溃时的状态, 所述终端中监控点的参数 包括终端的内存总量和内存使用量。
根据本申请的另一方面, 提供了一种崩溃的定位装置, 包括: 监控点设置模块, 配置为预先在终端的待测目标中设置监控点; 监控并生成模块, 配置为监控所述待测目标的运行, 并在待测目标崩 溃时, 获取监控点的参数及其参数值生成镜像文件, 所述监控点的参数包 括待测目标中监控点的参数和终端中监控点的参数;
获取并查看模块, 配置为获取所述镜像文件, 并查看所述镜像文件中 监控点的参数及其参数值; 分析定位模块, 配置为对所述监控点的参数及其参数值进行分析, 定 位待测目标崩溃的原因。
本申请实施例中, 所述分析定位模块, 配置为对所述监控点的参数进 行分类, 并分类分析各参数的参数值, 定位待测目标崩溃的原因。
本申请实施例中, 所述镜像文件中还包括: 崩溃地址; 所述分析定位 模块, 包括: 分类模块, 配置为按照所述崩溃地址对所述待测目标中监控 点的参数进行分类, 确定每一个待测目标中监控点的参数所对应的崩溃地 址; 分析模块, 配置为针对每一个崩溃地址, 分析该崩溃地址下待测目标 中监控点的参数对应的参数值, 并结合终端中监控点的参数对应的参数 值, 定位待测目标崩溃的原因。
本申请实施例中, 所述监控并生成模块, 包括: 第一监控模块, 配置 为通过监控接口采用监控点的参数对待测目标中的监控点进行监控, 生成 待测目标中监控点的参数对应的参数值; 第二监控模块, 配置为并通过监 控接口采用监控点的参数对终端中的监控点进行监控, 生成终端中监控点 的参数对应的参数值。
本申请实施例中, 所述监控并生成模块, 包括: 获取模块, 配置为在 待测目标崩溃时通过所述监控接口, 获取待测目标中监控点的参数及其当 前的参数值, 和终端中监控点的参数及其当前的参数值; 生成模块, 配置 为采用获取的待测目标中监控点的参数及其参数值, 和终端中监控点的参 数及其参数值, 生成镜像文件。
本申请实施例中, 所述监控点设置模块, 具体配置为预先对待测目标 崩溃的原因进行分析, 确定待测目标崩溃的关键位置; 在所述关键位置上 设置监控点。
本申请实施例中, 所述待测目标为浏览器, 则所述监控点设置模块, 具体配置为预先对浏览器崩溃的原因进行分析, 确定浏览器崩溃的关键位 置; 在所述关键位置上设置监控点, 所述关键位置包括以下至少一项: 浏 览器的进程、 线程、 函数和浏览器所在终端的内存数据。
本申请实施例中, 所述待测目标为浏览器, 所述镜像文件中还包括: 崩溃地址; 所述分析定位模块中: 分类模块, 具体配置为按照崩溃地址对 浏览器中的监控点进行分类; 分析模块, 具体配置为针对每一崩溃地址, 将浏览器的监控点的参数及其参数值, 结合终端中监控点的参数及其参数 值进行分析, 定位待测目标崩溃的原因。
本申请实施例中, 所述待测目标中监控点的参数包括监控点的状态参 数, 适于标识监控点在待测目标崩溃时的状态, 所述终端中监控点的参数 包括终端的内存总量和内存使用量。
根据本申请的预先在终端和待测目标中设置监控点, 可以监控所述待 测目标的运行, 并在待测目标崩溃时, 获取待测目标中监控点的参数及其 参数值生成镜像文件。 由于可以在终端和待测软件中设置大量的监控点, 因此, 可以从镜像文件中获取到大量的参数及其参数值, 使得进行崩溃的 原因定位时, 可以对比较多的数据进行分析, 能够进行分析的数据比较充 分, 从而可以快速的定位崩溃的原因。 并且, 可以获取终端中监控点的参 数及其参数值, 因此针对非待测目标本身引起的崩溃也可以进行定位, 从 而确保定位崩溃的原因。
上述说明仅是本申请技术方案的概述, 为了能够更清楚了解本申请的 技术手段, 而可依照说明书的内容予以实施, 并且为了让本申请的上述和 其它目的、 特征和优点能够更明显易懂, 以下特举本申请的具体实施方 式。 附图说明
通过阅读下文优选实施方式的详细描述, 各种其他的优点和益处对于 本领域普通技术人员将变得清楚明了。 附图仅用于示出优选实施方式的目 的, 而并不认为是对本申请的限制。 而且在整个附图中, 用相同的参考符 号表示相同的部件。 在附图中:
图 1示出了根据本申请一个实施例提供的一种崩溃的定位方法流程图; 图 2示出了根据本申请另一个实施例提供的分类分析方法流程图; 图 3示出了本申请另一个实施例提供的浏览器崩溃定位方法; 图 4示出了根据本申请一个实施例的另一个实施例提供的监控并生成镜 像文件的方法流程图;
图 5示出了根据本申请一个实施例提供的一种崩溃的定位装置结构图; 图 6 示出了根据本申请另一个实施例提供的一种崩溃的定位装置结构 图。 具体实施方式
下面将参照附图更详细地描述本公开的示例性实施例。 虽然附图中显 示了本公开的示例性实施例, 然而应当理解, 可以以各种形式实现本公开 而不应被这里阐述的实施例所限制。 相反, 提供这些实施例是为了能够更 透彻地理解本公开, 并且能够将本公开的范围完整的传达给本领域的技术 人员。
软件是用户与硬件之间的接口界面, 即用户是通过软件与计算机进行 交流的。 一旦软件崩溃, 该软件就可能需要等待很长一段时间才能继续使 用, 甚至无法继续使用。 因此, 需要找到软件崩溃的原因, 以确定崩溃是 否是由于软件中的问题导致的, 从而避免由于软件的问题而导致崩溃影响 用户的使用。
一种软件崩溃的定位方法中, 进行定位时需要查看软件的进程的相关 数据, 甚至需要分析软件中堆栈的相关数据, 因此定位崩溃原因花费比较 长的时间, 效率比较低。 并且, 有些崩溃不是由于软件本身引起的, 采用 上述方法很难分析出这类崩溃的原因, 因此上述的方法并不能确保定位崩 溃的原因。
本申请实施例提供一种崩溃的定位方法, 可以从镜像文件中获取到大 量的参数及其参数值, 使得进行崩溃的原因定位时, 可以对比较多的数据 进行分析, 能够进行分析的数据比较充分, 从而可以快速的定位崩溃的原 因。 并且, 可以获取终端中监控点的参数及其参数值, 因此针对非待测目 标本身引起的崩溃也可以进行定位, 从而确保定位崩溃的原因。
图 1示出了根据本申请一个实施例提供的一种崩溃的定位方法流程图。 步骤 101 , 预先在终端的待测目标中设置监控点。
软件在终端中可能由于种种原因而出现崩溃的问题, 为了找到软件崩 溃的原因, 可以将软件作为待测目标, 然后在终端和待测目标中设置监控 点, 以便随着软件的运行通过所述监控点对待测目标进行实时监控。
其中, 针对每一个监控点可以设置一个或多个参数, 随着待测目标的 进行, 所述监控点的参数对生成相应的参数值。 因此, 可以在终端和待测 软件中设置大量的监控点, 监控终端和待测软件中的中位置, 例如待测目 标的进程、 线程、 函数等, 又如终端的内存, 系统文件等。
本申请实施例中, 所述预先在终端和待测目标中设置监控点, 包括: 预先对待测目标崩溃的原因进行分析, 确定待测目标崩溃的关键位 置; 在所述关键位置上设置监控点。
待测目标的崩溃通常是由一系列原因引起的, 而这些原因可能是待测 目标或终端中某些关键位置的问题导致的, 因此可以预先总结导致待测目 标崩溃的各类原因, 然后对所述原因进行分析, 通过分析可以确定待测目 标崩溃的关键位置。 然后在所述关键位置上设置监控点, 从而在待测目标 运行时通过关键位置处的监控点对其进行监控, 检测待测目标的运行状 况。
其中, 所述关键位置指的是待测目标中的发生崩溃的位置, 及其相关 位置, 例如, 待测目标的进程、 线程、 函数调用等的执行过程中发生崩 溃, 则所述进程、 线程、 函数调用都可称之为关键位置。 并且所述关键位 置不限定于待测目标内, 如待测目标的崩溃是由于终端内存不足而导致 的, 则所述关键位置是终端的内存数据。
步骤 102, 监控所述待测目标的运行, 并在待测目标崩溃时, 获取待测 目标中监控点的参数及其参数值生成镜像文件。
当软件即待测目标在终端中运行时, 监控所述待测目标的运行, 当检 测到待测目标崩溃时, 获取监控点的参数和所述参数的参数值, 将所述监 控点的参数及其参数值生成镜像文件。 由于在终端和待测软件中设置了大 量的监控点, 因此所述镜像文件中可以包括大量监控点的参数和参数值。 其中, 所述监控点的参数包括: 设置于待测目标中监控点的参数, 以及设 置于终端中监控点的参数。
可选的, 所述待测目标中监控点的参数包括监控点的状态参数, 所述 状态参数适于标识监控点在待测目标崩溃时的状态。
其中, 所述状态参数可以设置于待测目标中进程、 线程、 函数的监控 点中, 因此通过状态参数的参数值可以获知待测目标崩溃时各进程、 线 程、 函数等所处的状态。 例如, 监控点设置于待测目标的主进程中, 所述 状态参数可以标识主进程的状态, 状态可以包括启动、 运行和结束, 则对 应状态的参数值可以分别为 0、 1 和 2, 则根据参数值就可以直到主进程执 行到哪个阶段。
当然, 待测目标中还包括其他参数, 例如句柄数、 进程数和进程名称 等, 都用于对崩溃原因进行定位分析, 例如分析句柄数是否达到系统上 限, 那个进程出现异常等, 其中, 句柄是一个标识符, 可以标识对象或者 项目。
所述终端中监控点的参数可以包括终端的内存总量和内存使用量, 在 待测目标崩溃时就可以终端中的内存总量和内存使用量, 进而了解崩溃时 的内存占用情况, 用以定位崩溃的原因。 特别是, 待测目标崩溃可能是由 非待测目标分身的问题所引起的, 例如由于终端中内存不足而导致的崩溃 等, 通过设置于终端中的监控点的参数就可以快速的定位崩溃的原因, 特 别针对非待测目标分身的问题所引起的崩溃。
当然, 终端和待测目标中还可以包括其他的参数, 上述仅用于列举, 不应理解为是对本申请实施例的限制。
步骤 103 , 获取所述镜像文件, 并查看所述镜像文件中监控点的参数及 其参数值。
然后可以获取所述镜像文件, 镜像文件需要使用特定的工具, 如
WinDbg打开, 即通过 WinDbg可以查看所述镜像文件, 然后可以从中获取 所述镜像文件中监控点的参数及其参数值, 包括: 终端中监控点的参数及 其参数值, 以及待测目标中监控点的参数及其参数值。 步骤 104, 对所述监控点的参数及其参数值进行分析, 定位待测目标崩 溃的原因。
获取到监控点的参数及其参数值以后, 可以对监控点的参数及其参数 值进行分析, 由于其中包括终端中监控点的参数及其参数值, 以及待测目 标中监控点的参数及其参数值, 因此可以共同分析所述参数及其参数值, 也可以分类分析所述参数及其参数值。 分析时, 可进行分析的数据非常丰 富, 可以从大量的终端和待测软件中设置大量的监控点中获取相应的参数 和参数值, 并检测各参数的参数值是否有异常、 或者可以通过参数值查看 该参数对应的监控点处于何种状态等, 进而定位待测目标崩溃的原因。
其中, 有些崩溃是非待测目标本身引起的, 例如由于内存不足而导致 待测目标崩溃, 由于可以获取终端中监控点的参数及其参数值, 因此就可 以对除待测目标以外的终端中的数据进行分析, 从而可以定位出非待测目 标本身引起的崩溃, 可以确保定位出崩溃原因。
如上例中, 参数属于设置于待测目标的主进程中的监控点, 并且, 所 述参数为状态参数, 则若待测目标崩溃后镜像文件中该状态参数的参数值 为 0, 则说明主进程执行到启动状态, 则定位发生在启动到运行之前, 那么 就可以重点分析待测目标在启动到运行之间的各进程、 线程、 函数等, 进 而快速的定位崩溃原因。
综上所述, 本申请实施例会预先在终端和待测目标中设置监控点, 监 控所述待测目标的运行, 并在待测目标崩溃时, 获取待测目标中监控点的 参数及其参数值生成镜像文件。 由于可以在终端和待测软件中设置大量的 监控点, 因此, 可以从镜像文件中获取到大量的参数及其参数值, 使得进 行崩溃的原因定位时, 可以对比较多的数据进行分析, 能够进行分析的数 据比较充分, 从而可以快速的定位崩溃的原因。 并且, 可以获取终端中监 控点的参数及其参数值, 因此针对非待测目标本身引起的崩溃也可以进行 定位, 从而确保定位崩溃的原因。
其次, 所述待测目标中监控点的参数包括监控点的状态参数, 所述状 态参数适于标识监控点在待测目标崩溃时的状态, 则通过状态参数就可以 快速的获取待测目标崩溃时各进程、 线程、 函数等所处的状态, 从而定位 出待测目标中要分析的位置。 并且, 终端中的监控点的参数包括内存总量 和内存使用量, 则可以获知在待测目标崩溃时内存的占用情况, 从而可以 分析崩溃是否由非待测目标本身引起的, 如内存不足等问题, 从而可以进 一步快速的定位崩溃的原因。
可选的, 对所述监控点的参数及其参数值进行分析, 定位待测目标崩 溃的原因, 包括: 对所述监控点的参数进行分类, 并分类分析各参数的参 数值, 定位待测目标崩溃的原因。
由于监控点可以是设置于终端的, 也可以是设置于待测目标中的, 并 且监控点的参数有很多类型。 因此, 可以对所述监控点的参数进行分类, 然后按照分类结果去分别分析各参数的参数值, 定位待测目标崩溃的原 因。
可选的, 所述镜像文件中还包括: 崩溃地址; 所述崩溃地址是待测目 标的进程的堆栈地址, 也即获取到进程中数据的存储位置。
图 2示出了根据本申请另一个实施例提供的分类分析方法流程图。 对所述监控点的参数进行分类, 并分类分析各参数的参数值, 定位待 测目标崩溃的原因, 包括:
步骤 201 , 按照所述崩溃地址对所述待测目标中监控点的参数进行分 类, 确定每一个待测目标中监控点的参数所对应的崩溃地址。
首先, 针对待测目标中监控点的参数, 可以按照崩溃地址对所述待测 目标中监控点的参数进行分类, 确定每一个待测目标中监控点的参数所对 应的崩溃地址, 即确定所述待测目标中每一个监控点的参数所属的进程。
步骤 202, 针对每一个崩溃地址, 分析该崩溃地址下待测目标中监控点 的参数对应的参数值, 并结合终端中监控点的参数对应的参数值, 定位待 测目标崩溃的原因。
然后针对每一个崩溃地址, 要对该崩溃地址下待测目标中监控点的参 数对应的参数值进行分析, 可以通过参数值确定哪个参数存在异常, 也可 以分析软件崩溃时进程、 线程和函数处于何种状态等。 在分析时除了对待 测目标中监控点进行分析以外, 还要结合终端中监控点的参数对应的参数 值, 例如内存总量和内存使用量等, 进一步确定猜测目标崩溃的原因。
综上所述, 本申请实施例可以按照崩溃地址对待测目标中监控点的参 数进行分类, 然后在分析各崩溃地址下待测目标中监控点的参数时, 结合 终端中监控点的参数进行共同分析, 从而无论是待测目标造成的崩溃, 还 是终端造成的崩溃, 都可以快速的定位。
本申请实施例中, 所述待测目标可以为终端中的各类软件, 如办公软 件、 游戏软件、 浏览器、 系统软件等, 下面以浏览器作为待测目标举例论 述本申请实施例的内容。
图 3示出了本申请另一个实施例提供的浏览器崩溃定位方法。
步骤 301 , 预先对浏览器崩溃的原因进行分析, 确定浏览器崩溃的关键 位置。
浏览器的崩溃往往不是突发的, 是有一些原因引起的, 例如, 内存不 足, 浏览器中函数调用失败等。 而这些原因可能是待测目标或终端中某些 关键位置的问题导致的, 例如, 内存不足与终端中内存数据相关, 又如函 数调用失败是浏览器中函数调用的问题等。
因此可以预先总结导致待测目标崩溃的各类原因, 然后对所述原因进 行分析, 通过分析可以确定待测目标崩溃的关键位置。 然后在所述关键位 置上设置监控点, 从而在待测目标运行时通过关键位置处的监控点对其进 行监控, 检测待测目标的运行状况。 其中, 所述关键位置包括以下至少一 项: 浏览器的进程、 线程、 函数和浏览器所在终端的内存数据。
步骤 302, 在所述关键位置上设置监控点。
则所述关键位置上设置监控点, 例如, 在所述浏览器的各个进程、 各 个线程、 各类函数, 以及函数调用的相关位置等设置监控点, 也可以在浏 览器所在终端中设置监控点, 例如内存数据, CPU运行数据等设置监控 点。 从而全方位的监控浏览器运行时, 浏览器和终端的运行状况。
步骤 303 , 监控所述浏览器的运行, 并在浏览器崩溃时, 获取监控点的 参数及其参数值生成镜像文件。 然后在浏览器运行时, 可以通过所述监控点监控浏览器的运行, 当检 测到浏览器崩溃时, 可以获取浏览器中各监控点的参数及其参数值, 从而 将所述监控点的参数及其参数值生成镜像文件。
步骤 304, 获取所述镜像文件, 并查看所述镜像文件中监控点的参数及 其参数值。
然后可以获取所述镜像文件, 并使用特定的工具, 如 WinDbg打开所述 镜像文件, 以查看所述镜像文件中监控点的参数及其参数值。
步骤 305, 按照崩溃地址对浏览器中的监控点进行分类。
浏览器中监控点都分属于各个崩溃地址, 所述崩溃地址是浏览器进程 的堆栈地址, 也即获取到进程中数据的存储位置。 因此可以按照崩溃地址 对浏览器中的监控点进行分类, 确定每一个待测目标中监控点的参数所对 应的崩溃地址。
步骤 306, 针对每一崩溃地址, 将浏览器的监控点的参数及其参数值, 结合终端中监控点的参数及其参数值进行分析, 定位待测目标崩溃的原 因。
然后针对每一个崩溃地址, 要对该崩溃地址下浏览器中监控点的参数 对应的参数值进行分析, 可以通过参数值确定哪个参数存在异常, 也可以 分析浏览器崩溃时进程、 线程和函数处于何种状态等。 在分析时除了对浏 览器中监控点进行分析以外, 还要结合终端中监控点的参数对应的参数 值, 例如内存总量和内存使用量等, 进一步确定猜测目标崩溃的原因。
例如, 崩溃中有一类崩溃是由于 malloc 函数申请内存失败导致的, 在 镜像文件进行分析时, 按崩溃地址进行分类后, 对浏览器中监控点的参数 对应参数值进行可以分析后, 可以确定是 malloc 函数调用失败了。 但是通 过浏览器中监控点的参数没有分析出崩溃的具体原因, 通过结合终端中监 控点的参数对应的参数值, 发现终端的内存总量非常小, 内存占用量很 高, 进而定位出崩溃的原因是终端中内存过小导致的, 崩溃并非是由浏览 器自身问题造成的。
又如, 崩溃中还有一类崩溃就是 CreateBitma 或者 Create , 和系统句柄 相关的函数经常失败, 通过镜像文件, 可以查看各崩溃地址下参数的参数 值, 进而查看全部的句柄数, 并结合终端中监控点的参数对应的参数值, 进而分析出, 崩溃时由于句柄数到达终端中系统的上限, 而造成该问题的 原因是由于系统的资源不足造成的。
又如, 在浏览器的监控点中添加了状态参数, 进而可以确定崩溃时浏 览器所处的状态, 则可以快速的确定问题的严重性。 若在启动时出现崩 溃, 则其会造成用户无法使用, 问题比较严重, 需要尽快分析、 定位崩溃 的原因, 尽量减少用户使用的不便; 若在结束时出现崩溃, 则用户已经使 用完毕, 相对而言问题的严重性比较低, 当然也要需要尽快分析、 定位崩 溃的原因, 尽量减少用户使用的不便。
本申请实施例可以采用 dbghelp.dll 对待测目标进行监控, 所述 dbghelp.dll是一种调试跟踪相关模块, 适于跟踪进程工作, 在待测目标崩溃 时收集程序产生异常时的堆栈信息, 以供开发人员分析, 从而找出使进程 出现异常的原因。
MiniDumpWriteDump 是 DbgHelp.dll 中 一 个 API ( Application Programming Interface, 应用程序编程接口) , 适于导出当前运行的软件的 DUMP 文件, 即镜像文件。 在 MiniDumpWriteDump 中存在参数 MINIDUMP— USER— STREAM, 该参数是一个接口参数, 也即监控接口, 允 许用户添加自设的参数。 并且, 在待测目标崩溃时, 可以通过参数 MINIDUMP— USER— STREAM 获取所述自设的参数对应的参数值 , 然后将 所述参数和参数值添加到镜像文件中, 以进行进一步的分析。
图 4示出了根据本申请另一个实施例提供的监控并生成镜像文件的方法 流程图。
则监控终端中待测目标的运行, 并在待测目标崩溃时, 获取监控点的 参数及其参数值生成镜像文件, 具体包括:
步骤 401, 通过监控接口采用监控点的参数对待测目标中的监控点进行 监控, 生成待测目标中监控点的参数对应的参数值。
本申请实施例在待测目标中设置了监控点, 因此在待测目标运行时, 可以通过监控接口采用监控点的参数对待测目标中的监控点进行监控, 即 随着待测目标的运行, 待测目标中监控点的参数可以生成对应的参数值, 所述参数值可以标识监控点的信息, 如所处的状态, 执行的位置等。
步骤 402, 通过监控接口采用监控点的参数对终端中的监控点进行监 控, 生成终端中监控点的参数对应的参数值。
本申请实施例在终端中同样设置了监控点, 因此在待测目标运行时, 可以通过监控接口采用监控点的参数对终端中的监控点进行监控, 即随着 待测目标的运行, 终端中监控点的参数可以生成对应的参数值, 所述参数 值可以标识监控点的信息, 如终端中该监控点所处的状态, 终端中该监控 点的使用情况等。
步骤 403 , 在待测目标崩溃时通过所述监控接口, 获取待测目标中监控 点的参数及其当前的参数值, 和终端中监控点的参数及其当前的参数值。
待测目标崩溃时, dbghelp.dll可以检测到待测目标崩溃的事件, 在待测 目标崩溃时, dbghelp.dll会依据其中所设置的参数, 收集待测目标产生异常 时的数据, 如堆栈信息等。 除此以外, dbghelp.dll 还可以通过参数 MINIDUMP— USER— STREAM 分别收集设置于终端中监控点的参数及其在 当前即待测目标崩溃时参数值, 以及收集设置于待测目标中监控点的参数 及其当前的参数值。
步骤 404, 采用获取的待测目标中监控点的参数及其参数值, 和终端中 监控点的参数及其参数值, 生成镜像文件。
DbgHelp.dll在获取到待测目标中监控点的参数及其当前的参数值, 终 端中监控点的参数及其当前的参数值, 以及待测目标产生异常时的数据以 后, 可以通过 MiniDumpWriteDump , 将上述数据导出并生成镜像文件。
实际处理中, 可以由终端和服务器共同完成本申请实施例的方法, 可 以将上述图 3中的步骤在终端完成, 终端中生成镜像文件后, 可以上传给服 务器, 服务器在接收到进行文件后, 可以执行后续的查看、 分析的步骤。
当然, 也可以集成自动分析软件, 在终端中监控待测目标的运行并定 位崩溃原因, 并可以将问题崩溃原因传回服务器。 其中, 针对非待测目标 本身引起的崩溃, 可以为用户提供相应的建议, 针对由待测目标中问题所 引起的崩溃, 可以传回崩溃原因, 是开发人员可以进行修复。
当然, 也可以采用服务器进行远程监控, 传回数据生成镜像文件并分 析, 本申请实施例对此不做限定。
图 5示出了根据本申请一个实施例提供的一种崩溃的定位装置结构图。 相应的, 本申请实施例还提供了一种崩溃的定位装置, 包括: 监控点 设置模块 10、 监控并生成模块 11、 获取并查看模块 12和分析定位模块 13 , 其巾:
监控点设置模块 10, 配置为预先在终端的待测目标中设置监控点; 监 控并生成模块 11 , 配置为监控所述待测目标的运行, 并在待测目标崩溃 时, 获取监控点的参数及其参数值生成镜像文件, 所述监控点的参数包括 待测目标中监控点的参数和终端中监控点的参数; 获取并查看模块 12, 配 置为获取所述镜像文件, 并查看所述镜像文件中监控点的参数及其参数 值; 分析定位模块 13 , 配置为对所述监控点的参数及其参数值进行分析, 定位待测目标崩溃的原因。
图 6 示出了根据本申请另一个实施例提供的一种崩溃的定位装置结构 图。
可选的, 所述分析定位模块 13 , 配置为对所述监控点的参数进行分 类, 并分类分析各参数的参数值, 定位待测目标崩溃的原因。
可选的, 所述镜像文件中还包括: 崩溃地址; 所述分析定位模块 13 , 包括: 分类模块 131 , 配置为按照所述崩溃地址对所述待测目标中监控点的 参数进行分类, 确定每一个待测目标中监控点的参数所对应的崩溃地址; 分析模块 132, 配置为针对每一个崩溃地址, 分析该崩溃地址下待测目标中 监控点的参数对应的参数值, 并结合终端中监控点的参数对应的参数值, 定位待测目标崩溃的原因。
可选的, 所述监控并生成模块 11 , 包括: 第一监控模块 111 , 配置为通 过监控接口采用监控点的参数对待测目标中的监控点进行监控, 生成待测 目标中监控点的参数对应的参数值; 第二监控模块 112, 配置为并通过监控 接口采用监控点的参数对终端中的监控点进行监控, 生成终端中监控点的 参数对应的参数值。 获取模块 113 , 配置为在待测目标崩溃时通过所述监控 接口, 获取待测目标中监控点的参数及其当前的参数值, 和终端中监控点 的参数及其当前的参数值; 生成模块 114, 配置为采用获取的待测目标中监 控点的参数及其参数值, 和终端中监控点的参数及其参数值, 生成镜像文 件。
可选的, 所述监控点设置模块 10, 具体配置为预先对待测目标崩溃的 原因进行分析, 确定待测目标崩溃的关键位置; 在所述关键位置上设置监 控点。
可选的, 所述待测目标为浏览器, 则所述监控点设置模块 10, 具体配 置为预先对浏览器崩溃的原因进行分析, 确定浏览器崩溃的关键位置; 在 所述关键位置上设置监控点, 所述关键位置包括以下至少一项: 浏览器的 进程、 线程、 函数和浏览器所在终端的内存数据。
可选的, 所述待测目标为浏览器, 所述镜像文件中还包括: 崩溃地 址; 所述分析定位模块 13 中: 分类模块 131 , 具体配置为按照崩溃地址对 浏览器中的监控点进行分类; 分析模块 132, 具体配置为针对每一崩溃地 址, 将浏览器的监控点的参数及其参数值, 结合终端中监控点的参数及其 参数值进行分析, 定位待测目标崩溃的原因。
可选的, 所述待测目标中监控点的参数包括监控点的状态参数, 适于 标识监控点在待测目标崩溃时的状态, 所述终端中监控点的参数包括终端 的内存总量和内存使用量。
相应的, 本申请实施例还提供了一种在其上记录有用于执行上述实施 例所述应用于崩溃的定位方法的程序的计算机可读记录介质。 所述计算机 可读记录介质包括用于以计算机可读的形式存储或传送信息的任何机制。 例如, 机器可读介质包括只读存储器 ( ROM )、 随机存取存储器 ( RAM ) 、 磁盘存储介质、 光存储介质、 闪速存储介质、 电、 光、 声或其他形式的传 播信号 (例如, 载波、 红外信号、 数字信号等)等。
在此提供的算法和显示不与任何特定计算机、 虚拟系统或者其它设备 固有相关。 各种通用系统也可以与基于在此的示教一起使用。 根据上面的 描述, 构造这类系统所要求的结构是显而易见的。 此外, 本申请也不针对 任何特定编程语言。 应当明白, 可以利用各种编程语言实现在此描述的本 申请的内容, 并且上面对特定语言所做的描述是为了披露本申请的最佳实 施方式。
在此处所提供的说明书中, 说明了大量具体细节。 然而, 能够理解, 本申请的实施例可以在没有这些具体细节的情况下实践。 在一些实例中, 并未详细示出公知的方法、 结构和技术, 以便不模糊对本说明书的理解。
类似地, 应当理解, 为了精简本公开并帮助理解各个发明方面中的一 个或多个, 在上面对本申请的示例性实施例的描述中, 本申请的各个特征 有时被一起分组到单个实施例、 图、 或者对其的描述中。 然而, 并不应将 该公开的方法解释成反映如下意图: 即所要求保护的本申请要求比在每个 权利要求中所明确记载的特征更多的特征。 更确切地说, 如下面的权利要 求书所反映的那样, 发明方面在于少于前面公开的单个实施例的所有特 征。 因此, 遵循具体实施方式的权利要求书由此明确地并入该具体实施方 式, 其中每个权利要求本身都作为本申请的单独实施例。
本领域那些技术人员可以理解, 可以对实施例中的设备中的模块进行 自适应性地改变并且把它们设置在与该实施例不同的一个或多个设备中。 可以把实施例中的模块或单元或组件组合成一个模块或单元或组件, 以及 此外可以把它们分成多个子模块或子单元或子组件。 除了这样的特征和 /或 过程或者单元中的至少一些是相互排斥之外, 可以采用任何组合对本说明 书(包括伴随的权利要求、 摘要和附图)中公开的所有特征以及如此公开的 明书 (包括伴随的权利要求、 摘要和附图 )中公开的每个特征可以由提供相 同、 等同或相似目的的替代特征来代替。
此外, 本领域的技术人员能够理解, 尽管在此所述的一些实施例包括 其它实施例中所包括的某些特征而不是其它特征, 但是不同实施例的特征 的组合意味着处于本申请的范围之内并且形成不同的实施例。 例如, 在下 面的权利要求书中, 所要求保护的实施例的任意之一都可以以任意的组合 方式来使用。
本申请的各个部件实施例可以以硬件实现, 或者以在一个或者多个处 理器上运行的软件模块实现, 或者以它们的组合实现。 本领域的技术人员 应当理解, 可以在实践中使用微处理器或者数字信号处理器(DSP )来实现 根据本申请实施例的崩溃的定位装置中的一些或者全部部件的一些或者全 部功能。 本申请还可以实现为用于执行这里所描述的方法的一部分或者全 部的设备或者装置程序(例如, 计算机程序和计算机程序产品)。 这样的实 现本申请的程序可以存储在计算机可读介质上, 或者可以具有一个或者多 个信号的形式。 这样的信号可以从因特网网站上下载得到, 或者在载体信 号上提供, 或者以任何其他形式提供。
应该注意的是上述实施例对本申请进行说明而不是对本申请进行限 制, 并且本领域技术人员在不脱离所附权利要求的范围的情况下可设计出 替换实施例。 在权利要求中, 不应将位于括号之间的任何参考符号构造成 对权利要求的限制。 单词 "包含" 不排除存在未列在权利要求中的元件或 步骤。 位于元件之前的单词 "一" 或 "一个" 不排除存在多个这样的元 件。 本申请可以借助于包括有若干不同元件的硬件以及借助于适当编程的 计算机来实现。 在列举了若干装置的单元权利要求中, 这些装置中的若干 个可以是通过同一个硬件项来具体体现。 单词第一、 第二、 以及第三等的 使用不表示任何顺序。 可将这些单词解释为名称。

Claims

权 利 要 求 书
1、 一种崩溃的定位方法, 包括:
预先在终端和待测目标中设置监控点;
监控所述待测目标的运行, 并在待测目标崩溃时, 获取监控点的参数 及其参数值生成镜像文件, 所述监控点的参数包括待测目标中监控点的参 数和终端中监控点的参数;
获取所述镜像文件, 并查看所述镜像文件中监控点的参数及其参数 值;
对所述监控点的参数及其参数值进行分析, 定位待测目标崩溃的原 因。
2、 根据权利要求 1所述的方法, 对所述监控点的参数及其参数值进行 分析, 定位待测目标崩溃的原因, 包括:
对所述监控点的参数进行分类, 并分类分析各参数的参数值, 定位待 测目标崩溃的原因。
3、 根据权利要求 2所述的方法, 所述镜像文件中还包括: 崩溃地址; 对所述监控点的参数进行分类, 并分类分析各参数的参数值, 定位待 测目标崩溃的原因, 包括:
按照所述崩溃地址对所述待测目标中监控点的参数进行分类, 确定每 一个待测目标中监控点的参数所对应的崩溃地址;
针对每一个崩溃地址, 分析该崩溃地址下待测目标中监控点的参数对 应的参数值, 并结合终端中监控点的参数对应的参数值, 定位待测目标崩 溃的原因。
4、 根据权利要求 1所述的方法, 所述监控终端中待测目标的运行, 包 括:
通过监控接口采用监控点的参数对待测目标中的监控点进行监控, 生 成待测目标中监控点的参数对应的参数值;
并通过监控接口采用监控点的参数对终端中的监控点进行监控, 生成 终端中监控点的参数对应的参数值。
5、 根据权利要求 4所述的方法, 所述在待测目标崩溃时, 获取监控点 的参数及其参数值生成镜像文件, 包括:
在待测目标崩溃时通过所述监控接口, 获取待测目标中监控点的参数 及其当前的参数值, 和终端中监控点的参数及其当前的参数值;
采用获取的待测目标中监控点的参数及其参数值, 和终端中监控点的 参数及其参数值, 生成镜像文件。
6、 根据权利要求 1所述的方法, 所述预先在终端和待测目标中设置监 控点, 包括:
预先对待测目标崩溃的原因进行分析, 确定待测目标崩溃的关键位 置;
在所述关键位置上设置监控点。
7、 根据权利要求 1至 5任一所述的方法, 所述待测目标为浏览器, 所 述预先在终端和待测目标中设置监控点, 包括:
预先对浏览器崩溃的原因进行分析, 确定浏览器崩溃的关键位置; 在所述关键位置上设置监控点, 所述关键位置包括以下至少一项: 浏 览器的进程、 线程、 函数和浏览器所在终端的内存数据。
8、 根据权利要求 1所述的方法, 所述待测目标为浏览器, 所述镜像文 件中还包括: 崩溃地址; 所述对所述监控点的参数及其参数值进行分析, 定位待测目标崩溃的原因, 包括:
按照崩溃地址对浏览器中的监控点进行分类;
针对每一崩溃地址, 将浏览器的监控点的参数及其参数值, 结合终端 中监控点的参数及其参数值进行分析, 定位待测目标崩溃的原因。
9、 根据权利要求 1至 6、 8任一所述的方法, 所述待测目标中监控点的 参数包括监控点的状态参数, 适于标识监控点在待测目标崩溃时的状态, 所述终端中监控点的参数包括终端的内存总量和内存使用量。
10、 一种崩溃的定位装置, 包括:
监控点设置模块, 配置为预先在终端的待测目标中设置监控点; 监控并生成模块, 配置为监控所述待测目标的运行, 并在待测目标崩 溃时, 获取监控点的参数及其参数值生成镜像文件, 所述监控点的参数包 括待测目标中监控点的参数和终端中监控点的参数;
获取并查看模块, 配置为获取所述镜像文件, 并查看所述镜像文件中 监控点的参数及其参数值;
分析定位模块, 配置为对所述监控点的参数及其参数值进行分析, 定 位待测目标崩溃的原因。
11、 根据权利要求 10所述的装置, 所述分析定位模块, 配置为对所述 监控点的参数进行分类, 并分类分析各参数的参数值, 定位待测目标崩溃 的原因。
12、 根据权利要求 11 所述的装置, 所述镜像文件中还包括: 崩溃地 址; 所述分析定位模块, 包括:
分类模块, 配置为按照所述崩溃地址对所述待测目标中监控点的参数 进行分类, 确定每一个待测目标中监控点的参数所对应的崩溃地址;
分析模块, 配置为针对每一个崩溃地址, 分析该崩溃地址下待测目标 中监控点的参数对应的参数值, 并结合终端中监控点的参数对应的参数 值, 定位待测目标崩溃的原因。
13、 根据权利要求 10所述的装置, 所述监控并生成模块, 包括: 第一监控模块, 配置为通过监控接口采用监控点的参数对待测目标中 的监控点进行监控, 生成待测目标中监控点的参数对应的参数值;
第二监控模块, 配置为并通过监控接口采用监控点的参数对终端中的 监控点进行监控, 生成终端中监控点的参数对应的参数值。
14、 根据权利要求 13所述的装置, 所述监控并生成模块, 包括: 获取模块, 配置为在待测目标崩溃时通过所述监控接口, 获取待测目 标中监控点的参数及其当前的参数值, 和终端中监控点的参数及其当前的 参数值;
生成模块, 配置为采用获取的待测目标中监控点的参数及其参数值, 和终端中监控点的参数及其参数值, 生成镜像文件。
15、 根据权利要求 10所述的装置, 所述监控点设置模块, 具体配置为 预先对待测目标崩溃的原因进行分析, 确定待测目标崩溃的关键位置; 在 所述关键位置上设置监控点。
16、 根据权利要求 10至 14任一所述的装置, 所述待测目标为浏览器, 则所述监控点设置模块, 具体配置为预先对浏览器崩溃的原因进行分析, 确定浏览器崩溃的关键位置; 在所述关键位置上设置监控点, 所述关键位 置包括以下至少一项: 浏览器的进程、 线程、 函数和浏览器所在终端的内 存数据。
17、 根据权利要求 10所述的装置, 所述待测目标为浏览器, 所述镜像 文件中还包括: 崩溃地址; 所述分析定位模块中:
分类模块, 具体配置为按照崩溃地址对浏览器中的监控点进行分类; 分析模块, 具体配置为针对每一崩溃地址, 将浏览器的监控点的参数 及其参数值, 结合终端中监控点的参数及其参数值进行分析, 定位待测目 标崩溃的原因。
18、 根据权利要求 10至 15、 17任一所述的装置, 所述待测目标中监控 点的参数包括监控点的状态参数, 适于标识监控点在待测目标崩溃时的状 态, 所述终端中监控点的参数包括终端的内存总量和内存使用量。
19、 一种在其上记录有用于执行权利要求 1所述方法的程序的计算机可 读记录介质。
PCT/CN2013/084394 2012-11-29 2013-09-27 一种崩溃的定位方法和装置 Ceased WO2014082495A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US14/648,605 US9594617B2 (en) 2012-11-29 2013-09-27 Method and apparatus for positioning crash

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201210500909.4A CN103049373B (zh) 2012-11-29 2012-11-29 一种崩溃的定位方法和装置
CN201210500909.4 2012-11-29

Publications (1)

Publication Number Publication Date
WO2014082495A1 true WO2014082495A1 (zh) 2014-06-05

Family

ID=48062020

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/084394 Ceased WO2014082495A1 (zh) 2012-11-29 2013-09-27 一种崩溃的定位方法和装置

Country Status (3)

Country Link
US (1) US9594617B2 (zh)
CN (1) CN103049373B (zh)
WO (1) WO2014082495A1 (zh)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103049373B (zh) * 2012-11-29 2015-08-19 北京奇虎科技有限公司 一种崩溃的定位方法和装置
CN103034575B (zh) * 2012-11-29 2015-08-19 北京奇虎科技有限公司 崩溃分析方法和装置
CN104750605B (zh) * 2013-12-30 2018-08-14 伊姆西公司 将内核对象信息包括在用户转储中
CN107332680A (zh) * 2016-04-28 2017-11-07 苏宁云商集团股份有限公司 一种系统监控方法及装置
CN106371991A (zh) * 2016-08-31 2017-02-01 重庆四联测控技术有限公司 一种程序故障的监控方法及系统
CN106649114B (zh) * 2016-12-23 2019-05-31 北京奇虎科技有限公司 对应用程序崩溃进行定位的方法和装置
CN109901970B (zh) * 2019-02-15 2022-05-06 视联动力信息技术股份有限公司 一种视联网终端的监控方法和装置
CN111638991B (zh) * 2020-06-05 2023-09-19 贝壳技术有限公司 用于解析崩溃文件的方法与系统

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5850562A (en) * 1994-06-27 1998-12-15 International Business Machines Corporation Personal computer apparatus and method for monitoring memory locations states for facilitating debugging of post and BIOS code
CN101286130A (zh) * 2007-04-11 2008-10-15 中兴通讯股份有限公司 一种嵌入式设备的复位故障定位的实现方法
CN101398781A (zh) * 2007-09-30 2009-04-01 英业达股份有限公司 一种快速诊断系统软件缺陷的系统及方法
CN103034575A (zh) * 2012-11-29 2013-04-10 北京奇虎科技有限公司 崩溃分析方法和装置
CN103049373A (zh) * 2012-11-29 2013-04-17 北京奇虎科技有限公司 一种崩溃的定位方法和装置

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6311327B1 (en) * 1998-03-02 2001-10-30 Applied Microsystems Corp. Method and apparatus for analyzing software in a language-independent manner
US20020087949A1 (en) * 2000-03-03 2002-07-04 Valery Golender System and method for software diagnostics using a combination of visual and dynamic tracing
US7028056B1 (en) * 2000-04-14 2006-04-11 Microsoft Corporation Method and arrangements for generating debugging information following software failures
US6728907B1 (en) * 2000-04-14 2004-04-27 Microsoft Corporation System and method for self-diagnosing system crashes
US7490268B2 (en) * 2004-06-01 2009-02-10 The Trustees Of Columbia University In The City Of New York Methods and systems for repairing applications
US8261242B2 (en) * 2008-06-09 2012-09-04 International Business Machines Corporation Assisting debug memory tracing using an instruction array that tracks the addresses of instructions modifying user specified objects
CN101853205A (zh) * 2010-06-23 2010-10-06 山东中创软件商用中间件股份有限公司 一种监控程序运行的方法和装置
US9158661B2 (en) * 2012-02-15 2015-10-13 Apple Inc. Enhanced debugging for embedded devices

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5850562A (en) * 1994-06-27 1998-12-15 International Business Machines Corporation Personal computer apparatus and method for monitoring memory locations states for facilitating debugging of post and BIOS code
CN101286130A (zh) * 2007-04-11 2008-10-15 中兴通讯股份有限公司 一种嵌入式设备的复位故障定位的实现方法
CN101398781A (zh) * 2007-09-30 2009-04-01 英业达股份有限公司 一种快速诊断系统软件缺陷的系统及方法
CN103034575A (zh) * 2012-11-29 2013-04-10 北京奇虎科技有限公司 崩溃分析方法和装置
CN103049373A (zh) * 2012-11-29 2013-04-17 北京奇虎科技有限公司 一种崩溃的定位方法和装置

Also Published As

Publication number Publication date
US9594617B2 (en) 2017-03-14
US20150317232A1 (en) 2015-11-05
CN103049373B (zh) 2015-08-19
CN103049373A (zh) 2013-04-17

Similar Documents

Publication Publication Date Title
CN103034575B (zh) 崩溃分析方法和装置
CN103049373B (zh) 一种崩溃的定位方法和装置
CN104166619B (zh) 应用程序的性能测试方法及终端
CN105468529B (zh) 一种安卓应用ui控件精准遍历方法和装置
WO2020087954A1 (zh) 抓取NVME硬盘trace的方法、装置、设备及系统
CN113608990B (zh) 终端性能检测方法、设备及存储介质
CN106155807A (zh) 一种实现资源调度的方法与设备
CN108241580B (zh) 客户端程序的测试方法及终端
CN103581185B (zh) 对抗免杀测试的云查杀方法、装置及系统
CN107223257B (zh) 测试方法、测试服务器及系统
CN108153654B (zh) 一种日志收集方法及装置
CN108508874B (zh) 一种监控设备故障的方法和装置
CN103631706B (zh) 一种浏览器测试方法和装置
CN112988503A (zh) 分析方法、分析装置、电子装置和存储介质
CN112000582A (zh) 服务端自动化测试预警方法、装置、设备及存储介质
CN103218277A (zh) 服务器环境的自动检测方法与装置
TW201723847A (zh) 應用於雲端虛擬機自動化測試環境部屬與測試之系統與方法
CN107273296A (zh) 一种软件的测试方法及测试装置
CN107562621A (zh) 确定手工测试用例与被测试代码关联关系的方法和装置
CN107153601B (zh) 单元性能测试方法及设备
CN114036012A (zh) 终端测试方法、装置、电子设备及可读存储介质
CN109086185B (zh) 一种存储集群的故障检测方法、装置、设备及存储介质
TWI796561B (zh) 具有即時中斷驗證功能的記憶體驗證系統及方法
CN111506455A (zh) 服务发布结果的查验方法及装置
CN115454819A (zh) 区块链跨链系统的测试方法、装置、设备及存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 13858622

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

WWE Wipo information: entry into national phase

Ref document number: 14648605

Country of ref document: US

122 Ep: pct application non-entry in european phase

Ref document number: 13858622

Country of ref document: EP

Kind code of ref document: A1