发明名称 Detecting resource deadlocks in multi-threaded programs by controlling scheduling in replay
摘要 A method and system for determining potential deadlock conditions in a target multi-threaded software application. The target application is first run in a virtual machine and the events within the application are recorded. The recorded events are replayed and analyzed to identify potential lock acquisition conflicts occurring between threads of the application. The potential lock acquisition conflicts are identified by analyzing the order in which resource locks are obtained and pairs of resources that have respective locks obtained in different orders are analyzed. These analyzed pairs are used to define a different order of events in the target application that, when the target application is re-run with the second order of events, may trigger a deadlock condition. The target application is then re-run with the different order of events in an attempt to trigger and then identify potential deadlock situations.
申请公布号 US9052967(B2) 申请公布日期 2015.06.09
申请号 US201012848023 申请日期 2010.07.30
申请人 VMware, Inc. 发明人 Gao Qi;Xu Min
分类号 G06F9/52;G06F11/36 主分类号 G06F9/52
代理机构 代理人
主权项 1. A method of identifying potential deadlock conditions in a target multithreaded software application running within a virtual machine in a virtualized computer system, the method comprising: recording an execution of the software application in the virtual machine, wherein the software application includes a code block that is skipped during the recording; identifying all thread creation and thread termination events that occur in the executed software application and a first order in which the identified events occur during the execution of the software application; identifying all resource locking and resource releasing events in the executed software application; generating a second order of events of the software application that is different from the first order of events and potentially triggers a deadlock condition due to timing of the resource locking and resource releasing events; initiating, by a hypervisor, a replay of the software application in the virtual machine based on the recording of the execution of the software application determining, by the hypervisor, the code block that was skipped during the recording in the virtual machine and executing the code block during the replay; monitoring, by the hypervisor, execution of the replay of the software application by the virtual machine to determine when execution of the replay in the virtual machine reaches a point in the replay of the software application within the code block where the second order of events differs from the first order of events; in response to determining the point, introducing, by the hypervisor, a scheduling change to execute the software application in the virtual machine with the generated second order of events; and in response to determining the point, automatically switching from replaying of the software application using the recording from within the code block to executing the software application in the virtual machine with the generated second order of events to determine whether the potential deadlock condition is triggered.
地址 Palo Alto CA US