You are correct in finding this exception. Whether this occurs will (obviously) depend on the actual values of $M$, $m$, $\mu$ and $u$, as well as the sizes of the blocks. By solving the initial differential equation, you can obtain a condition (inequality) for which this will never happen (where the relative velocity reaches zero before the slippage reaches half the length).
Therefore, if the above condition is not satisfied, the situation you described will occur. Actually, several situations could occur depending on the parameters and initial conditions. For example, we could have
- The upper block loses contact completely before hitting the surface.
- The rear end of the upper block hits the surface before the lower block comes to a stop. The lower block keeps traveling forward and eventually both blocks rest flat on the surface.
- Same as above, but the lower block comes to a stop first, so that the upper block ends up in a sloped position.
I believe the best way to analyze the above is to work in the frame of the lower block. You have three dynamical degrees of freedom, all of which are functions of time:
- The position and acceleration of the lower block
- The angle of the upper block relative to the horizontal
- The position and acceleration of the point of contact (pivot) along the length of the upper block.
In this frame, there will be four forces acting on the upper block:
- Friction from point of contact
- Normal force from point of contact
- Fictitious force
Do also take note that other things such as the moment of inertia will also be changing due to the changing pivot point. You also need a constraint equation for the blocks to remain in contact with each other. This is a non-trivial problem. You could first try to solve easier cases such as
- Assuming the point of contact does not change after a certain time
- Assuming the lower block is fixed in place, which enables you to focus entirely on the changing point of contact