During the Cuban Missile Crisis, a US reconnaissance plane over Cuba was shot down by a Soviet missile without authorization from Moscow. This "stray" shot very nearly caused nuclear war. (For more examples of a lack of government control in the Cuban Missile Crisis see section VI on this outline. By the way, it would be interesting to analyze the plentiful existential risk irrationality during this Crisis. The Crisis tapes are now declassified.)
If the US and the USSR had trouble controlling their guns, it's likely the amateurish, heavily-armed North Korean state also does.
Let me mention Graham Allison and Philip Zelikow's excellent book Essence of Decision: Explaining the Cuban Missile Crisis (2nd ed. 1999) here. The thesis of the book is that it's often a bad idea to try to understand the actions of countries by treating them as rational actors, and it illustrates it by three takes on the Cuban missile crisis.
In the first chapter it uses the rational actor model and asks about each event "what was the Soviet Union trying to do here". It turns out to be extremely puzzling: for instance they shot down a recognizan...
My theory on why North Korea has stepped up its provocation of South Korea since their nuclear missle tests is that they see this as a tug-of-war.
Suppose that North Korea wants to keep its nuclear weapons program. If they hadn't sunk a ship and bombed a city, world leaders would currently be pressuring North Korea to stop making nuclear weapons. Instead, they're pressuring North Korea to stop doing something (make provocative attacks) that North Korea doesn't really want to do anyway. And when North Korea (temporarily) stops attacking South Korea, everybody can go home and say they "did something about North Korea". And North Korea can keep on making nukes.