Intel® Inspector User Guide for Linux* OS

ID 767796
Date 5/15/2022
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

Threading Error Analysis Types

Intel Inspector offers a range of preset threading analysis types to help you control analysis scope and cost:

  • Analysis types with the narrowest scope minimize the load on the system and the time and resources required to perform the analysis; however, they detect the narrowest set of errors and provide minimal details.

  • Analysis types with the widest scope maximize the load on the system and the time and resources required to perform the analysis; however, they detect the widest set of errors and provide context and the maximum amount of detail for those errors.

TIP:
  • Use analysis types iteratively. Start with a narrow scope to verify the application is set up correctly and set expectations for analysis duration. Widen the scope only if you need more answers and you can tolerate the increased cost.

  • Estimated collection time may be 2 to 320 times longer than normal application execution time.

  • Data set size and workload have a direct impact on application execution time and analysis speed.

Some settings in each preset analysis type are configurable. If the combination of settings in a preset analysis type almost meets your needs, try fine-tuning these configurable settings.

If the combination of analysis type settings in the preset analysis types does not meet your needs at all, try creating a new custom analysis type based on the currently selected analysis type.

Threading Error Configuration Settings for Each Preset Analysis Type

The following table shows the settings (in alphabetical order) for each preset analysis type:

  • N/A means not applicable for the preset analysis type (which means any value displayed in the GUI is greyed out)

  • Configurable means you can change the setting without creating a custom analysis type.

  • Renamed/split/combined configuration settings show previous manifestations.

Configuration Settings / Preset Threading Error Analysis Types

Detect Deadlocks (Narrow Scope)

Detect Deadlocks and Data Races

Locate Deadlocks and Data Races (Wide Scope)

Cross-thread stack access detection

Hide problems/Hide warnings

Hide problems/Show warnings

Hide problems/Show warnings if Scope=Normal, Hide problems/Hide warnings if Scope=Extremely thorough

Detect data races

No

Yes

Yes

Detect data races on stack (previously called Detect data races on stack accesses

N/A

No

No if Scope=Normal, Yes if Scope=Extremely thorough

Detect deadlocks (split from Detect lock hierarchy violations and deadlocks)

Yes

Yes

Yes

Detect lock hierarchy violations (split from Detect lock hierarchy violations and deadlocks)

Yes

Yes

Yes

Threading Error Analysis Type Configuration Setting Descriptions

The following table describes the purpose, usefulness, and cost (low, medium, high, or proportional in terms of time and resources) for each analysis type configuration setting. (The settings are listed in alphabetical order.)

Setting

Purpose, Usefulness, and Cost

Cross-thread stack access detection

Use to set the alert mechanism for when a thread accesses stack memory of another thread.

The alert mechanism helps you decide if this is an issue that requires handling.

All options are low cost if Detect data races is selected.

Recommendation:

  • Use Hide problems/Hide warnings if using an OpenMP* or oneAPI Threading Building Blocks (oneTBB) programming model; or if cross-thread stack accesses are anticipated. Also select Detect races on stack.

  • Use Hide problems/Show warnings if cross-thread stack accesses are not anticipated. Also deselect Detect data races on stack.

  • Use Show problems/Hide warnings if cross-thread stack accesses are not anticipated but a previous analysis indicated they exist and you are not using an OpenMP* or oneAPI Threading Building Blocks (oneTBB) programming model. Also deselect Detect data races on stack.

Detect data races

Select to detect problems where multiple threads access the same memory location without proper synchronization and at least one access is a write.

Selecting is useful when you suspect data races that are not yet evident.

High cost.

Recommendation: Select. Consider also deselecting Use maximum resources to reduce cost.

Detect data races on stack (previously called Detect data races on stack accesses)

Available only if Detect data races is selected.

Select to detect data races for variables allocated on the stack.

Selecting is useful when threads in an application share variables from the stack and you suspect data races on the variables.

High cost.

Recommendation: Deselect. If you select, consider also deselecting Use maximum resources to reduce cost.

Detect deadlocks

Select to detect problems where two or more threads are waiting for the other to release resources, but none of the threads releases the resources. Thus no thread can proceed.

Selecting is useful when you want to troubleshoot the location of a deadlock.

Low cost.

Detect lock hierarchy violations

Select to detect problems where the acquisition hierarchy order of multiple synchronization objects in one thread differs from the acquisition hierarchy order in another thread, and could cause a deadlock under certain conditions.

Selecting is useful when an application has complicated synchronization and it is hard to verify correctness.

Low cost unless an application has a significant number of locks.