In entertainment alternate-history/fiction I keep seeing the theme of the Soviet government suffering some sort coup, usually sparking or intensifying a war with the West.
Was their government ever really in risk of that?
edit: During the cold-war!
The 'Gang of Eight' attempted a coup in 1991, but they were more hardline than war seeking. They wouldn't make fun villains in a Red Storm Rising-type scenario - Starodubtsev's portfolio for example was basically agriculture, Yanayev has admitted being drunk during key moments, and certainly appeared drunk when appearing on TV about Gorbachev being in 'poor health'.
The millitary component of the rather poorly conducted coup wasn't a great success - some units and commanders seem to have opted to stay out of it.
A planned taking of Boris Yeltsin's holdout in the White House by millitary force also didn't proceed as planned. Units were held up by protesters (resulting in three deaths) - honestly I think this was more a case of a lack of will than effective resistance. Alpha Group and Vympel - both spetsnaz units that belonged to the KGB also didn't end up going in, though I don't recall if that was a practical matter or if they simply refused to go through with it.
Stephen Kotkin's Armageddon Averted covers the coup and the fairly half hearted effort by the 'hardliners'. His conclusion - that the party basically had a crisis of identity and decided to self dissolve - is perhaps a bit of a stretch but perhaps bares some thought.
Edit - fixed a typo
Not only was there risk of a coup, such a coup arguably did take place.
In 1953 Lavrenty Beria was the clear favorite as Stalin's successor, and after Stalin's death effected a number of reforms(to make himself look good). However, Beria was given a surprise arrest at a presidium meeting and, according to Khrushchevs memoirs, the putschists had made military preparations in case things went wrong.