What happens if a reviewer finds a fatal flaw in a proof in one's mathematical PhD thesis? This question stems just from curiosity, as my work is not concerned with mathematics. 


  What happens if a student doing a PhD in mathematics submits a thesis
  with a proof of some theorem and the reviewer finds fatal flaws in the
  proof?


I don't mean small typos but flaws of greater caliber, whose fixing leads to the conclusion that the conjecture one was convinced of proving is completely wrong, or, if gaping contradictions in the proof are found. Can one obtain a PhD with such a flawed thesis?

I assume that in other areas of research even if some results are proven wrong, the PhD can still be awarded on the basis of other results that are present in one's work.

Note, this question differs from this one as here we assume that the thesis has already been submitted and is under review.
I'm aware of a thesis that unravelled at the oral defense: one examiner found a small error and it turned into a big error that invalided a substantial part of the thesis.  The candidate was required to make major revisions.  (The party scheduled after the defense was promptly cancelled.)

I'm also aware of a thesis that was downright rejected by the external examiner before it reached the oral defense stage.  The candidate also has to make major revisions.

These occurrences are very rare: most programs have various milestones to satisfy before a thesis can be submitted, and these roadbumps are there precisely to avoid this kind of mess (which makes everybody look bad, especially the supervisor and the supervisory committee.)  It's rare but it does happen, and on both occasions the candidate dug in, cleaned up the work, resubmitted some months after and eventually graduated.

(One thesis was in physics, the other in math.)