CN106354646B - A method of analysis dump file - Google Patents

A method of analysis dump file Download PDF

Info

Publication number
CN106354646B
CN106354646B CN201610787243.3A CN201610787243A CN106354646B CN 106354646 B CN106354646 B CN 106354646B CN 201610787243 A CN201610787243 A CN 201610787243A CN 106354646 B CN106354646 B CN 106354646B
Authority
CN
China
Prior art keywords
analysis
task
dump
file
analysis task
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610787243.3A
Other languages
Chinese (zh)
Other versions
CN106354646A (en
Inventor
朱立华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
World (beijing) Network Technology Co Ltd
Original Assignee
World (beijing) Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by World (beijing) Network Technology Co Ltd filed Critical World (beijing) Network Technology Co Ltd
Priority to CN201610787243.3A priority Critical patent/CN106354646B/en
Publication of CN106354646A publication Critical patent/CN106354646A/en
Application granted granted Critical
Publication of CN106354646B publication Critical patent/CN106354646B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3692Test management for test results analysis

Abstract

The present invention relates to a kind of methods for analyzing dump file, by obtaining the dump file generated when software collapses, and other related crash information files, send it to storage end, storage end classifies to crash information file by software module, compression, storage, then by using dump batch quantity analysis tool, it automatically opens and logs in dump downloading webpage, dump compressed package is downloaded using multi-threaded parallel, multi-threaded parallel decompressing compressed file, multi-threaded parallel analyzes dump file, it obtains reminding in time when analysis result and checks analysis result log, the analysis log checked is made marks to show difference, it avoids repeating to be checked, realize dump batch, quickly analysis, operation integration;By constantly counting the time used in each analysis process in the analysis process, the starting, stopping, maximum concurrent analysis process quantity of dump analysis process, and the state for the analysis process that timely updates effectively are controlled, the visible, controllable of dump analytic process is realized.

Description

A method of analysis dump file
Technical field
The present invention relates to information technology field, in particular to a kind of method for analyzing dump file.
Background technique
It is influenced by factors, computer software can not all more or less there is software defect, in operational process Generate collapse with avoiding.It, can be by the function of call operation system, when collecting software crash in the prior art when collapsing generation The relevant information of memory simultaneously generates crashdump file (dump), and this document is that software developer solves the problems, such as that software crash mentions Important evidence is supplied.However, being generated daily for having for the software of huge user group (such as game client) Dump is thousands of, time-consuming and laborious if analyzing these files one by one manually.
In the prior art, it by analyzing dump, generates crashdump and analyzes log, then the log is extracted out and is collapsed Foundation characteristic finally determines based on collapse foundation characteristic and collapse supplemental characteristic the dump file that final positioning is collapsed The problem of bursting.
The prior art, which has the disadvantage in that the analysis of dump, to be needed to send out dump file when first is that analyzing dump file It is sent to third-party analysis end, and in practical operation, it is also necessary to while the corresponding pdb file of dump file is sent, and pdb file is small Then tens KB, greatly then tens MB, when Network Abnormal or slower network speed, upper transmitting file is time-consuming, when directly resulting in analysis dump Between increase, analysis efficiency decline, when situation is serious, cannot obtain finally analyzing result completely;Second is that being obtained after dump analysis The processing of crashdump log be related to extracting collapse foundation characteristic, inquire version management server, query history collapses number According to the complexity such as library, redundant operation, and in practical operation, as long as software developer, which sees, generates crashdump analysis log, base Crash issue can originally be positioned;Third is that analysis state is invisible during dump analysis, lack to the flexible of analytic process Control.
Summary of the invention
For the above-mentioned deficiency of the prior art, the present invention provides a kind of methods for analyzing dump file, it is characterised in that:
S101, send crashdump file: when software collapses, the function of call operation system generates dump text Then part sends dump file storage end for dump file;
S102, receive crashdump file: dump file reception end receives the dump file that client is sent, then root According to the file received, the affiliated software module of dump file is judged, classified to it, be packaged compression, storage, in next step Analysis dump file is ready;
S103, analysis crashdump file: opening dump auto Analysis, creates a downloading task starting thread, Create an analysis task starting thread;Dump downloading webpage is automatically opened and logged in, the dump compressed package to be downloaded is selected, is Each dump compressed package creates a downloading task, is added to downloading task queue, and downloading task starts thread loops inspection It looks into and starts downloading task;When thering is downloading to complete, then starts a decompression thread, start to decompress;When thering is decompression to complete, then create One analysis task, is added to analysis task queue;Analysis task starting thread loops inspection simultaneously starts analysis process pair Dump is analyzed.
Preferably, in S102, client can also by dump file to other with collapse relevant log information or file with It sends together, to the screenshot of software interface when the log information relevant to collapse or file including but not limited to collapse File, the journal file generated before software crash, current crash module name, collapse time, OS Type.
Preferably, the S103 further includes following steps:
S201, Allocation Analysis parameter: setting analysis parameter, the path including analyzing debugger, crash file correspond to PDB text Part path, analysis destination file storing path, the dump compressed package storing path of downloading, storing path after dump decompression, most Big concurrent analysis process quantity, the user name of automated log on dump file storage end needs, password, web page address;Confidence will be matched Breath is saved in xml document;
S202, addition one or more dump compressed package: obtaining compressed package, prepares for creation decompression thread;Under opening Window is carried, preset user name, password, web page address in analysis parameter configuration is obtained when window is opened automatically, opens and automatic It logs in dump and downloads webpage, then select the one or more compressed packages to be downloaded, for each compressed package to be downloaded creation One downloading task, and be added in downloading task queue;When there is the downloading of dump compressed package to complete, one is created for it Thread is decompressed, starts to decompress;In addition to downloading new dump compressed package, the dump compressed package downloaded before can also adding, File selection window is opened, one or more dump compressed package is selected, then a decompression thread is created for each compressed package, opens Begin decompression;
S203, parallel decompression dump compressed package, obtain dump file: having created decompression thread, decompress thread according to dump Compressed package path immediately begins to decompress;Dump file save location after decompression is determined by analysis parameter configuration;It has decompressed Cheng Shi is one analysis task of each dump document creation, and is added to analysis task queue;
S204, parallel parsing dump file: analysis task start thread by the queue of circular test analysis task whether Existence is the analysis task of " inactive ", has inactive analysis task, is then marked as " in starting ", and creates one A new thread starts analysis process, by the status modifier of corresponding analysis task when process initiation is completed in new thread For " in analysis ", and start to analyze dump;Before by an analysis task labeled as " in starting ", it is also necessary to judge State is whether the quantity of the analysis task of " in analysis " has reached maximum analysis process number of concurrent in present analysis task queue, Not up to maximum concurrent analysis process number, then start analysis task, modification task status is " being completed " when analysis task is completed; Otherwise, it needs to wait the analysis task analyzed completion that can just continue to start new analysis task;
S205, control analysis task: control operation includes stopping, and is deleted, and analysis task is restarted.Selection stops Only when the task of one or more analyses analyzed or waited, the corresponding process of these analysis tasks is first terminated, then will Analysis task state is set as " cancellation ".When deleting one or more analysis tasks, it is corresponding first to terminate these analysis tasks Process, then by analysis task status modifier be " deletion ".When restarting one or more analysis tasks, this is first terminated Its task status, is then set to " not analyzing " by the corresponding analysis process of a little analysis tasks, waits analysis task starting thread again Secondary starting analysis task;
S206, check analysis result: when there is a dump analysis to complete, analysis result information is checked in prompting, this time point Hit and open the analysis result log for the crashdump file that one is not checked.
Preferably due to which a dump compressed package may include the dump compressed package or a software of multiple software modules Multiple dump compressed packages of module, when decompression, which needs recurrence to judge whether, to be compressed file and decompresses.
Preferably, other auxiliary crash infos are checked if necessary, are collapsed by the other software being collected into step S101 Log and message file when bursting, auxiliary carry out the quick positioning of crash issue, have checked that this item analyzes result log information, will It is labeled as having checked;It can also continue to check next analysis result log, when reaching the last one or first, remind It can be checked through no more analysis log.
Preferably, the S202 further includes following steps:
S301, downloading dump compressed package is determined whether to:
Compressed package is added with two ways: downloading new dump compressed package, the local existing dump compressed package of addition.This When, it can choose and download new dump compressed package, selection needs to download one or more dump compressed package;
S302, manually select existing dump compressed package: compressed package is added with two ways: downloading new dump compression Packet, the local existing dump compressed package of addition;At this point it is possible to select the local existing dump compressed package of addition, select one or Multiple existing dump compressed packages;
S303, automated log on dump storage end: when opening downloading window in dump analysis tool, from analysis parameter configuration Preset login username, password, network address are obtained in file, automatically open dump downloading webpage and are logged in, net after logining successfully All Downloadable dump compressed packages will be shown by sequencing by date in page, and login failure, then prompt can not open webpage;
S304, the one or more dump compressed packages to be downloaded are selected: is selected in dump downloading webpage one or more The dump compressed package to be downloaded clicks download button, at this point, dump, which automatically analyzes tool, intercepts and captures download button click event, and Selected dump compressed package title, the information such as compressed package date of formation are obtained, and prepare to create downloading task, start to download;
S305, a downloading task is created for each dump compressed package, and is added to downloading task queue: according to Dump compressed package storing path in the dump compression package informatin and presupposition analysis parameter information of selection, needs to download to be each Dump compressed package create a downloading task, and be added in downloading task queue, the state of all downloading tasks when initial It is all " inactive ";It is that the downloading of " inactive " is appointed that downloading task, which starts state in thread meeting circular test downloading task queue, Business, and successively start these downloading tasks, it is then " in downloading " by downloading task status modifier.
Preferably, the S204 further includes following steps:
In S401, discriminatory analysis task queue whether the stateful analysis task for " inactive ": analysis task start line Whether there is inactive analysis task in journey circulation searching analysis task queue, has inactive analysis task, then continue to judge Whether starting task condition is met;Otherwise, it needs to wait certain time (time is typically less than one second) recycling judgement;
Whether S402, current analysis task have reached maximum concurrent analysis process number: obtaining shape in analysis task queue State is the analysis task quantity of " in analysis ", and by it compared with preset maximum analysis number of processes, is no more than maximum concurrent Analysis process number, then start analysis task;Otherwise, certain time (time is typically less than one second) is waited to reattempt starting point Analysis task;
One S403, creation new thread, start analysis process in thread, start to analyze dump file, and will analysis Task status is revised as " in analysis ": the analysis task that a state is " inactive " is found in analysis task queue, by its shape State is revised as " in starting ", creates a thread, starts an analysis by the details of analysis task in thread for it Process starts to analyze dump file, and it is " in analysis " by the status modifier of analysis task, analysis task is complete that process initiation, which is completed, At when modification analysis task state be " being completed ";
S404, whether need to control analysis task: control behaviour can be carried out to analysis after analysis task starts Make, including stop being analyzing task, deletion is analyzing task, restarts stopped analysis task;If you do not need to Task is controlled, then continues cycling through the analysis task for searching that simultaneously starting state is " inactive ";Otherwise, start to appoint analysis Business carries out control operation;
S405, waiting: in order to reduce the number that thread loops attempt starting analysis process, and occupying the time of CPU, will Thread suspension is further continued for for a period of time, is the analysis task that timely starting state is " inactive ", and waiting time should be set as Less than one second.
Preferably, the S205 further includes following steps:
S501, it determines whether to stop analysis task:, can be to one or more just during dump file analysis In the executing analysis of the task, or etc., task to be analyzed or stopped analysis task are operated;
S502, it determines whether to delete analysis task:, can be to one or more just during dump file analysis In the executing analysis of the task, or etc., task to be analyzed or stopped analysis task are operated, and concrete operations include Stop analysis task, restart analysis task, deletes analysis task.
S503, restarting analysis task is determined whether to:, can be to one or more during dump file analysis A being carrying out analysis of the task, or etc. task to be analyzed or stopped analysis task are operated;
S504, judge present analysis task whether be " in analysis ":, can be to one during dump file analysis Or it is multiple be carrying out appointing for analysis and stopped, deleting, reboot operation requires first to judge present analysis in these operations The state of task whether be " in analysis ", if it is, needing first termination analysis process, otherwise, direct replacement analysis task State;
S505, the corresponding analysis process of termination analysis task: during dump file analysis, when analysis task state For " in analysis ", then it represents that the corresponding analysis process of the analysis task does not exit also, at this point, if desired stop the analysis task, Then to terminate the corresponding analysis process of the analysis task;
S506, replacement analysis task status: during dump file analysis, having selected stopping analysis task, or Delete analysis task, or restart analysis task, will first terminate the corresponding analysis process of current analysis task, then according to Selected operation updates the state of the task.
Preferably, the operation of S501 includes but is not limited to stop analysis task, restarts analysis task, deletes analysis task. Wherein, stop analysis task and first have to the corresponding analysis process of termination analysis task, then updating present analysis task status is " cancellation ";
Analysis task is deleted in S502 and first has to the corresponding analysis process of termination analysis task, then updates the analysis task State is " deletion ";
Preferably, the operation in S503 includes stopping analysis task, restarts analysis task, deletes analysis task;Restart point Analysis task first has to terminate the corresponding analysis process of present analysis task, and then updating the analysis task state is " inactive ", It waits analysis task starting thread to restart again and changes analysis task.
By implementing analysis dump method of the invention, batch, quick dump analysis can be realized, and dump is analyzed State is visible, analytic process is controllable, reduces unnecessary manual operation in analytic process, improves analysis efficiency, increase Flexibility to analytic process control, quickly positions and solves significant software defect for software developer and provide important branch Support.
Detailed description of the invention
It in order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, below will be to institute in embodiment Attached drawing to be used is needed to be briefly described, it should be apparent that, the accompanying drawings in the following description is only one recorded in the present invention A little embodiments are also possible to obtain other drawings based on these drawings for those of ordinary skill in the art.
Fig. 1 is the method flow diagram of analysis dump file according to an embodiment of the invention;
Fig. 2 is the method flow diagram of analysis dump file in accordance with another embodiment of the present invention;
Fig. 3 is the method flow diagram of analysis dump file in accordance with another embodiment of the present invention;
Fig. 4 is the method flow diagram of analysis dump file in accordance with another embodiment of the present invention;
Fig. 5 is the method flow diagram of analysis dump file in accordance with another embodiment of the present invention.
Specific embodiment
The scheme of embodiment in order to enable those skilled in the art to better understand the present invention with reference to the accompanying drawing and is implemented Mode is described in further detail the embodiment of the present invention.
Abbreviation and Key Term definition:
Dump (crashdump file): when software operation collapse, by the function of call operation system, software crash is collected When the relevant information of the memory and file of life, this file can be opened by specific purpose tool software, such as WinDbg.
PDB (Program Debug Database, program debugging database): the debugging of this document logging software and project Status information is generated for the Commissioning Analysis of application program in software translating.
KB: indicating the unit of storage volume size in computer, indicates 1024 bytes.
MB: indicating the unit of storage volume size in computer, indicates 1024KB.
Http (HyperText Transfer Protocol, hypertext transfer protocol): being that interconnection web-based applications are the widest A kind of general network protocol.All WWW files must comply with this standard.
CPU (Central Processing Unit, central processing unit): it is one piece of ultra-large integrated circuit, is one Data in the instruction of the arithmetic core and control core of platform computer, mainly interpretive machine and processing computer software.
Downloading task queue: a queue saves all downloading tasks, according to the sequence of addition, is first added under queue Load task is preferentially taken out, and each downloading task information includes downloading task number, download address, storing path, current state (it is inactive, starting in, starting failure, start successfully, cancelled, deleted, being completed, failed download).
Downloading task starts thread a: thread, is " inactive " for the state in circular test downloading task queue Downloading task, if so, then the task status is revised as " in starting ", and creates a new thread and start to download number According to;If it is not, waiting certain time, (time range is not fixed, but to ensure that inactive analysis task can quilt in time Starting, the time may be set in one second) recycling inspection downloading task queue.
Decompress thread a: thread, for call decompression tool to complete downloading or manually the dump compressed package that adds into Row recurrence decompression, and the file after decompression is stored in specified path (path is determined by the analysis configuration parameter set).
Analysis task queue: for saving all analysis tasks, according to the sequence of addition, queue is first added in a queue Analysis task preferentially taken out, each analysis mission bit stream includes analysis task number, dump file path, Commissioning Analysis device Path, analysis result log storing path, current state (it is inactive, starting in, starting failure, start successfully, cancelled, It completes, analysis failure).
Analysis task starts thread a: thread, is " inactive " for the state in circular test analysis task queue Analysis task, if so, then the task status is revised as " in starting ", and create a new thread, adjusted in thread With analysis debugger program, and analysis parameter is transmitted, start analysis process, starts to analyze dump;If it is not, waiting certain (time range is not fixed, but to ensure that inactive analysis task can be activated in time, which be may be set in one second) Time recycling checks task queue.
A specific embodiment according to the present invention, as shown in Figure 1, a kind of method for analyzing dump file:
S101, send crashdump file: when software collapses, the function of call operation system generates dump text Then part sends dump file storage end for dump file;
A preferred embodiment according to the present invention, can also be by other log informations relevant to collapse or file It sends together, to the screenshot of software interface when the log information relevant to collapse or file including but not limited to collapse File, the journal file generated before software crash, current crash module name, collapse time, OS Type;
S102, receive crashdump file: dump file reception end receives the dump file that client is sent, including its His log information relevant to collapse or file judge the affiliated software module of dump file then according to the file received, Classified to it, be packaged compression, storage, is ready for analysis dump file in next step;
S103, analysis crashdump file: opening dump auto Analysis, creates a downloading task starting thread, Create an analysis task starting thread;Dump downloading webpage is automatically opened and logged in, the dump compressed package to be downloaded is selected, is Each dump compressed package creates a downloading task, is added to downloading task queue, and downloading task starts thread loops inspection It looks into and starts downloading task;When thering is downloading to complete, then starts a decompression thread, start to decompress;When thering is decompression to complete, then create One analysis task, is added to analysis task queue;Analysis task starting thread loops inspection simultaneously starts analysis process pair Dump is analyzed.
A specific embodiment according to the present invention, the S103 further include following steps:
S201, Allocation Analysis parameter: setting analysis parameter, the path including analyzing debugger, crash file correspond to PDB text Part path, analysis destination file storing path, the dump compressed package storing path of downloading, storing path after dump decompression, most Big concurrent analysis process quantity, the user name of automated log on dump file storage end needs, password, web page address;Confidence will be matched Breath is saved in xml document;
S202, addition one or more dump compressed package: obtaining compressed package, prepares for creation decompression thread;Under opening Window is carried, preset user name, password, web page address in analysis parameter configuration is obtained when window is opened automatically, opens and automatic It logs in dump and downloads webpage, then select the one or more compressed packages to be downloaded, for each compressed package to be downloaded creation One downloading task, and be added in downloading task queue;When there is the downloading of dump compressed package to complete, one is created for it Thread is decompressed, starts to decompress;In addition to downloading new dump compressed package, the dump compressed package downloaded before can also adding, File selection window is opened, one or more dump compressed package is selected, then a decompression thread is created for each compressed package, opens Begin decompression;
S203, parallel decompression dump compressed package, obtain dump file: having created decompression thread, decompress thread according to dump Compressed package path immediately begins to decompress;Dump file save location after decompression is determined by analysis parameter configuration;It has decompressed Cheng Shi is one analysis task of each dump document creation, and is added to analysis task queue;
A specific embodiment according to the present invention, since a dump compressed package may include multiple software modules Dump compressed package or a software module multiple dump compressed packages, when decompression need recurrence judge whether be compressed file simultaneously Decompression;
S204, parallel parsing dump file: analysis task start thread by the queue of circular test analysis task whether Existence is the analysis task of " inactive ", has inactive analysis task, is then marked as " in starting ", and creates one A new thread starts analysis process, by the status modifier of corresponding analysis task when process initiation is completed in new thread For " in analysis ", and start to analyze dump;Before by an analysis task labeled as " in starting ", it is also necessary to judge State is whether the quantity of the analysis task of " in analysis " has reached maximum analysis process number of concurrent in present analysis task queue, Not up to maximum analysis process number then starts analysis task, otherwise, needs that the analysis task analyzed completion is waited just may be used To continue to start new analysis task;
S205, control analysis task: control operation includes stopping, and is deleted, and analysis task is restarted.Selection stops Only when the task of one or more analyses analyzed or waited, the corresponding process of these analysis tasks is first terminated, then will Analysis task state is set as " cancellation ".When deleting one or more analysis tasks, it is corresponding first to terminate these analysis tasks Process, then by analysis task status modifier be " deletion ".When restarting one or more analysis tasks, this is first terminated Its task status, is then set to " not analyzing " by the corresponding analysis process of a little analysis tasks, waits analysis task starting thread again Secondary starting analysis task;
S206, check analysis result: when there is a dump analysis to complete, analysis result information is checked in prompting, this time point Hit and open the analysis result log for the crashdump file that one is not checked;
A specific embodiment according to the present invention, checks other auxiliary crash infos if necessary, passes through step Log and message file, auxiliary when the other software collapse being collected into S101 carry out the quick positioning of crash issue, check Complete item analyzes result log information, is marked as having checked;It can also continue to check next analysis result log, reach most The latter or at first, prompting have more to analyze log and can check.
As shown in figure 3, a specific embodiment according to the present invention, S202 (addition dump compressed package) is specific comprising such as Lower step:
S301, downloading dump compressed package is determined whether to:
A specific embodiment according to the present invention, compressed package are added with two ways: downloading new dump compression Packet, the local existing dump compressed package of addition.At this point it is possible to select to download new dump compressed package, selection needs to download one Or multiple dump compressed packages;
S302, add existing dump compressed package manually: compressed package is added with two ways: downloading new dump compression Packet, the local existing dump compressed package of addition;At this point it is possible to select to add one or more local existing dump compressed packages;
S303, automated log on dump storage end: when opening downloading window in dump analysis tool, from analysis parameter configuration Preset login username, password, network address are obtained in file, automatically open dump downloading webpage and are logged in, net after logining successfully All Downloadable dump compressed packages will be shown by sequencing by date in page, and login failure, then prompt can not open webpage;
S304, the one or more dump compressed packages to be downloaded are selected: is selected in dump downloading webpage one or more The dump compressed package to be downloaded clicks download button, at this point, dump, which automatically analyzes tool, intercepts and captures download button click event, and Selected dump compressed package title, the information such as compressed package date of formation are obtained, and prepare to create downloading task, start to download;
S305, a downloading task is created for each dump compressed package, and is added to downloading task queue: according to Dump compressed package storing path in the dump compression package informatin and presupposition analysis parameter information of selection, needs to download to be each Dump compressed package create a downloading task, and be added in downloading task queue, the state of all downloading tasks when initial It is all " inactive ";Downloading task starts thread loops and searches the downloading task that state in downloading task queue is " inactive ", And successively start these downloading tasks, it is then " in downloading " by downloading task status modifier.
As shown in figure 4, a specific embodiment according to the present invention, S204 (parallel parsing dump file) specifically include Following steps:
In S401, discriminatory analysis task queue whether the stateful analysis task for " inactive ": analysis task start line Whether there is inactive analysis task in journey circulation searching analysis task queue, has inactive analysis task, then continue to judge Whether starting task condition is met;Otherwise, it needs that certain time (time is typically less than one second) recycling is waited to search.
Whether S402, current analysis task have reached maximum analysis process number: the state in analysis task queue that obtains is The analysis task quantity of " in analysis ", and it is no more than maximum concurrent compared with preset maximum concurrent analysis process quantity Analysis process number, then start analysis task;Otherwise, certain time (time is typically less than one second) is waited to reattempt starting Analysis task.
One S403, creation new thread, start analysis process in thread, start to analyze dump file, and will analysis Task status is revised as " in analysis ": the analysis task that a state is " inactive " is found in analysis task queue, by its shape State is revised as " in starting ", creates a thread, starts an analysis by the details of analysis task in thread for it Process starts to analyze dump file, and process initiation is completed, and is " in analysis " by the status modifier of analysis task;
S404, whether need to control analysis task: control behaviour can be carried out to analysis after analysis task starts Make, including stop being analyzing task, deletion is analyzing task, restarts stopped analysis task;If you do not need to Task is controlled, then continues cycling through the analysis task for searching that simultaneously starting state is " inactive ";Otherwise, start to appoint analysis Business carries out control operation;
S405, waiting: in order to reduce the number that thread loops attempt starting analysis process, and occupying the time of CPU, will Thread suspension is further continued for for a period of time, is the analysis task that timely starting state is " inactive ", and waiting time should be set as Less than one second.
As shown in figure 5, a specific embodiment according to the present invention, S205 (controlling analytic process) is specifically wrapped Containing following steps:
S501, it determines whether to stop analysis task:, can be to one or more just during dump file analysis In the executing analysis of the task, or etc., task to be analyzed or stopped analysis task are operated;
A specific embodiment according to the present invention, the operation include but is not limited to stop analysis task, are restarted point Analysis task deletes analysis task.Wherein, stop analysis task first having to terminate the analysis process being currently executing, then more New present analysis task status is " cancellation ";
S502, it determines whether to delete analysis task:, can be to one or more just during dump file analysis In the executing analysis of the task, or etc., task to be analyzed or stopped analysis task are operated, and concrete operations include Stop analysis task, restart analysis task, deletes analysis task.
A specific embodiment according to the present invention deletes analysis task and first has to terminate the analysis being currently executing Process, then updating the analysis task state is " deletion ";
S503, restarting analysis task is determined whether to:, can be to one or more during dump file analysis A being carrying out analysis of the task, or etc. task to be analyzed or stopped analysis task are operated;
A specific embodiment according to the present invention, the operation include stopping analysis task, restart analysis task, delete Except analysis task.
A specific embodiment according to the present invention restarts analysis task and first has to terminate the analysis being currently executing Process, then updating the analysis task state is " inactive ", and analysis task starting thread is waited to restart again the analysis Task;
S504, judge present analysis task whether be " in analysis ":, can be to one during dump file analysis Or it is multiple be carrying out appointing for analysis and stopped, deleting, reboot operation requires first to judge present analysis in these operations The state of task whether be " in analysis ", if it is, needing first termination analysis process, otherwise, direct replacement analysis task State;
S505, the corresponding analysis process of termination analysis task: during dump file analysis, when analysis task state For " in analysis ", then it represents that the corresponding analysis process of the analysis task does not exit also, at this point, if desired stop the analysis task, Then to terminate the corresponding analysis process of the analysis task;
S506, replacement analysis task status: during dump file analysis, having selected stopping analysis task, or Delete analysis task, or restart analysis task, will first terminate the corresponding analysis process of current analysis task, then according to Selected operation updates the state of the task.
A specific embodiment according to the present invention, for the analysis task to be stopped, then updating its state is " to have taken Disappear ".For the analysis task to be deleted, then updating its state is " deletion ".Needs are restarted, then update its shape State is " inactive ".
A kind of method for analyzing dump file provided by the present invention has following advantageous effects: batch quickly divides Dump file is analysed, dump analysis efficiency is improved;By making analytic process as it can be seen that controllably, increasing to analytic process control Flexibility.
All the embodiments in this specification are described in a progressive manner, same and similar portion between each embodiment Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.The foregoing is merely this The preferred embodiment of invention, is not intended to limit the invention, all within the spirits and principles of the present invention, made any to repair Change, equivalent replacement, improvement etc., should all be included in the protection scope of the present invention.

Claims (8)

1. a kind of method for analyzing dump file, it is characterised in that:
S101, send crashdump file: when software collapses, the function of call operation system generates dump file, so Dump file storage end is sent by dump file afterwards;
S102, receive crashdump file: dump file reception end receives the dump file that client is sent, and then basis connects The file received judges the affiliated software module of dump file, is classified to it, is packaged compression, storage, to analyze in next step Dump file is ready;
S103, analysis crashdump file: opening dump auto Analysis, creates a downloading task starting thread, creation One analysis task starts thread;Dump downloading webpage is automatically opened and logged in, the dump compressed package to be downloaded is selected, is each Dump compressed package creates a downloading task, is added to downloading task queue, and downloading task starts thread loops inspection simultaneously Start downloading task;When thering is downloading to complete, then starts a decompression thread, start to decompress;When thering is decompression to complete, then one is created Analysis task is added to analysis task queue;Analysis task starting thread loops inspection simultaneously starts analysis process to dump It is analyzed;
In S102, client by dump file to other with collapse relevant log information or file with send together, it is described with It collapses relevant log information or file includes but is not limited to screenshot file when collapsing to software interface, before software crash The journal file of generation, current crash module name, collapse time, OS Type;
The S103 further includes following steps:
S201, Allocation Analysis parameter: setting analysis parameter, the path including analyzing debugger, crash file correspond to PDB file road Diameter analyzes destination file storing path, and the dump compressed package storing path of downloading, storing path after dump decompression, maximum is simultaneously Send out analysis process quantity, the user name of automated log on dump file storage end needs, password, web page address;Configuration information is protected It is stored in xml document;
S202, addition one or more dump compressed package: obtaining compressed package, prepares for creation decompression thread;Open downloading window Mouthful, preset user name, password, web page address in analysis parameter configuration, opening and automated log on are obtained when window is opened automatically Dump downloads webpage, then selects the one or more compressed packages to be downloaded, creates one for each compressed package to be downloaded Downloading task, and be added in downloading task queue;When there is the downloading of dump compressed package to complete, a decompression is created for it Thread starts to decompress;In addition to downloading new dump compressed package, the dump compressed package also downloaded before addition opens file Window is selected, one or more dump compressed package is selected, then a decompression thread is created for each compressed package, starts to decompress;
S203, parallel decompression dump compressed package, obtain dump file: having created decompression thread, decompression thread is compressed according to dump Path is wrapped, immediately begins to decompress;Dump file save location after decompression is determined by analysis parameter configuration;Decompression is completed When, it is one analysis task of each dump document creation, and be added to analysis task queue;
S204, parallel parsing dump file: analysis task starting thread in the queue of circular test analysis task by whether there is State is the analysis task of " inactive ", has inactive analysis task, is then marked as " in starting ", and creates one newly Thread, start analysis process in new thread, be by the status modifier of corresponding analysis task when process initiation is completed " point In analysis ", and start to analyze dump;Before by an analysis task labeled as " in starting ", it is also necessary to which judgement is current State is whether the quantity of the analysis task of " in analysis " has reached maximum analysis process number of concurrent in analysis task queue, does not reach To maximum analysis process number, then start analysis task, otherwise, needs that the analysis task analyzed completion is waited just to continue to open Move new analysis task;
S205, control analysis task: control operation includes stopping, and is deleted, and analysis task is restarted;Selection stops one When the task of a or multiple analyses analyzed or waited, the corresponding process of these analysis tasks is first terminated, it then will analysis Task status is set as " cancellation ";When deleting one or more analysis tasks, first to terminate these analysis tasks it is corresponding into Then analysis task status modifier is " deletion " by journey;When restarting one or more analysis tasks, these points are first terminated Then its task status is set to " not analyzing " by the corresponding analysis process of analysis task, analysis task starting thread is waited to open again Move the analysis task;
S206, check analysis result: when there is a dump analysis to complete, analysis result information is checked in prompting, is clicked at this time simultaneously Open the analysis result log of a crashdump file that do not check.
2. a kind of method for analyzing dump file as described in claim 1, it is characterised in that:
Since a dump compressed package includes the dump compressed package of multiple software modules or multiple dump of a software module Compressed package, when decompression, which needs recurrence to judge whether, to be compressed file and decompresses.
3. a kind of method for analyzing dump file as claimed in claim 2, it is characterised in that:
Check other auxiliary crash infos if necessary, log when being collapsed by the other software that are collected into step S101 and Message file, auxiliary carry out the quick positioning of crash issue, have checked that this item analyzes result log information, have been marked as having looked into It sees;Continue to check next analysis result log, when reaching the last one or first, day is not analyzed in prompting more Will can check.
4. a kind of method for analyzing dump file as claimed in claim 3, it is characterised in that:
The S202 further includes following steps:
S301, downloading dump compressed package is determined whether to:
Compressed package is added with two ways: downloading new dump compressed package, the local existing dump compressed package of addition;At this point, New dump compressed package is downloaded in selection, and selection needs to download one or more dump compressed package;
S302, add existing dump compressed package manually: compressed package is added with two ways: downloading new dump compressed package, adds Add local existing dump compressed package;At this point, the local existing dump compressed package of selection addition, selects one or more existing Dump compressed package;
S303, automated log on dump storage end: when opening downloading window in dump analysis tool, from analysis parameter configuration files It is middle to obtain preset login username, password, network address, it automatically opens dump downloading webpage and logs in, login successfully in rear webpage It will show all Downloadable dump compressed packages by sequencing by date, login failure, then prompt can not open webpage;
S304, the one or more dump compressed packages to be downloaded are selected: in dump downloading webpage selection one or more will under The dump compressed package of load clicks download button, at this point, dump, which automatically analyzes tool, intercepts and captures download button click event, and obtains Selected dump compressed package title, compressed package date of formation information, and prepare to create downloading task, it is added to downloading task team Column, start to download;
S305, a downloading task is created for each dump compressed package, and is added to downloading task queue: according to selection Dump compression package informatin and presupposition analysis parameter information in dump compressed package storing path, each needs download Dump compressed package creates a downloading task, and is added in downloading task queue, and the state of all downloading tasks is all when initial It is " inactive ";Downloading task starts the downloading task that state in thread meeting circular test downloading task queue is " inactive ", And successively start these downloading tasks, it is then " in downloading " by downloading task status modifier.
5. a kind of method for analyzing dump file as claimed in claim 4, it is characterised in that:
The S204 further includes following steps:
In S401, discriminatory analysis task queue whether the stateful analysis task for " inactive ": analysis task starting thread follow Ring searches in analysis task queue whether have inactive analysis task, has inactive analysis task, then continues to determine whether Meet starting task condition;Otherwise, it needs to wait certain time, which is the recycling judgement less than one second;
Whether S402, current analysis task have reached maximum analysis process number: the state in analysis task queue that obtains is " analysis In " analysis task quantity be no more than maximum analysis process number, then and by it compared with preset maximum analysis number of processes Start analysis task;Otherwise, certain time is waited, which is to reattempt starting analysis task less than one second;
One S403, creation new thread, start analysis process in thread, start to analyze dump file, and by analysis task Status modifier is " in analysis ": the analysis task that a state is " inactive " is found in analysis task queue, by its status maintenance It is changed to " in starting ", creates a thread, start an analysis process by the details of analysis task in thread for it, Start to analyze dump file, process initiation is completed, and is " in analysis " by the status modifier of analysis task;
S404, whether need to control analysis task: control operation being carried out to analysis after analysis task starts, including is stopped It is only analyzing task, deletion is analyzing task, restarts stopped analysis task;If you do not need to being carried out to task Control, then continue cycling through judge, searches simultaneously starting state as " inactive " analysis task;Otherwise, start to analysis task into Row control operation;
S405, waiting: in order to reduce the number that thread loops attempt starting analysis process, and the time of CPU is occupied, by thread It hangs up and is further continued for for a period of time, be the analysis task that timely starting state is " inactive ", waiting time should be set smaller than One second.
6. a kind of method for analyzing dump file as claimed in claim 5, it is characterised in that:
The S205 further includes following steps:
S501, it determines whether to stop analysis task: during dump file analysis, one or more being carrying out point The task of analysis, or etc. task to be analyzed or stopped analysis task are operated;
S502, it determines whether to delete analysis task: during dump file analysis, one or more being carrying out point The task of analysis, or etc. task to be analyzed or stopped analysis task are operated, concrete operations include stopping analysis Task restarts analysis task, deletes analysis task;
S503, it determines whether to restarting analysis task: during dump file analysis, one or more being held The task of row analysis, or etc. task to be analyzed or stopped analysis task are operated;
S504, judge present analysis task whether be " in analysis ": during dump file analysis, to it is one or more just Stopped in appointing for execution analysis, deleted, reboot operation requires the shape for first judging present analysis task in these operations State whether be " in analysis ", if it is, needing first termination analysis process, otherwise, the state of direct replacement analysis task;
S505, the corresponding analysis process of termination analysis task: during dump file analysis, when analysis task state is " in analysis ", then it represents that the corresponding analysis process of the analysis task does not exit also, at this point, if desired stopping the analysis task, then Terminate the corresponding analysis process of the analysis task;
S506, replacement analysis task status: during dump file analysis, stopping analysis task having been selected, or delete Analysis task, or restart analysis task, the corresponding analysis process of current analysis task will be first terminated, then according to selected The operation selected updates the state of the task.
7. a kind of method for analyzing dump file as claimed in claim 6, it is characterised in that:
The operation of S501 includes but is not limited to stop analysis task, restarts analysis task, deletes analysis task;Wherein, stop dividing Analysis task first has to the corresponding analysis process being carrying out of termination analysis task, then updates present analysis task status and is " cancellation ";
Analysis task is deleted in S502 to first have to terminate the analysis process being currently executing, and then updates the analysis task state For " deletion ".
8. a kind of method for analyzing dump file as claimed in claim 7, it is characterised in that:
Operation in S503 includes stopping analysis task, restarts analysis task, deletes analysis task;
Restart analysis task and first have to the corresponding analysis process being carrying out of termination analysis task, then updates the analysis task State is " inactive ", waits analysis task starting thread to restart again and changes analysis task.
CN201610787243.3A 2016-08-30 2016-08-30 A method of analysis dump file Active CN106354646B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610787243.3A CN106354646B (en) 2016-08-30 2016-08-30 A method of analysis dump file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610787243.3A CN106354646B (en) 2016-08-30 2016-08-30 A method of analysis dump file

Publications (2)

Publication Number Publication Date
CN106354646A CN106354646A (en) 2017-01-25
CN106354646B true CN106354646B (en) 2018-12-25

Family

ID=57857520

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610787243.3A Active CN106354646B (en) 2016-08-30 2016-08-30 A method of analysis dump file

Country Status (1)

Country Link
CN (1) CN106354646B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11841788B2 (en) 2021-06-10 2023-12-12 International Business Machines Corporation Self-optimizing analysis system for core dumps

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109086125B (en) * 2017-06-14 2021-01-22 杭州海康威视数字技术股份有限公司 Picture analysis method, device and system, computer equipment and storage medium
CN109062718B (en) * 2018-07-12 2021-08-17 联想(北京)有限公司 Server and data processing method
CN111125015B (en) * 2019-12-20 2023-04-14 北京百度网讯科技有限公司 Method, apparatus, terminal and medium for dump file classification
CN111314437B (en) * 2020-01-20 2021-10-15 腾讯科技(深圳)有限公司 Resource package downloading method and device, storage medium and electronic device
CN112463343B (en) * 2020-12-16 2023-09-26 广州博冠信息科技有限公司 Restarting method and device of business process, storage medium and electronic equipment
CN112988503A (en) * 2021-02-05 2021-06-18 深圳市锐尔觅移动通信有限公司 Analysis method, analysis device, electronic device, and storage medium
CN115865905B (en) * 2023-02-21 2023-06-13 深圳依时货拉拉科技有限公司 Method, apparatus, computer device and computer readable storage medium for downloading compressed package

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101719090A (en) * 2009-12-25 2010-06-02 珠海市君天电子科技有限公司 Method for automatically analyzing crash cause of computer software system
CN101944059A (en) * 2010-08-20 2011-01-12 北京神州泰岳软件股份有限公司 Automatic analysis method and device of crash information of computer software
CN103077108A (en) * 2013-01-07 2013-05-01 北京奇虎科技有限公司 Method and system for warning browser crash
CN103544071A (en) * 2012-07-17 2014-01-29 阿里巴巴集团控股有限公司 Processing method, device and system of collapse information
CN103678109A (en) * 2012-09-25 2014-03-26 腾讯科技(深圳)有限公司 Dump document analysis method, device and system
CN103678091A (en) * 2013-12-19 2014-03-26 北京奇虎科技有限公司 Method and device for processing crash data of application software
WO2016121077A1 (en) * 2015-01-30 2016-08-04 株式会社日立製作所 Dump file generation method and dump file generation device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101719090A (en) * 2009-12-25 2010-06-02 珠海市君天电子科技有限公司 Method for automatically analyzing crash cause of computer software system
CN101944059A (en) * 2010-08-20 2011-01-12 北京神州泰岳软件股份有限公司 Automatic analysis method and device of crash information of computer software
CN103544071A (en) * 2012-07-17 2014-01-29 阿里巴巴集团控股有限公司 Processing method, device and system of collapse information
CN103678109A (en) * 2012-09-25 2014-03-26 腾讯科技(深圳)有限公司 Dump document analysis method, device and system
CN103077108A (en) * 2013-01-07 2013-05-01 北京奇虎科技有限公司 Method and system for warning browser crash
CN103678091A (en) * 2013-12-19 2014-03-26 北京奇虎科技有限公司 Method and device for processing crash data of application software
WO2016121077A1 (en) * 2015-01-30 2016-08-04 株式会社日立製作所 Dump file generation method and dump file generation device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11841788B2 (en) 2021-06-10 2023-12-12 International Business Machines Corporation Self-optimizing analysis system for core dumps

Also Published As

Publication number Publication date
CN106354646A (en) 2017-01-25

Similar Documents

Publication Publication Date Title
CN106354646B (en) A method of analysis dump file
US9652509B2 (en) Prioritization of continuous deployment pipeline tests
US7366706B2 (en) Method and apparatus for solution-template based deployment and management of an integration solution
US8707310B2 (en) Batch processing of jobs on multiprocessors based on estimated job processing time
US10817819B2 (en) Workflow compilation
EP2674859A2 (en) Computing system, method for controlling thereof, and computer-readable recording medium having computer program for controlling thereof
CN108279922A (en) Differential file generation method, upgrade method and system based on the differential file
CN107797823B (en) Business rule management method and device, storage medium and computer equipment
CN110673923A (en) XWIKI system configuration method, system and computer equipment
CN108829430A (en) Java Web project update method and relevant apparatus based on Eclipse and Tomcat
CN116166525A (en) Method and device for generating test script
CN111352612A (en) Scheduling method and device for code deployment, electronic equipment and storage medium
WO2014049854A1 (en) Computer system and program
CN103500109A (en) Method and device for achieving file collection and software package automatic installation
JP4964352B2 (en) Software library reconstruction apparatus and method, and navigation apparatus using the same
CN116578497A (en) Automatic interface testing method, system, computer equipment and storage medium
CN111858489B (en) Multi-source heterogeneous spatial data archiving method based on self-adaptive metadata template
CN111061642B (en) Full-automatic competition data processing system and method based on user data
US20210349808A1 (en) Source quality check service
CN111427770B (en) Resource testing method and related equipment
JP2005310173A (en) Remote installation system and method
JP4005605B2 (en) Vehicle quality analysis system, multiple data management method and program thereof
CN113590179A (en) Plug-in detection method and device, electronic equipment and storage medium
CN110780983A (en) Task exception handling method and device, computer equipment and storage medium
CN112269739A (en) Webpage testing method and device, equipment and medium thereof

Legal Events

Date Code Title Description
C06 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