(When) the shit hits the fan
This expression is very common and rather vulgar. It means "when a situation comes to light and causes a lot of problems".
E.g.
The boss still doesn't know about the botch job we did last week. When the shit hits the fan, I don't want to be in the office - El jefe todavía no sabe nada de la chapuza que hicimos la semana pasada. Cuando se entere y se líe parda, yo no quiero estar en la oficina
The corruption in the government is unsustainable. When the shit hits the fan, heads will roll - La corrupción en el gobierno es insostenible. Cuando se vaya al traste rodarán cabezas