Let $S$ be an integral scheme and $X \to S$ be a smooth scheme of finite type over $S$. Let $\mathcal{E}$ be a coherent sheaf on $X$, and $\eta$ be the generic point of $S$. Assume that restriction $\mathcal{E}_{X_\eta}$ is torsion free. Is it true that there exists an open subset $U$ of $S$ such that $\mathcal{E}_{X_s}$ is torsion free for every $s \in U$?

4$\begingroup$ By generic flatness, there is a dense open subscheme of $S$ over which $\mathcal{E}$ is flat. Replacing $S$ by this open, the torsionfree locus is open in the domain $X$, cf. EGA IV_3, Th'eor`eme 12.1.1(ii), p. 174. Thus, the finitely many embedded primes of $\mathcal{E}$ are closed subsets of $X$ that are disjoint from the central fiber. The images of these subsets in $S$ are constructible subsets that do not contain the generic point of $S$. Thus, they are nowhere dense. The union of the closures is a proper closed subset. The open $U$ is the complement. $\endgroup$– Jason StarrJun 27, 2017 at 17:20

$\begingroup$ Typo correction: "central fiber" > "generic fiber". $\endgroup$– Jason StarrJun 27, 2017 at 17:43
2 Answers
I am just posting my comment as an answer. Since $f:X\to S$ is smooth of finite type, in particular it is of finite presentation. By limit theorems, after replacing $S$ by the open in an open affine covering, there exists a Cartesian diagram, $$\begin{array}{ccc} X & \xrightarrow{f} & S \\ u~\downarrow & & \downarrow~v \\ X_0 & \xrightarrow{f_0} & S_0\end{array}, $$ such that $f_0$ is smooth and finite type, and such that $S_0$ is integral and Noetherian (even a finite type affine scheme over $\text{Spec}\ \mathbb{Z}$). Up to replacing $S_0$ by a finite type $S_0$scheme through which $v$ factors, also there exists $\mathcal{E}_0$ on $X_0$ whose pullback by $u$ equals $\mathcal{E}$. Finally, up to replacing $S_0$ by the closure of the image of $v$, assume that $S_0$ is integral and that $v$ is dominant. For every $s$ in $S$ with image point $s_0$ in $S$, the fiber $X_s=\text{Spec}\ \kappa(s)\times_S X$ is the base change of the fiber $X_{s_0} = \text{Spec}\ \kappa(s_0)\times_{S_0} X_0$ via the field extension $\kappa(s_0)\hookrightarrow \kappa(s)$. If the pullback of $\mathcal{E}_0$ to $X_{s_0}$ is torsionfree, then also the flat base change by $\kappa(s_0)\hookrightarrow \kappa(s)$ is also torsionfree. Therefore it suffices to prove the result for $f_0$ and $\mathcal{E}_0$. Without loss of generality, assume that $S$ is Noetherian.
By the Generic Flatness Theorem, there exists a dense open subset of $S$ over which $\mathcal{E}$ is $S$flat. Up to replacing $S$ by this dense open subset, assume that $\mathcal{E}$ is $S$flat. By Théorème 12.1.1(iii) on p. 174 of the following,
MR0217086 (36 #178)
Grothendieck, A.
Éléments de géométrie algébrique. IV.
Étude locale des schémas et des morphismes de schémas. III.
Inst. Hautes Études Sci. Publ. Math. No. 28 1966 255 pp.
http://www.numdam.org/article/PMIHES_1966__28__5_0.pdf
the following set of points $x$ in $X$ is an open subset $V$ of $X$: those $x$ such that the restriction of $\mathcal{E}$ to the fiber $X_{f(s)}$ has no embedded primes containing the point $x$ of the fiber $X_{f(s)}$.
The complement $C=X\setminus V$ is a closed subset. By hypothesis, $C$ is disjoint from the fiber $X_\eta$ over the generic point $\eta$ of $S$. Thus, $f(C)$ is a constructible subset of $S$ that does not contain $\eta$. Therefore the closure of $f(C)$ is a closed subset of $S$ that does not contain $\eta$. For the open complement $U$ in $S$ of the closure of $f(C)$, the inverse image $f^{1}(U)$ is contained in $V$. Therefore, for every $s\in U$, the restriction of $\mathcal{E}$ to the fiber $X_s$ has no embedded primes, i.e., the restriction is torsionfree.
The answer is yes, and this is proved also in [Maruyama, M. Openness of a family of torsion free sheaves. J. Math. Kyoto Univ. 163 (1976), 627637], prop. 2.1