The present invention provides a method for modeling and analyzing the reliability of a self-repairing processor to a lockstep system. Firstly, the state of the lockstep system and the self-repairing processor is abstracted into a library set, and the faults of the processor and other components The occurrence and repair actions are abstracted into a transition set, and then the relationship between the place set and the transition set is abstracted into a directed arc set and ignition transition rules between them, and then the failure rate and repair rate information of each component is abstracted into a delay time The average implementation rate of transition elements, thus the GSPN reliability model of the lock-step system is obtained. After the model is initialized, according to the ignition transition rules, all the states reachable by the lockstep system are obtained, and then the isomorphic Markov chain of the GSPN reliability model is constructed, and the cumulative probability function equation of the reachable states of the GSPN reliability model is obtained and solved , to obtain the reliability function of the lock-step system, so as to complete the reliability analysis of the lock-step system. The modeling process of the invention is simple, and the reliability function of the system can be obtained accurately.