Detecting deadlocks in interop-debugging
First Claim
Patent Images
1. A computer-implemented method comprising:
- identifying one or more synchronization objects that an application program interface (API) could block on;
responsive to receiving a debugger request for a helper thread, creating, by the helper thread, a canary thread, wherein;
the canary thread attempts to take and release the one or more synchronization objects, andthe one or more synchronization objects are takeable by the helper thread in response to the debugger request;
determining whether the canary thread exits and returns to the helper thread within a predetermined timeout period; and
,when the canary thread exits and returns to the helper thread within the predetermined timeout period, determining that the one or more synchronization objects are free to take; and
when the canary thread does not exit and return to the helper thread within the predetermined timeout period, returning a graceful failure from the helper thread without trying to take the one or more synchronization objects.
2 Assignments
0 Petitions
Accused Products
Abstract
A method and system for implementing detecting deadlocks in interop-debugging is described herein. One or more synchronization objects that an application program interface (API) could block on are identified. A canary thread that takes one or more of the synchronization objects is created. The canary thread is called to take the one or more synchronization objects. If the canary thread returns within a predetermined timeout period, then the one or more synchronization objects are available and safe to take. If the canary thread does not return within the predetermined timeout period, then the one or more synchronization objects may not be available.
8 Citations
18 Claims
-
1. A computer-implemented method comprising:
-
identifying one or more synchronization objects that an application program interface (API) could block on; responsive to receiving a debugger request for a helper thread, creating, by the helper thread, a canary thread, wherein; the canary thread attempts to take and release the one or more synchronization objects, and the one or more synchronization objects are takeable by the helper thread in response to the debugger request; determining whether the canary thread exits and returns to the helper thread within a predetermined timeout period; and
,when the canary thread exits and returns to the helper thread within the predetermined timeout period, determining that the one or more synchronization objects are free to take; and when the canary thread does not exit and return to the helper thread within the predetermined timeout period, returning a graceful failure from the helper thread without trying to take the one or more synchronization objects. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8)
-
-
9. One or more device-readable storage media with device-executable instructions stored thereon which, when executed by a processing unit, perform:
-
identifying one or more synchronization objects that an application program interface (API) could block on; responsive to receiving a debugger request for a helper thread, calling, by the helper thread, a canary thread, wherein the canary thread attempts to both take and release the one or more synchronization objects before returning to the helper thread; counting when the one or more synchronization objects are taken and released based on the attempts by the canary thread; determining whether the one or more synchronization objects are free to take, based on the counting; and when the counting does not indicate that the one or more synchronization objects are free to take, returning a graceful failure from the helper thread without trying to take the one or more synchronization objects. - View Dependent Claims (10, 11, 12, 13, 14)
-
-
15. A system comprising:
-
a helper thread; a canary thread; and a processing unit configured to execute the canary thread and the helper thread; the helper thread being configured to; identify one or more synchronization objects that may be taken by the canary thread; and create the canary thread; the canary thread being configured to; attempt to take and release the one or more synchronization objects; and exit and return to the helper thread after releasing the one or more synchronization objects; the helper thread being further configured to; determine whether the canary thread exits and returns to the helper thread within a predetermined timeout period; when the canary thread exits and returns to the helper thread within the predetermined timeout period, determine that the one or more synchronization objects are free to take; and when the canary thread does not exit and return to the helper thread within the predetermined timeout period, determine not to take the one or more synchronization objects. - View Dependent Claims (16, 17, 18)
-
Specification