This question likely doesn't make much sense in the US and other countries where separate Master's degrees are uncommon. However, here in Canada, the vast majority of graduate students must first apply for a Master's degree, and then apply for a PhD program (usually filling out applications during their Master's degree, as the deadlines fall).
Students are highly discouraged from completing their undergrad, Master's, and PhD all at the same school for many reasons. But it seems quite common to do one's undergrad at one school, then both grad degrees at the same school.
My question is: how common is it for students in this situation to be rejected from a PhD program at the school where they are currently doing their Master's? And what might be reasons for such a rejection? I imagine that some reasons would be lack of willing supervisors (which begs the question of how they were accepted for the Master's anyway), unsatisfactory work during the Master's degree, or some extreme situation such as academic dishonesty.
My field is math, so I guess we can restrict the question to that discipline, but I'm curious about answers from all fields.