US6009269A
Expired / Lapsed
US
⏱️ 0.0 years remaining
Detecting concurrency errors in multi-threaded programs
Assignee: Hewlett Packard Enterprise Development LP
•
Filing: 1997-03-10
•
Granted: 1999-12-28
•
Expires: 2017-03-10
Abstract
Abstract A computer implemented method detects concurrency errors in programs. Machine executable images of multiple program threads are instrumented to locate and replace instructions which affect concurrency states of the threads. Concurrency state information is recorded in a memory while the multiple threads are executing. The recorded concurrency state information is analyzed, and inconsistent dynamic concurrency state transitions are reported as concurrency errors.
Inventors
- 👤 Michael Burrows
- 👤 Charles G. Nelson
- 👤 Stefan Savage
- 👤 Patrick G. Sobalvarro
Bibliographic Details
Application Number
—
Jurisdiction
US
Data Source
google_patents
Last Synchronized
2026-11-05 01:45
CPC Classifications
G; G06; G06F; G06F11/00; G06F11/30; G06F11/34; G06F11/3466; G06F11/36; G06F11/362; G06F11/3636; G06F11/3644; G06F9/00; G06F9/06; G06F9/46; G06F9/52; G06F9/524
Claims Analysis
Total Claims: 23
Claim 1
Independent Claim
84 words
A computer implemented method for detecting concurrency errors including deadlock conditions and data race conditions in programs, comprising: instrumenting machine executable code of multiple threads of the programs to locate and replace instructions which affect concurrency states of the threads, including instructions which acquire and release locks; recording concurrency state information in a memory while the multiple threads are executing; analyzing the recorded concurrency state information; and reporting inconsistent dynamic concurrency state transitions as either deadlock conditions, data race conditions or other concurrency errors.
Claim 2
Dependent Claim
84 words
A computer implemented method for detecting concurrency errors including deadlock conditions and data race conditions in programs, comprising: instrumenting machine executable code of multiple threads of the programs to locate and replace instructions which affect concurrency states of the threads, including instructions which acquire and release locks; recording concurrency state information in a memory while the multiple threads are executing; analyzing the recorded concurrency state information; and reporting inconsistent dynamic concurrency state transitions as either deadlock conditions, data race conditions or other concurrency errors.
Claim 3
Dependent Claim
55 words
The method of claim 1 further comprising: locating instructions which acquire and release locks; replacing the located instruction with instructions to intercept an execution flow; recording an order in which the multiple threads acquire and release locks while executing; and reporting cycles in the order in which the multiple threads acquire locks as deadlock conditions.
Claim 4
Dependent Claim
25 words
The method of claim 2 further comprising: calling one or more monitoring procedures when intercepting the execution flow of any one of the multiple threads.
Claim 5
Dependent Claim
57 words
The method of claim 1 further comprising: maintaining, for each thread, a current lock set associated with the thread; adding a lock to the lock set when the lock is acquired; deleting the lock from the lock set when the lock is released; and recording the order in which the locks are acquired in a lock log.
Claim 6
Dependent Claim
24 words
The method of claim 1 further comprising: maintaining a read lock set for read accesses; and maintaining a write lock set for write accesses.
Claim 7
Dependent Claim
109 words
A computer implemented method for detecting concurrency errors in programs, comprising: instrumenting machine executable code of multiple threads of the programs to locate and replace instructions which affect concurrency states of the threads; recording concurrency state information in a memory while the multiple threads are executing, including: maintaining a read lock set for read accesses; maintaining a write lock set for write accesses; adding a read lock to the read lock set for read accesses; and adding a write lock to the read lock set and the write lock set for write accesses; analyzing the recorded concurrency state information; and reporting inconsistent dynamic concurrency state transitions as concurrency errors.
Claim 8
Dependent Claim
109 words
A computer implemented method for detecting concurrency errors in programs, comprising: instrumenting machine executable code of multiple threads of the programs to locate and replace instructions which affect concurrency states of the threads; recording concurrency state information in a memory while the multiple threads are executing, including: maintaining a read lock set for read accesses; maintaining a write lock set for write accesses; adding a read lock to the read lock set for read accesses; and adding a write lock to the read lock set and the write lock set for write accesses; analyzing the recorded concurrency state information; and reporting inconsistent dynamic concurrency state transitions as concurrency errors.
Claim 9
Dependent Claim
150 words
A computer implemented method for detecting concurrency errors in programs, comprising: instrumenting machine executable code of multiple threads of the programs to locate and replace instructions which affect concurrency states of the threads; recording concurrency state information in a memory while the multiple threads are executing, including: maintaining, for each thread, a current lock set associated with the thread; adding a lock to the lock set when a new lock is acquired by storing lock set pairs in the lock set, the pairs being every unique combination of a current member of the lock set and the new lock that is not a member of the lock set; deleting the lock from the lock set when the lock is released; and recording the order in which the locks are acquired in a lock log; analyzing the recorded concurrency state information; and reporting inconsistent dynamic concurrency state transitions as concurrency errors.
Claim 10
Dependent Claim
150 words
A computer implemented method for detecting concurrency errors in programs, comprising: instrumenting machine executable code of multiple threads of the programs to locate and replace instructions which affect concurrency states of the threads; recording concurrency state information in a memory while the multiple threads are executing, including: maintaining, for each thread, a current lock set associated with the thread; adding a lock to the lock set when a new lock is acquired by storing lock set pairs in the lock set, the pairs being every unique combination of a current member of the lock set and the new lock that is not a member of the lock set; deleting the lock from the lock set when the lock is released; and recording the order in which the locks are acquired in a lock log; analyzing the recorded concurrency state information; and reporting inconsistent dynamic concurrency state transitions as concurrency errors.
Claim 11
Dependent Claim
65 words
The method of claim 7 further comprising: for each pair, storing the pair in a determined order so that either the current member of the lock set is recorded in a first position and the new lock in a second position, or the current member of the lock set is recorded in the second position and the new lock is stored in the first position.
Claim 12
Dependent Claim
55 words
The method of claim 8 wherein the pairs of the lock log are represented as an ordered lock graph further comprising: a node for each lock; and a directed edge connecting a first lock to a second lock, the direction of the edge indicating the order in which the first and second lock were acquired.
Claim 13
Dependent Claim
15 words
The method of claim 9 further comprising: performing a topological sort on the lock graph.
Claim 14
Dependent Claim
45 words
The method of claim 10; wherein a first node and a second node are connected by a first edge and a second edge directed in opposite directions; and further comprising reporting the locks associated with the first and second node as a concurrency locking error.
Claim 15
Dependent Claim
143 words
A computer implemented method for detecting concurrency errors in programs, comprising: instrumenting machine executable code of multiple threads of the programs to locate and replace instructions which affect concurrency states of the threads, including: (a) memory allocation and memory deallocation instructions so that for every address of a heap, a shadow address in a shadow heap is maintained and (b) instructions which access data at the addresses of the heap, replacing the access instructions with instructions to invoke monitoring procedures; recording concurrency state information in a memory while the multiple threads are executing, including recording lock set information at the corresponding shadow addresses using the monitoring procedures; analyzing the recorded concurrency state information; and reporting inconsistent dynamic concurrency state transitions as concurrency errors, including reporting accesses by the access instructions that are inconsistent with the recorded lock set information as data race conditions.
Claim 16
Dependent Claim
143 words
A computer implemented method for detecting concurrency errors in programs, comprising: instrumenting machine executable code of multiple threads of the programs to locate and replace instructions which affect concurrency states of the threads, including: (a) memory allocation and memory deallocation instructions so that for every address of a heap, a shadow address in a shadow heap is maintained and (b) instructions which access data at the addresses of the heap, replacing the access instructions with instructions to invoke monitoring procedures; recording concurrency state information in a memory while the multiple threads are executing, including recording lock set information at the corresponding shadow addresses using the monitoring procedures; analyzing the recorded concurrency state information; and reporting inconsistent dynamic concurrency state transitions as concurrency errors, including reporting accesses by the access instructions that are inconsistent with the recorded lock set information as data race conditions.
Claim 17
Dependent Claim
17 words
The method of claim 12 further comprising: detecting an access to an allocated address of the heap.
Claim 18
Dependent Claim
46 words
The method of claim 13 further comprising: intersecting current lock set information of a current accessing thread with stored lock set information of a previous thread accessing the address of the heap; and reporting a data race condition if the intersection of the sets is empty.
Claim 19
Dependent Claim
27 words
The method of claim 14 further comprising: storing the intersection of the current and stored lock set information if the current and previous lock sets are different.
Claim 20
Dependent Claim
26 words
The method of claim 15 further comprising: writing the intersection of the current and stored lock sets if the access is a write to the address.
Claim 21
Dependent Claim
41 words
The method of claim 12 further comprising: recording the lock sets in entries of an array; and storing a pointer to a particular entry of the array at every shadow address associated with the lock set stored at the particular entry.
Claim 22
Dependent Claim
30 words
The method of claim 17 further comprising: determining a hash value from a particular lock set; and storing the pointer in a hash table as determined by the hash value.
Claim 23
Dependent Claim
20 words
The method of claim 12 further comprising: storing an identity of an accessing thread when the thread access is unshared.
References Cited (Backward Citations)
US5440743A
Cited
US5335344A
Cited
US5469575A
Cited
US5459871A
Cited
US5845117A
Cited
US5590335A
Cited
US5539907A
Cited
US5835766A
Cited
US5764976A
Cited
US5682537A
Cited
US5862376A
Cited
USPTO Annuity & Maintenance Windows
| Annuity Stage | Window Opens | Payment Deadline | Surcharge Period Until | Estimated Fee | Status |
|---|---|---|---|---|---|
| 3.5 Years (Year 4) | 2002-12-27 | 2003-06-28 | 2003-12-28 | $2000.00 | Window Closed / Lapsed |
| 7.5 Years (Year 8) | 2006-12-27 | 2007-06-28 | 2007-12-28 | $3760.00 | Window Closed / Lapsed |
| 11.5 Years (Year 12) | 2010-12-27 | 2011-06-28 | 2011-12-28 | $7700.00 | Window Closed / Lapsed |