Let $\pi:\mathcal{X} \to B$ be a flat family of projective varieties. Assume that $B$ is irreducible. Suppose that $\mathcal{X}$ is smooth except for a closed subscheme, say $Y$ which is isomorphic to $B$ and the composition $Y \hookrightarrow \mathcal{X} \to B$ is flat. Does there exist a smooth scheme $\tilde{\mathcal{X}}$ along with a proper birational morphism, say $\phi$ to $\mathcal{X}$ such that the composition $\phi \circ \pi$ is flat?

$\begingroup$ I somehow doubt it, even in the case $B=Spec \mathbb{C}[[t]]$, but I don't know any counterexample. Have you checked the case of a node degenerating into a cusp? $\endgroup$ – Piotr Achinger May 19 '14 at 2:48

$\begingroup$ Related: mathoverflow.net/questions/87998/… mathoverflow.net/a/129262/3847 $\endgroup$ – Piotr Achinger May 19 '14 at 2:51

$\begingroup$ @Piotr Achinger: for $B = Spec(\mathbb{C}[t])$ of course any resolution works  being flat over such $B$ is not a big deal! $\endgroup$ – Sasha May 19 '14 at 8:39

$\begingroup$ @Sasha could you please expand on that comment? Being flat over $B$ roughly means no components in fibers and no embedded points. I believe a relative resolution could work if the loci we blow up are flat over $B$, but I don't see how to guarantee that the new blowup loci will be flat. $\endgroup$ – Piotr Achinger May 19 '14 at 19:15

$\begingroup$ @Piotr Achinger: if the original variety is irreducible then the resolution (no matter which) is connected (hence no components in fibers) and smooth (hence no embedded points). $\endgroup$ – Sasha May 20 '14 at 3:04
Here is a counterexample. Let $k$ be a field. Let $A$ be an Abelian $k$variety of dimension $d \geq 2$ together with a projectively normal closed immersion, $$i : A \to \mathbb{P}^n_k,$$ (these do exist). Let $C \subset \mathbb{P}^{n+1}_k$ be the projective cone over $i(A)$. Denote by $v$ the vertex of this cone. Since $C$ is normal, it has depth $2$ at $v$ (the depth is not greater than $2$, because $h^1(A,\mathcal{O}_A)$ is nonzero).
Let $L\subset \mathbb{P}^{n+1}_k$ be a generic linear subspace of dimension $n2$, so that $L$ intersects $C$ transversally and does not contain $v$. Denote the blowing up $C$ along $C\cap L$ by, $$\nu:\mathcal{X}'\to C.$$ Projection away from $L$ defines a morphism, $$\pi':\mathcal{X}' \to B,$$ where $B$ is a linear space $\mathbb{P}^2$. Since $C$ is smooth away from $v$, the morphism $\pi'$ is clearly flat of relative dimension $d1$ away from $v$. Since $C$ has depth $2$ at $v$, for $L$ sufficiently general, the morphism $\pi'$ is also flat at $v$.
Denote the blowing up of $\mathcal{X}'$ at the vertex $v$ by $$\mu:\widehat{\mathcal{X}} \to \mathcal{X}',$$ and denote the exceptional set by $E$. Projection away from $v$ gives a morphism $\rho:\widehat{\mathcal{X}} \to A$ that is a $\mathbb{P}^1$bundle and such that $E$ is a crosssection. Consider the associated morphism, $$(\pi'\circ \mu,\rho):\widehat{\mathcal{X}} \to B\times_k A.$$ Since $\rho_E$ is an isomorphism, $(\pi'\circ \mu,\rho)$ maps $E$ injectively to $\{\pi'(v)\}\times A$. This is the key point.
Now, let $\widetilde{\mathcal{X}}$ be a smooth $k$scheme, and let $$\phi':\widetilde{\mathcal{X}} \to \mathcal{X}',$$ be a birational, proper morphism. The morphism $\rho$ induces a rational transformation, $$\rho\circ \phi' : \widetilde{\mathcal{X}} \dashrightarrow A.$$ However, since $\widetilde{\mathcal{X}}$ is smooth and $A$ is an Abelian variety, by Weil's theorem, this rational transformation extends to a regular morphism everywhere. In particular, consider the morphism $$(\pi'\circ \phi',\rho\circ \phi'):\widetilde{\mathcal{X}} \to B\times_k A.$$ Of course generically this morphism agrees with $(\pi'\circ\mu,\rho)$. In particular, both morphisms have equal (closed) image. That means that there is an irreducible closed subscheme $Z$ of $\widetilde{\mathcal{X}}$ whose image equals $\{v\}\times A$. In particular, the dimension of $Z$ is at least $\text{dim}(A)=d$. But also, $Z$ is contained in the fiber of $\pi'\circ\phi'$ over $\pi'(v)$. Since the fiber of $\pi'\circ \phi'$ over $\pi'(v)$ has dimension $>d1$, the morphism $\pi'\circ \phi'$ is not flat of dimension $d1$.
Finally, regarding the condition on $Y$, modify $\mathcal{X}'$ as follows. Since $\pi'$ is flat of relative dimension $d1$, by Bertini theorems, for a sufficiently general intersection $Y'$ of $\mathcal{X}'$ with $d1$ very ample divisors that contain $v$, the projection $$ \pi'_{Y'}:Y' \to B,$$ is finite and flat. Denote the inclusion of $Y'$ in $\mathcal{X}'$ by $$j:Y'\to \mathcal{X}'.$$ Now let $$\lambda:\mathcal{X}'\to\mathcal{X},$$ be the fiber coproduct of the morphisms $j$ and $\pi'_{Y'}$. Since $j$ and $\pi'_{Y'}$ commute with $\pi'$, there is an induced morphism, $$\pi:\mathcal{X}\to B.$$ By construction, the image $Y$ of $Y'$ is a section of $\pi$. Regarding flatness of $\pi$, there is a short exact sequence of coherent sheaves on $\mathcal{X}$, $$0 \to \mathcal{O}_X \to \lambda_*\mathcal{O}_{X'} \to (\lambda_*\mathcal{O}_{Y'}/\mathcal{O}_Y) \to 0.$$ Since $\pi'$ and $\pi'_{Y'}$ are flat over $B$, the second and third terms in this exact sequence are $\mathcal{O}_B$flat. Therefore, also the first term is $\mathcal{O}_B$flat, i.e., $\pi$ is flat.
Since the normalization of $\mathcal{X}$ is $\mathcal{X}'$, every desingularization of $\mathcal{X}$, $$\phi:\widetilde{\mathcal{X}}\to \mathcal{X},$$ factors through $\mathcal{X}'$, $$ \phi':\widetilde{\mathcal{X}}\to \mathcal{X}'.$$ Therefore, by the argument above, the morphism $\pi\circ \phi = \pi'\circ\phi'$ is not flat.