What to Do If Wudu Breaks during Tawaf
Question

I delayed tawaf al-ifadah until tawaf al-wada‘ (the farewell tawaf), then my family and I did tawaf on the roof (of the Haram). Shortly before completing the third circuit, I broke my wudu but I completed the circuit until I reached a place where I could do wudu on the roof, and I counted the circuits. Then in the fourth, fifth, sixth and seventh circuits, I went into the Mas`a because of the overcrowding, then I went back to the mataf. What is the ruling?
Praise be to Allah.What to do if wudu breaks during tawaf 
Being in a state of purity (taharah) is a condition of tawaf being valid according to the majority of scholars, but they differed concerning a case where a person breaks his wudu during tawaf then does wudu: should he complete the circuits or start tawaf over again? 
There are two opinions. The Hanafis and Shafi`is are of the view that he should resume his tawaf. The Malikis and Hanbalis are of the view that he should start tawaf again from the beginning. (See al-Mawsu’ah al-Fiqhiyyah, 29/131) 
Some scholars are of the view that being in a state of purity is not essential in tawaf . This is the view favoured by Shaykh al-Islam Ibn Taymiyah (may Allah have mercy on him). Based on that, the one who breaks his wudu during tawaf does not have to go out to do wudu. 
What we understand from your question is that you completed the third circuit without wudu. If that is the case, then your tawaf was not valid according to the majority of jurists. 
But according to the opinion of Shaykh al-Islam (may Allah have mercy on him) and those who agree with him, your tawaf is valid.
Shaykh Ibn ‘Uthaymin (may Allah have mercy on him) was asked: if I break my wudu during tawaf, what is the ruling? 
He replied: 
“If the one who is doing tawaf breaks his wudu , then he has to go out of tawaf and do wudu, then come back and start his tawaf all over again. This is the view of the majority of scholars, because one of the conditions of tawaf is being in a state of purity. But Shaykh al-Islam Ibn Taymiyah (may Allah have mercy on him) said that if he breaks his wudu whilst he is doing tawaf, he may carry on with his tawaf and he does not have to do wudu, because wudu is not one of the conditions of tawaf. 
What Shaykh al-Islam (may Allah have mercy on him) said is the correct view, because there is no evidence from the Prophet (blessings and peace of Allah be upon him) to suggest that being in a state of purity is essential for tawaf . 
The most that can be said is that when the Prophet (blessings and peace of Allah be upon him) wanted to do tawaf, he did wudu then did tawaf. This is what he did, but his actions do not indicate that it is obligatory. 
Similarly, according to the hadith of `Aishah (may Allah be pleased with her), when she got her menses, the Prophet (blessings and peace of Allah be upon him) said to her: “Do what the pilgrims do, apart from circumambulating the House.” That is because she was menstruating, and menses may contaminate the mosque in most cases. Moreover, the menstruating woman should not stay in the mosque, as is also the case for one who is junub. 
There is also the hadith of Safiyyah (may Allah be pleased with her), who got her menses after Hajj and he (the Prophet (blessings and peace of Allah be upon him)) said: “Is she detaining us?” They said: She has already done tawaf al-ifadah. He said: “Then move on.” 
This indicates that if she had been menstruating she would not have done tawaf. Then one may argue that menses is different from minor impurity; the answer is that if being in a state of purity (wudu) was a must for tawaf, the Messenger (blessings and peace of Allah be upon him) would have explained that to the people, because many people may not be in a state of purity. 
This is the view of Shaykh al-Islam (may Allah have mercy on him) and it is the correct view and we base our fatwas on this view. But undoubtedly being in a state of purity when doing tawaf is preferable and more on the safe side. But sometimes things may happen that are beyond one’s control and cause hardship, such as on the days when there are huge crowds and he loses his wudu. 
If we tell him to go and do wudu, and he goes and does wudu, then comes back and starts all over again, then during tawaf he loses his wudu again, because he has gas for example, and we tell him to go and do wudu, then come back and start tawaf all over again, doing wudu on days when there are a lot of crowds is very difficult and it will not be easy for a man to leave?
Even if he leaves, when will he find a wudu place that is free? Then if he does wudu and goes back, when will he be able to enter again? 
Enjoining upon the slaves of Allah something for which there is no clear evidence from the Quran or Sunnah, when it involves such great hardship, is something for which there is no real justification. It is not appropriate for anyone to impose something like this on the slaves of Allah without clear evidence. 
Yes, if the matter is easy, such as at times other than Hajj, he could go out and do wudu, and come back and repeat tawaf. This is something easy and we say that to be on the safe side he should do this. Whatever the case, what we think is the same as Shaykh al-Islam (may Allah have mercy on him), that wudu is not essential for tawaf.” (Majmu‘ Fatawa Ibn ‘Uthaymin, 22/361) 
Can you do tawaf inside the Mas`a?
Tawaf is not valid if done inside the Mas`a, because the Mas`a is outside al-Masjid al-Haram. Hence it is permissible for a woman who is menstruating to stay there. But if the crowding is so severe and one has no alternative but to enter the Mas`a, then go back to the place for tawaf, he is to be pardoned for that and his tawaf is valid.
And Allah knows best.