google / google/sanitizers

Provide the smallest possible cycle in deadlock detector reports

Open
#458 9 comments 0 reactions 0 assignees View on GitHub
DeadlockDetector Priority-Medium ProjectThreadSanitizer Status-Accepted Type-Enhancement
Dominant language
C
Stars
12.5k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

Originally reported on Google Code with ID 51

```
When a lock-order inversion occurs (usually detected through DFS) we should provide
the smallest possible cycle (to ease the burden of debugging it).

It's possible to have a lock orders established: A->B->C, A->C. If this order is then
broken by locking C->A, then a DFS could provide C->A->B->C, even though C->A->C would
be sufficient and easier to parse/debug.

```

Reported by `pbos@google.com` on 2014-03-05 16:04:34

Contributor guide

Open the contributing guide

Research direction

Start by tracing the deadlock detector's DFS-based report generation; the issue does not name a source file or test. Use the A→B→C, A→C, then C→A example to determine how the reported cycle is selected. Done means lock-order inversion reports show the smallest sufficient cycle.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
devtools, testing-qa
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.