It’s very rare that this happens. Usually, students present their thesis when they are completely ready and confident that they will pass.