1. A method for detecting deadlock in a target multithread program, the method comprising: selecting a thread in the target multithread program to be detected; initiating a tracking program which tracks the thread running in a kernel; initiating the target multithread program; judging whether the selected thread is running; dynamically inserting the probe into a database to detect the selected thread through an instrument function if it is judged that the selected thread is running; recording data detected by the instrument function; when a size of the recorded data is equal to or greater than a threshold size of the kernel, transmitting the data to a user space and storing the data in the user space; and analyzing the data stored in the user space to judge whether deadlock has been generated.