Isn't that typically something you see coming? Even if it's not I doubt you'd go from a solid government one day to a nuclear weapon being launched by insurgents the next.
Look at the situation in Pakistan right now. Not only do you have the Taliban in the Northwest you also have the Baluch conflict in the Southwest. Also the Taliban are extending themselves throughout the country. They're getting themselves set up in Punjab, Karachi, and Baluchistan.
In a Somalia the failure occurred because the corrupt abusive government, faced with a seemingly unstoppable insurgency, was pushed into increasingly brutal and destructive methods. Not only were insurgents suppressed with these increasingly brutal methods, dissidents as well. This also extended to various secessionist groups which also exist in Pakistan. In the end a coup d'etat against Siad Barre was what led to the complete collapse of Somalia.
It is not too hard to envision such a scenario in Pakistan.
North Korea is ripe for a complete and sudden collapse. The country is so poor and so oppressive that any serious loss of strength by any important element of the government could send the country spiraling into chaos.
Madness is like gravity all it takes is a little push.