# US 2021/0173760 A1 · Software diagnostic context selection and use

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2021/0173760 A1
- Document ID: US20210173760A1
- Status: Published application
- Kind: A1
- Application number: 16/704,925
- Filed: 2019-12-05
- Published: 2021-06-10
- Earliest claimed: 2019-12-05
- Assignees: Microsoft Technology Licensing, LLC
- Applicants: Microsoft Technology Licensing, LLC
- Inventors: Mark Anthony Jelf DOWNIE; Jackson DAVIS; Thomas LAI; Andrew Richard STERLAND; Wai Hang ("Barry") TANG; Nikolaus KARPINSKY
- Web page: https://patentgrep.com/patent/US20210173760A1

## CPC

- G06F 11/079: {Root cause analysis, i.e. error or fault diagnosis (in a hardware test environment G06F11/22; in a software test environment G06F11/36)}
- G06F 11/366: {using diagnostics (G06F11/0703 takes precedence)}
- G06F 11/0778: {Dumping, i.e. gathering error/state information after a fault for later diagnosis}
- G06F 11/3636: {by tracing the execution of the program}
- G06F 11/3698: Environments for analysis, debugging or testing of software
- G06N 20/00: Machine learning
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

Embodiments improve software defect diagnosis. Analytic focus is automatically walked back from an initial symptomatic diagnostic context to a previous diagnostic context that is closer to underlying causes. Diagnosis may obtain diagnostic artifacts such as traces or dumps, extract diagnostic context, decompile executables, lookup likely causes based on symptoms, scan logs, and submit diagnostic context to software analysis services. An analysis service may perform static analysis, security testing, symptom-pair lookups, or antipattern scanning, for example, and may include a neural network or other machine learning model, for example. Root causes are culled from analysis results and identified to a software developer. Changes to mitigate the defect's impact are suggested in some cases. Thus, the software developer receives debugging leads without manually navigating through all the tool interfaces or unrelated details of diagnostic contexts. This allows the developer to more efficiently reach a useful diagnosis of defects, even for unfamiliar issues.

## Claims

### Claim 1

A system for identifying causes of computing functionality defects, the system comprising:
a memory;
a processor in operable communication with the memory, the processor configured to perform computing functionality defect identification steps which include (a) obtaining a diagnostic artifact associated with a computing functionality defect of a program, (b) extracting a secondary diagnostic context from the diagnostic artifact, (c) transparently ascertaining a primary diagnostic context of the program which preceded the secondary diagnostic context during an execution of the program, (d) submitting at least a portion of the diagnostic contexts to a software analysis service, (e) receiving from the software analysis service an analysis result which indicates a suspected cause of the computing functionality defect, and (f) identifying the suspected cause to a software developer;
whereby the system provides the software developer with a debugging lead without requiring the software developer to navigate through the diagnostic contexts.

### Claim 2 (depends on 1)

The system of claim 1, wherein transparently ascertaining the primary diagnostic context comprises at least one of the following:
automatically performing a static data flow analysis;
automatically scanning a log; or
automatically replaying at least a portion of the execution by using a time travel trace.

### Claim 3 (depends on 1)

The system of claim 1, wherein the memory contains and is configured by the diagnostic artifact, and the diagnostic artifact includes at least one of the following: an execution snapshot, an execution dump, a time travel debugging trace, a performance trace, a heap representation, or executable code.

### Claim 4 (depends on 1)

The system of claim 1, wherein the memory contains and is configured by data indicating at least one of the following symptom-cause pairs:
a null reference symptom paired with a faulty assignment cause;
a null reference symptom paired with a faulty function call result cause;
a null reference symptom paired with a heap corruption cause;
a null reference symptom paired with a buffer overrun cause;
a null reference symptom paired with a reentrant overwrite cause;
a null reference symptom paired with a wrong database connection string cause;
a crash symptom paired with a double free cause;
a crash symptom paired with a use after free cause;
a crash symptom paired with a reentrant overwrite cause;
a crash symptom paired with a buffer overrun cause;
a crash symptom paired with a memory corruption cause;
a timeout symptom paired with a thread pool starvation cause;
a timeout symptom paired with an infinite loop cause;
a timeout symptom paired with a synchronization failure cause;
a timeout symptom paired with a task completion failure cause; or
an out of memory symptom paired with an extra event handlers cause.

### Claim 5 (depends on 1)

The system of claim 1, wherein the system comprises at least one of the following diagnostic context extractors: a debugger, a time travel trace debugger, a performance profiler, a heap inspector, or a decompiler.

### Claim 6 (depends on 1)

The system of claim 1, wherein the memory contains and is configured by the diagnostic context, and the diagnostic context includes at least one of the following: call stacks, exception information, module state information, thread state information, task state information, or decompiled source code.

### Claim 7 (depends on 1)

The system of claim 1, wherein the system further comprises the software analysis service, and the software analysis service includes or accesses at least one of the following:
a machine learning model; or
a lookup mechanism which implements symptom-cause pairing.

### Claim 8

A method for identifying causes of computing functionality defects, the method comprising automatically:
procuring a secondary diagnostic context which is associated with a computing functionality defect of a program;
ascertaining a primary diagnostic context of the program which preceded the secondary diagnostic context during an execution of the program;
submitting at least a portion of the diagnostic contexts to a software analysis service;
in response to the submitting, receiving from the software analysis service an analysis result which indicates a suspected cause of the computing functionality defect; and
identifying the suspected cause to a software developer;
whereby the method automatically provides the software developer with a debugging lead without requiring the software developer to navigate through the diagnostic contexts.

### Claim 9 (depends on 8)

The method of claim 8, wherein the method avoids exposing any of the following to the software developer during an assistance period which begins with the procuring and ends with the identifying: any diagnostic context extractor user interface, any data flow static analyzer user interface, and any time travel debugger interface.

### Claim 10 (depends on 8)

The method of claim 8, further comprising suggesting to the software developer a mitigation for reducing or eliminating the computing functionality defect.

### Claim 11 (depends on 8)

The method of claim 8, wherein ascertaining the primary diagnostic context comprises at least one of the following:
ascertaining where a variable was nulled;
ascertaining where a task was triggered; or
ascertaining where an event handler was added to an event source.

### Claim 12 (depends on 8)

The method of claim 8, wherein ascertaining the primary diagnostic context comprises replaying at least a portion of the execution by using a time travel trace.

### Claim 13 (depends on 8)

The method of claim 8, wherein the secondary diagnostic context includes information about an exception and the primary diagnostic context includes program state prior to the exception.

### Claim 14 (depends on 8)

The method of claim 8, wherein the procured secondary diagnostic context indicates a null reference symptom, and the identified suspect cause accordingly includes at least one of the following higher priority cause candidates:
a faulty assignment cause;
a faulty function call result cause;
a heap corruption cause;
a buffer overrun cause;
a reentrant overwrite cause; or
a wrong database connection string cause.

### Claim 15 (depends on 8)

The method of claim 8, wherein the procured secondary diagnostic context indicates a timeout symptom, and the identified suspect cause accordingly includes at least one of the following higher priority cause candidates:
a thread pool starvation cause;
an infinite loop cause;
a synchronization failure cause; or
a task completion failure cause.

### Claim 16

A computer-readable storage medium configured with data and instructions which upon execution by a processor cause a computing system to perform a method for identifying causes of computing functionality defects in a program, the method comprising:
procuring a secondary diagnostic context which is associated with a computing functionality defect of a program;
ascertaining a primary diagnostic context of the program which preceded the secondary diagnostic context during an execution of the program;
submitting at least a portion of the diagnostic contexts to a software analysis service;
in response to the submitting, receiving from the software analysis service an analysis result which indicates a suspected cause of the computing functionality defect; and
identifying the suspected cause to a software developer;
whereby the method automatically provides the software developer with a debugging lead without requiring the software developer to navigate through the diagnostic contexts.

### Claim 17 (depends on 16)

The storage medium of claim 16, wherein the procured secondary diagnostic context indicates a crash symptom, and the identified suspect cause accordingly includes at least one of the following higher priority cause candidates:
a double free cause;
a use after free cause;
a reentrant overwrite cause;
a buffer overrun cause; or
a memory corruption cause.

### Claim 18 (depends on 16)

The storage medium of claim 16, wherein ascertaining the primary diagnostic context comprises performing a static backward data flow analysis.

### Claim 19 (depends on 16)

The storage medium of claim 16, wherein the program includes an executable component which upon execution supports a public-facing website, and the computing functionality defect is associated with the executable component.

### Claim 20 (depends on 16)

The storage medium of claim 16, wherein the method determines that a variable V was written during execution of a code statement X, determines that X does not involve an intentional assignment to V, and accordingly determines that V was overwritten by a buffer overrun or another memory corruption.
