The answer to that question is that there is a very considerable literature on this. Some of it is Marxist. Much of it is Tocquevillian. Read his "Ancient Regime and the Revolution."
One key indicator is that those with access to the levers of power within the ruling order cease to believe in the religion or ideology that legitimizes the regime. Another is that their underlings also gradually abandon the beliefs that render respectable the rule of their masters.
This happened some time ago in China, and there very nearly was a revolution at the time of Tiananmen Square. Tellingly, the key players among the young at that time were often the children of party officials. At the time, the party split over how it should respond to the protests and quite a number of leading party figures ended up under house arrest for the rest of their lives. It did not have to end in the manner in which it ended. It could have gone the other way. It was a close-run thing.
I think it highly significant that leading figures in the Chinese Communist party have recently instructed their underlings to secure and read Tocqueville's book. People in China who are far more expert with regard to that country than any western Sinologist could possibly be evidently thinking about the question I raised...
The Tocquevillian account of revolution fits the Arab Spring, the eruptions in eastern Europe in the 1980s, and the collapse of the Soviet Union to a "T." First goes belief in the legitimacy of the system. Then comes a trigger -- an event which causes large numbers of people to say to themselves, "I cannot take this anymore." Then, the crucial question is whether those in charge have the nerve to try to crush the rebellion and whether their underlings will follow orders.
If the powers that be are hesitant, ambivalent, or divided, if their underlings are fed up, things can very easily fall apart (as they did in eastern Europe, in the Soviet Union, and in Tunisia, Egypt, Libya, and Syria.) So far, the Chinese and the Iranians have kept a lid on things. But do not think for a second that these regimes are stable. In both China and Iran, skepticism about the regime's legitimacy is commonplace.