1. A method for detecting deadlock in a multithread program, the method comprising: selecting a thread to be detected; initiating a tracking program in order to track the thread running in a kernel; initiating a target multithread program; judging whether the selected thread is running; dynamically inserting the probe into the database in order to detect the selected thread through an instrument function; the instrument function records the detected data, and when the recorded data goes beyond the threshold value of the kernel, transmitting the data to the user space and storing the data in the user space; and analyzing the data stored in the user space in order to judge whether deadlock has been generated.