Methods and systems to identify and reproduce concurrency violations in multi-threaded programs using expressions
First Claim
1. A method to identify which a plurality of threads of a computer program are responsible for causing a concurrency violation, the method comprising:
- inserting, into a first thread of the computer program, a first instruction to determine a first predicate;
inserting, into a second thread of the computer program, a second instruction to determine a second predicate;
inserting, into the computer program, a concurrency violation detector, the concurrency violation detector to cause the concurrency violation to occur when a relationship between the first predicate and the second predicate is satisfied, the inserting of the concurrency violation detector to include globally defining, with a processor, a data type including;
the first predicate, the second predicate, and an expression defining the relationship as satisfied when the first and second predicates are satisfied in an order specified in the expression; and
in response to the concurrency violation detector determining the relationship is satisfied during execution of the computer program, identifying the first thread and the second thread as responsible for the concurrency violation.
1 Assignment
0 Petitions
Accused Products
Abstract
Methods and systems to identify threads responsible for causing a concurrency bug in a computer program having a plurality of concurrently executing threads are disclosed. An example method disclosed herein includes defining, with a processor, a data type. The data type including a first predicate, the first predicate being invoked using a first program instruction inserted in a first thread of the plurality of threads, a second predicate, the second predicate being invoked using a second program instruction inserted in a second thread of the plurality of threads, and an expression defining a relationship between the first predicate and the second predicate. The method further includes, in response to determining the relationship is satisfied during execution of the computer program, identifying the first thread and the second thread as responsible for the concurrency bug.
70 Citations
14 Claims
-
1. A method to identify which a plurality of threads of a computer program are responsible for causing a concurrency violation, the method comprising:
-
inserting, into a first thread of the computer program, a first instruction to determine a first predicate; inserting, into a second thread of the computer program, a second instruction to determine a second predicate; inserting, into the computer program, a concurrency violation detector, the concurrency violation detector to cause the concurrency violation to occur when a relationship between the first predicate and the second predicate is satisfied, the inserting of the concurrency violation detector to include globally defining, with a processor, a data type including;
the first predicate, the second predicate, and an expression defining the relationship as satisfied when the first and second predicates are satisfied in an order specified in the expression; andin response to the concurrency violation detector determining the relationship is satisfied during execution of the computer program, identifying the first thread and the second thread as responsible for the concurrency violation. - View Dependent Claims (2, 3, 4, 5)
-
-
6. An apparatus to identify which of a plurality of threads of a computer program are responsible for causing a concurrency violation, the apparatus comprising:
-
memory including machine readable instructions; at least one processor to execute the machine readable instructions to; insert, into a first thread of the computer program, a first instruction to determine a first predicate; insert, into a second thread of the computer program, a second instruction to determine a second predicate; insert a concurrency violation detector into the computer program by globally defining a data type to include the first predicate, the second predicate, and an expression defining a relationship between the first and second predicates, the expression to be satisfied when the first and second predicates are satisfied in an order specified in the expression, the concurrency violation detector to cause the concurrency violation to occur based on the occurrence of the relationship between the first predicate and the second predicate; execute the computer program including the concurrency violation detector; and respond to an occurrence of the relationship during execution of the computer program, by identifying the first thread and the second thread as responsible for the concurrency violation. - View Dependent Claims (7, 8, 9)
-
-
10. At least one machine readable storage medium comprising executable instructions which, when executed, cause at least one machine to at least:
-
insert, into a first thread of a computer program, a first instruction to determine a first predicate; insert, into a second thread of the computer program, a second instruction to determine a second predicate; monitor execution of the computer program; and activate a concurrency violation detector in response to satisfaction of a relationship between the first predicate and the second predicate during the execution of the computer program, the relationship specified in a data type defined by the concurrency violation detector, the activation of the concurrency violation detector to cause a concurrency violation to occur, and the concurrency violation detector to identify the first thread and the second thread of the computer program as causing the concurrency violation, the data type specifying the first predicate, the second predicate, and an expression defining the satisfaction of the relationship as occurring when the first and second predicates are satisfied in an order specified in the expression. - View Dependent Claims (11, 12, 13, 14)
-
Specification