That's because all the ellipse properties are not designed for hollow shapes. Matlab is trying to fit an ellipse just to the 'on' pixels of your shape (so it's trying to fit an ellipse to the walls of the pipe only) and failing. You can tell because the 'Circularity' is only about 0.2. It should be near one for something close to a circle.
The fix is to fill your shape before calling regionprops:
props = regionprops(imfill(mask, 'holes'), 'all');
With that the rest of your code works fine. 'Circularity' is now 0.96.