Does anyone know what book it is that is about a guy writing a book about a guy writing a book about a guy writing a book, etc. etc? One thing I know that happens is that one of the guys writing a book gets trapped in a basement and all the books and storyline "below" him all stop.
You may be referring to Oracle Night by Paul Auster. In it the main character is writing a novel in which the protagonist gets locked in a basement. At the same time there are links to another story. It isn't quite as you describe as it isn't a book within a book within a book but it sounds pretty close.
If you like the concept then Milan Kundera's Life Is Elsewhere has a great scene where a young man has a dream within a dream within a dream.,