In a book I read long ago a character told an interesting tale about writing cliffhangers. Back in the day when movie palaces were common, it was the usual practice for several short pieces to be shown before the featured attraction. One was the serial that recounted the fearless adventures of a hero as he fought various bad guys and got himself time after time into life-threatening situations. One in particular had the writers stumped. It appeared that the last time we saw our hero he was down a well. There was absolutely no way out. None. Team after team of writers tried to resolve the dilemma with various methods but given the situation none worked. Heads were scratched, tempers flared; after all, the audience was waiting for the next installment. What to do? It was resolved by a genius writer who simply said "We start the next episode with the words "Once out of the well..." written on the screen. Crisis averted.
I concede that this type of problem is more likely to arise in television scripts with their now-mandatory season-ending cliffhangers, but it can happen in books as well. What happens when you've written yourself into a corner? It could be that your protagonist has information that he/she couldn't logically have; it could be some character in a non-escapable situation or showing up somewhere utterly strange; something that has to occur for the sake of your plot but upon rereading you realize "This makes no sense at all. Now what?"
I find this type of problem usually manifests when I'm so busy moving ahead that my fingers are typing faster than my brain. I'm so consumed with 'and then this and then this and then this' that the logic gets lost and then I find myself with an issue; a nice plot with some major holes. Rewriting is obviously in order, but how much? Finding where you went off the tracks can be difficult because you know how the story goes. I've employed two methods. First I try to go back and fix it myself. When this doesn't work I give the manuscript to someone else and ask them to kindly show me where the problem begins.
Have you ever found that you've written yourself into a corner? How did you get out of the well?