DIAGNOSING APPLICATION PROBLEMS BY LEARNING FROM FAULT INJECTIONS

Information

  • Patent Application
  • 20210397538
  • Publication Number
    20210397538
  • Date Filed
    June 19, 2020
    4 years ago
  • Date Published
    December 23, 2021
    2 years ago
Abstract
Identifying a likely cause of a problem in an application can include: injecting a series of a set of predetermined faults into the application; sampling a subset of a set of training features from the application during each predetermined fault injected into the application and labeling each subset with an identifier of the corresponding predetermined fault; and training a classifier to identify the likely cause by associating a set of real-time features sampled from the application that pertain to the problem to one or more of the predetermined faults in response to the training features.
Description
BACKGROUND

An application, e.g., an enterprise software-as-a-service application, can suffer a variety of faults which users of the application can experience as slow or unresponsive service. For example, users of an application can experience slow or unresponsive service when one or more resources that underly the application fail or become overloaded.


Application support personnel can diagnose a problem in an application by employing guesswork or manually examining the logs of the underlying resources of the application one by one until a likely cause of the problem is found. Such intuitive manual trial and error methods for diagnosing a problem can consume time, cost money, and annoy users of an application.


SUMMARY

In general, in one aspect, the invention relates to a diagnostic service for identifying a likely cause of a problem in an application. The diagnostic service can include: a classifier that selects the likely cause from among a set of predetermined faults that may occur when running the application by associating a set of real-time features sampled from the application and that pertain to the problem to each predetermined fault; and a learning service that trains the classifier to associate the real-time features to the predetermined faults using a set of training features obtained by injecting each predetermined fault into the application and sampling a respective subset of the training features during each predetermined fault injected and by labeling each respective subset sampled with the respective predetermined fault.


In general, in another aspect, the invention relates to a method for identifying a likely cause of a problem in an application. The method can include: injecting a series of a set of predetermined faults into the application; sampling a subset of a set of training features from the application during each predetermined fault injected into the application and labeling each subset with an identifier of the corresponding predetermined fault; and training a classifier to identify the likely cause by associating a set of real-time features sampled from the application that pertain to the problem to one or more of the predetermined faults in response to the training features.


Other aspects of the invention will be apparent from the following description and the appended claims.





BRIEF DESCRIPTION OF THE DRAWINGS

Embodiments of the present invention are illustrated by way of example, and not by way of limitation, in the figures of the accompanying drawings and in which like reference numerals refer to similar elements.



FIG. 1 illustrates a diagnostic service that identifies a likely cause of a problem in an application in one or more embodiments.



FIG. 2 shows an embodiment of a diagnostic service that includes a diagnostic interface that enables a user to provide feedback pertaining to a diagnosed likely cause.



FIG. 3 illustrates an example embodiment in which an application under diagnosis is a software as a service that is accessible online via a public network.



FIG. 4 illustrates how to sample a set of real-time features of a problem in an application in one or more embodiments.



FIGS. 5 through 7 illustrate how to obtain a set of labeled training features for training a classifier to diagnose an application in one or more embodiments.



FIGS. 8A-8B illustrate refinement of real-time and training features in one or more embodiments.



FIG. 9 illustrates an ensemble of local classifiers in one or more embodiments.



FIG. 10 illustrates training an ensemble of local classifiers in one or more embodiments.



FIG. 11 illustrates a method for identifying a likely cause of a problem in an application in one or more embodiments.



FIG. 12 illustrates a computing system upon which portions of a diagnostic service can be implemented.





DETAILED DESCRIPTION

Reference will now be made in detail to the various embodiments of the present disclosure, examples of which are illustrated in the accompanying drawings. Like elements in the various figures are denoted by like reference numerals for consistency. While described in conjunction with these embodiments, it will be understood that they are not intended to limit the disclosure to these embodiments. On the contrary, the disclosure is intended to cover alternatives, modifications and equivalents, which may be included within the spirit and scope of the disclosure as defined by the appended claims. Furthermore, in the following detailed description of the present disclosure, numerous specific details are set forth in order to provide a thorough understanding of the present disclosure. However, it will be understood that the present disclosure may be practiced without these specific details. In other instances, well-known methods, procedures, components, have not been described in detail so as not to unnecessarily obscure aspects of the present disclosure.



FIG. 1 illustrates a diagnostic service 100 in one or more embodiments. The diagnostic service 100 identifies a likely cause 124 of a problem 112 in an application 110. Examples of the problem 112 include slow response times experienced by users of the application 110, system unavailability experienced by users of the application 110, etc.


The diagnostic service 100 includes a classifier 120 that selects the likely cause 124 from among a set of predetermined faults p1-pN that may occur when running the application 110. The predetermined faults p1-pN can pertain to resources underlying the application 110. Examples of resources that can underly the application 110 include processors, servers, communication mechanisms, storage mechanisms, etc. The resources that underly the application 110 can include any number and arrangement of real resources, e.g., storage drives, network adapters, and virtual resources, e.g., cloud storage, virtual machines.


The classifier 120 associates a set of real-time features 114 sampled from the application 110 and that pertain to the problem 112 to each predetermined fault p1-pN. In one or more embodiments, the classifier 120 includes a set of learned logic, e.g., a neural network, that maps the values of the real-time features 114 as inputs to a respective correlation value for each of the predetermined faults p1-pN as outputs.


In one or more embodiments, the real-time features 114 are sampled from logs normally maintained for the application 110, e.g., usage logs, event logs, error logs, statistical logs, etc. For example, the real-time features 114 can be sampled from respective logs pertaining to processors, servers, communication mechanisms, storage mechanisms, etc., both real and virtual, that underly the application 110.


In one or more embodiments, the real-time features 114 correspond to a time window associated with problem 112. For example, timestamps recorded in the resource logs that underly the application 110 can be used to sample the features that correspond to the time of the problem 112.


The diagnostic service 100 includes a learning service 122 that uses a set of training features 126 labeled with the predetermined faults p1-pN to train the classifier 120. The training features 126 are obtained by injecting each predetermined fault p1-pN into the application 110 and sampling a respective subset of the training features 126 during each predetermined fault p1-pN injected and by labeling each respective subset of the training features 126 sampled with the respective predetermined fault p1-pN.


In one or more embodiments, the training features 126 are sampled from logs normally maintained for the application 110, e.g., event logs, error logs, statistical logs, etc., during a time window that corresponds to the injections of the respective predetermined fault p1-pN. For example, the training features 126 can be sampled from logs pertaining to processors, servers, communication mechanisms, storage mechanisms, etc., both real and virtual, that underly the application 110.


In one or more embodiments, the learning service 122 trains the classifier 120 using supervised learning from the labeled data of the training features 126. Examples of supervised learning in various embodiments include Random Forest, XGBoost, and deep learning algorithms involving Convolutional Neural Networks (CNN). For example, the learning service 122 can derive the parameters of a neural network by learning from the training features 126.


In one or more embodiments, the likely cause 124 is a list of one or more of the predetermined faults p1-pN determined by the classifier 120 to have the highest correlations to the real-time features 114. The list of the likely cause 124 can include a confidence indicator pertaining to each identified one of the predetermined faults p1-pN.



FIG. 2 shows an embodiment of the diagnostic service 100 that includes a diagnostic interface 220 that enables a user 216 of the diagnostic service 100 to provide a feedback 224 pertaining to the likely cause 124. The feedback 224 in one or more embodiments can include a set of new features sampled from the application 110. The new features of the feedback 224 can include a true fault identified by the user 216 from among the predetermined faults p1-pN. The true fault can be identical to or different from the likely cause 124 identified by the classifier 120 or can be a new fault pN+1. The learning system 122 updates the training of the problem classier 120 in response to the feedback 224.



FIG. 3 illustrates an example embodiment in which the application 110 is a software as a service that is accessible online via a public network 310. For example, a set of users 300-303 of the application 110 may be users associated with one or more enterprises who access the application 110, an enterprise application, using internet communication.


The application 110 in this example employs a set of resources R1-Rn while servicing the users 300-303. The resources R1-Rn can include any number and arrangement of, e.g., processor resources, server resources, communication resources, storage resources, etc., with any arrangement of real and virtual resources.


Examples of the predetermined faults p1-pN associated with the resources R1-Rn include a disk filling up, a network partition down, a host down, a storage volume unmounted, a resource bottleneck, a load spike, etc., which are commonly occurring faults in an enterprise application. In the examples below, the resource R1 is a storage resource and the fault p1 is “disk filling up”, the resource R2 is a network resource and the fault p2 is “network partition”, and the resource Rn is a host resource and the fault pN is “host down”.


The user 216 of the diagnostic service 100 obtains a report of the problem 112 via, e.g., one or more messages on the public network 310, and then uses the diagnostic service 100 or other software support service to sample the real-time features 114 via the public network 310. The diagnostic service 100, in turn, presents the likely cause 124 rendered by the classifier 120 in response to the real-time features 114 to the user 216. In some embodiments, the user 216 can access the diagnostic service 100 via the public network 310.


An example of the likely cause 124 presented to the user 216 is a list that includes “disk filling up, 75%”, “volume unmounted, 20%”, load spike, 4%”, where the percentages indicate confidence levels with higher numbers indicating higher confidence based on the training of the classifier 120. The user 216 can provide feedback if, e.g., after investigation, the problem 112 turns out to have been caused by the load spike or some new fault not included in the predetermined faults p1-pN. The user 216 can sample new features from the logs of the resources R1-Rn or from the logs of a new resource so that the training of the classifier 120 can be updated accordingly.



FIG. 4 illustrates how to sample the real-time features 114 of the problem 112 in one or more embodiments. The sampling shown can performed by a person responsible for troubleshooting the problem 112, e.g., the user 216, who can be a software support specialist for the application 110. In some embodiments, the sampling shown can be performed automatically, e.g., by a functionality implemented in the diagnostic service 100, when the problem 112 is reported to the user 216 of the diagnostic service 100.


The real-time features 114 are obtained by sampling S sets of F features for each of the resources R1-Rn from one or more respective logs maintained for the resources R1-Rn. The F features sampled can be real numbers extracted from any of the metrices, events, indicators, etc., normally maintained for the resource R1. The S sets for R1-R3 are sampled for a time window TPROBLEM encompassing an occurrence of the problem 112.



FIGS. 5 through 7 illustrate how to obtain the training features 126 in one or more embodiments. The training features 126 can be obtained, e.g., in a development or staging environment for the application 110 during which time a set of simulated user accesses 510 are applied to the application 110.


The simulated user accesses 510 depend on the nature of the application 110. For example, if the application 110 is a payroll application, the simulated user accesses 510 can include simulated payroll data inputs, outputs, reports, etc., for a large number of simulated users of the payroll application.



FIG. 5 illustrates how to obtain the training features 126 that correspond to an injection of the fault p1 into the application 110 during a time window T1SIMULATE. The fault p1 can be injected by, e.g., simulating a disk filling up condition in the disk access code of the resource R1.


The training features 126 that correspond to the injection of the fault p1 are obtained by sampling S sets of F features of each resource R1-Rn from one or more logs maintained for the resources R1-Rn for the time window T1SIMULATE that encompasses the injection of the fault p1. The features sampled for the time window T1SIMULATE can be real numbers extracted from any of the metrices, events, indicators, etc., normally maintained for the resources R1-Rn. Each of the S sets sampled for each R1-Rn are labeled p1 for inclusion in the training features 126.



FIG. 6 illustrates how to obtain the training features 126 that correspond to an injection of the fault p2 into the application 110 during a time window T2SIMULATE. The fault p2 can be injected by, e.g., simulating a network partition in the code of the resource R2.


The training features 126 that correspond to the injection of the fault p2 are obtained by sampling S sets of F features of each resource R1-Rn from one or more logs maintained for the resources R1-Rn for the time window T2SIMULATE that encompasses the injection of the fault p2 and labeling each of the S sets sampled for each R1-Rn with p2 for inclusion in the training features 126.



FIG. 7 illustrates how to obtain the training features 126 that correspond to an injection of the fault pN into the application 110 during a time window TNSIMULATE. The fault pN can be injected by, e.g., simulating a host down in the code of the resource Rn.


The training features 126 that correspond to the injection of the fault pN are obtained by sampling S sets of F features of each resource R1-Rn from one or more logs maintained for the resources R1-Rn for the time window TNSIMULATE that encompasses the injection of the fault pN and labeling each of the S sets sampled for each R1-Rn with PN for inclusion in the training features 126.



FIGS. 8A-8B illustrate a feature pre-processor 820 in one or more embodiments of the diagnostic service 100. The feature pre-processor 820 refines the raw labeled data sampled from the resources R1-Rn during fault injection and real-time problem diagnosis. FIG. 8A illustrates how the feature pre-processor 820 refines the real-time features 114 into a set of refined features 814 for classification by the classifier 120. FIG. 8B illustrates how the feature pre-processor 820 refines the training features 126 into a set of refined features 824 for use by the learning service 122 to train the classifier 120.


In one or more embodiments, the feature pre-processor 820 refines S sets of F features of raw labeled data by determining a missing value (∃s,f∥Xp(s,f)custom-character∧(0≤s<S)∧(0≤f<F) in the column vector Xp(*,f) where f specifies the feature using linear interpolation. For example, if Xp(3,2) is missing for feature 2, the tuples custom-charactera,Xp(a,2)custom-character and custom-characterb,Xp(b,2)custom-character can be used to create a line by finding max(a) such that ∃a∥(0≤a<3)∧(Xp(a,2)custom-character) and min(b) such that ∃b∥(3<b<S)∧(Xp(b,2)custom-character). The values along that line are estimates for the samples between those tuples. The estimated value for sample 3 is assigned to Xp(3,2). If an a or b does not exist, the value from the nearest samples is assigned. If all values in a column vector Xp(*,f) are missing for feature f, zeros are assigned to Xp(*,f).


In one or more embodiments, the feature pre-processor 820 refines S sets of F features of raw labeled data by aggregating multiple instances of a resource type into one feature. The function Z(Xp(s,*))m,z returns a vector of values from sample s for features with metric m and resource type z. The values Z(Xp(s,*))m,zcustom-character are combined by applying the minimum, maximum, and mean to Z(Xp(s,*))m,z. The result from each statistical operation Z(Xp(s,*))m,zcustom-character1×F→(Z(Xp(s,*))m,z).stat becomes a new feature in Xp, while the old features with the metric m and resource type z are removed. The above steps are repeated for all s,m,z. After aggregation, the dimensions of the feature matrix Xp changes to SxF{circumflex over ( )}. The new features are impervious to resource scaling and preserve the format of the feature vector for any number of instances added or removed.


In one or more embodiments, the feature pre-processor 820 refines S sets of F features of raw labeled data by multi-grain scanning to create new features based on historical data. A window of W×F size captures W samples for F features. The window steps through the samples in the feature matrix Xpcustom-characterS×F at a granularity L. For example, the window starts at sample S−1 and moves to sample (S−1)−L for the first step and then to sample (S−1)−2L for the second step. In general, the window moves to sample (S−1)−tL for the tth step. Each step takes W samples within the window and creates a feature vector npcustom-character1×(w×F) of length W×F in the new feature matrix Np. Multi-grain scanning flattens the window to increase the number of features by W times the original number of features. The scanning process continues until the window reaches the last real valued sample in Np. Any non-real valued samples within the window are assigned zero. Once the multi-grain scanning process completes, the new feature matrix is Npcustom-characterS×(W×F) and replaces the original feature matrix Xp.


In one or more embodiments, the feature pre-processor 820 refines S sets of F features of raw labeled data by Z-score normalization in which the magnitude and the mean for the values of a feature are normalized using z-score. Z-score normalization reduces the error in model training and inference by transforming the values for a feature to the number of standard deviations from the mean. Z-score normalization is applied to each feature f such that Xp(*,f)custom-characterS×1→(Xp(*,f)).zscore. The offline version computes the z-score using the mean and standard deviation of the collected data. The online version computes the z-score by tracking the running mean and the estimated running standard deviation to have similar reduction in model error.



FIG. 9 illustrates an embodiment in which the classifier 120 includes an ensemble of local classifiers 920-1 through 920-n, each respectively adapted to classifying respective local sets of real-time features 914-1 through 914-n sampled respectively from the resources R1-Rn of the application 110. For example, the real-time features 914-1 are features sampled from the resource R1 during TPROBLEM, and the real-time features 914-2 are features sampled from the resource R2 during TPROBLEM.


The local classifiers 920-1 through 920-n determine a respective likely cause 924-1 through 924-n of the problem 112 in response to the respective sets of real-time features 914-1 through 914-n, and a voting step 930 selects the likely cause 124 from among the likely causes 924-1 through 924-n. For example, if n=10 and 7 of 10 of the likely causes 924-1 through 924-n indicate fault p3, then the voting step 930 selects fault p3 as the likely cause 124.


The diagnostic service 100 can determine the likely cause 124 based on any subset of the local classifiers 920-1 through 920-n. For example, if n=10 and, at the time of the problem 112, feature samples are available from R1, R3, R4, R7, and R9 only, then the voting step 930 selects the likely cause 124 from among the likely causes 924-1, 924-3, 924-4, 924-7, and 924-9 only. Such a condition might occur, for example, when the resources R1-Rn are services offered in a cloud environment, e.g., compute service, storage system, network load balancing service, database services, caching services, messaging services, etc. Different feature data can be collected from each of these different services.



FIG. 10 illustrates how the ensemble of local classifiers 920-1 through 920-n are trained with respective sets of training features 1026-1 through 1026-n sampled from the resources R1-Rn of the application 100 during fault injection. The learning service 122 trains the local classifier 920-1 with the training features 1026-1, and trains the local classifier 920-2 with the training features 1026-2, and trains the local classifier 920-n with the training features 1026-n.



FIG. 11 illustrates a method for identifying a likely cause of a problem in an application in one or more embodiments. While the various steps in this flowchart are presented and described sequentially, one of ordinary skill will appreciate that some or all of the steps can be executed in different orders and some or all of the steps can be executed in parallel. Further, in one or more embodiments, one or more of the steps described below can be omitted, repeated, and/or performed in a different order. Accordingly, the specific arrangement of steps shown in FIG. 11 should not be construed as limiting the scope of the invention.


At step 1110, a series of a set of predetermined faults are injected into the application. The predetermined faults can be preselected from expert knowledge, histories of problems, etc., as faults that may occur in the application and cause the problem experienced by users of the application. The predetermined faults can pertain to faults that may occur in a variety of resources upon which the application runs.


At step 1120, a subset of a set of training features are sampled from the application during each predetermined fault injected into the application and each subset is labeled with an identifier of the corresponding predetermined fault. There can be any number of samples of the features in each subset and there can be any number of features.


At step 1130, a classifier is trained to identify the likely cause by associating a set of real-time features sampled from the application that pertain to the problem to one or more of the predetermined faults in response to the training features. The training can be supervised learning from the labeled training features. The likely cause can identify one or more of the predetermined faults as a likely cause of the problem along with a confidence indicator for the likeliness of the identified predetermined fault.



FIG. 12 illustrates a computing system 1200 upon which portions of a diagnostic service 100 can be implemented. The computing system 1200 includes one or more computer processor(s) 1202, associated memory 1204 (e.g., random access memory (RAM), cache memory, flash memory, etc.), one or more storage device(s) 1206 (e.g., a hard disk, an optical drive such as a compact disk (CD) drive or digital versatile disk (DVD) drive, a flash memory stick, etc.), a bus 1216, and numerous other elements and functionalities. The computer processor(s) 1202 may be an integrated circuit for processing instructions. For example, the computer processor(s) may be one or more cores or micro-cores of a processor. The computing system 1200 may also include one or more input device(s), e.g., a touchscreen, keyboard 1210, mouse 1212, microphone, touchpad, electronic pen, or any other type of input device. Further, the computing system 1200 may include one or more monitor device(s) 1208, such as a screen (e.g., a liquid crystal display (LCD), a plasma display, touchscreen, cathode ray tube (CRT) monitor, projector, or other display device), external storage, input for an electric instrument, or any other output device. The computing system 1200 may be connected to network (e.g., a local area network (LAN), a wide area network (WAN) such as the Internet, mobile network, or any other type of network) via a network adapter 1218.


While the foregoing disclosure sets forth various embodiments using specific diagrams, flowcharts, and examples, each diagram component, flowchart step, operation, and/or component described and/or illustrated herein may be implemented, individually and/or collectively, using a range of processes and components.


The process parameters and sequence of steps described and/or illustrated herein are given by way of example only. For example, while the steps illustrated and/or described herein may be shown or discussed in a particular order, these steps do not necessarily need to be performed in the order illustrated or discussed. The various example methods described and/or illustrated herein may also omit one or more of the steps described or illustrated herein or include additional steps in addition to those disclosed.


While the invention has been described with respect to a limited number of embodiments, those skilled in the art, having benefit of this disclosure, will appreciate that other embodiments may be devised which do not depart from the scope of the invention as disclosed herein.

Claims
  • 1-19. (canceled)
  • 20. A method for diagnosing a problem in an application, comprising: obtaining a set of real-time features sampled from the application when a set of real users of the application experienced the problem in the application; andobtaining a likely cause of the problem by applying the real-time features to a classifier pre-trained for recognizing a set of predetermined faults that may occur in the application based on an injection of a series of the predetermined faults into the application while a set of simulated user accesses were applied to the application and while a set of training features for training the classifier were sampled from the application.
  • 21. The method of claim 20, further comprising generating a list of one or more of the predetermined faults having highest correlations to the real-time features of the problem.
  • 22. The method of claim 21, further comprising determining a respective confidence indicator for each predetermined fault on the list.
  • 23. The method of claim 20, further comprising refining the training features and the real-time features by interpolating one or more missing values in the training features and the real-time features before training the classifier.
  • 24. The method of claim 20, further comprising refining the training features and the real-time features by aggregating multiple instances of a resource type for the application into one feature in the training features and the real-time features before training the classifier.
  • 25. The method of claim 20, further comprising refining the training features and the real-time features by using multi-grain scanning of the training features and the real-time features to create new features for training the classifier.
  • 26. The method of claim 20, further comprising refining the training features and the real-time features by normalizing the training features and the real-time features before training the classifier.
  • 27. The method of claim 20, further comprising training an ensemble of local classifiers in the classifier, each local classifier adapted for the real-time features associated with a respective subset of resources upon which the application runs, and obtaining the likely cause in response to a classification vote among the local classifiers.
  • 28. The method of claim 20, further comprising obtaining a new set of features sampled from the application that pertain one of the predetermined faults and updating the classifier in response to the new set of features.
  • 29. The method of claim 20, further comprising obtaining a new set of features sampled from the application that pertain a new fault discovered in the application and updating the classifier in response to the new set of features.
  • 30. A diagnostic service for an application, comprising: a classifier pre-trained for recognizing a set of predetermined faults that may occur in the application based on an injection of a series of the predetermined faults into the application while a set of simulated user accesses were applied to the application and while a set of training features were sampled from the application; andmeans for applying to the classifier a set of real-time features sampled from the application when a set of real users of the application experienced the problem in the application such that the classifier yields a likely cause of the problem in response to the real-time features.
  • 31. The diagnostic service of claim 30, further comprising means for generating a list of one or more of the predetermined faults having highest correlations to the real-time features of the problem.
  • 32. The diagnostic service of claim 31, further comprising means for determining a respective confidence indicator for each predetermined fault on the list.
  • 33. The diagnostic service of claim 30, further comprising a learning service that refines the training features and the real-time features by interpolating one or more missing values in the training features and the real-time features before training the classifier.
  • 34. The diagnostic service of claim 30, further comprising a learning service that refines the training features and the real-time features by aggregating multiple instances of a resource type for the application into one feature in the training features and the real-time features before training the classifier.
  • 35. The diagnostic service of claim 30, further comprising a learning service that refines the training features and the real-time features by using multi-grain scanning of the training features and the real-time features to create new features for training the classifier.
  • 36. The diagnostic service of claim 30, further comprising a learning service that refines the training features and the real-time features by normalizing the training features and the real-time features before training the classifier.
  • 37. The diagnostic service of claim 30, wherein the classifier comprises an ensemble of local classifiers, each local classifier adapted for the real-time features associated with a respective subset of resources upon which the application runs such that the classifier determines the likely cause using a classification vote among the local classifiers.
  • 38. The diagnostic service of claim 30, further comprising a diagnostic interface that obtains a new set of features sampled from the application that pertain one of the predetermined faults and a learning service that updates the classifier in response to the new set of features.
  • 39. The diagnostic service of claim 30, further comprising a diagnostic interface that obtains a new set of features sampled from the application that pertain a new fault discovered in the application and a learning service that updates the classifier in response to the new set of features.