Just a note on the construction of the example Francesco mentioned, since in my opinion it is very instructive.
Let $X$ be either the Veronese surface or a rational quartic scroll in $\mathbb P^5$. In the first case, it is $\mathbb P^2$ embedded via the global sections of $\mathscr O_{\mathbb P^2}(2)$ and in the second case it is $\mathbb P^1\times \mathbb P^1$ embedded via the global sections of $\mathscr O_{\mathbb P^1\times \mathbb P^1}(2,1)$. In both cases you get a degree $4$ surface in $\mathbb P^5$ and hence a general hyperplane section of both gives you a rational quartic curve in $\mathbb P^4$, let's call it $C$.
So, the projective cone over $X$ in $\mathbb P^5$ has two different significant hyperplane sections: If the hyperplane misses the vertex, then the section is a copy of $X$ and if it goes through the vertex and is general among those, then it is a projective cone over $C$, let's call that $Y$.
It is easy to see that the different hyperplane sections are deformations of each other, so this way you get a family with general fiber $X$ and special fiber $Y$. Clearly, for the two different choices of $X$ the two corresponding families can't both be $\mathbb Q$-Gorenstein deformations, since
$$9=K_{\mathbb P^2}^2 \neq K_{\mathbb P^1\times \mathbb P^1}^2=8,$$
and as Francesco explained the cone over the quartic has $K^2=9$, so it is the quartic scroll who is the culprit and the reason for this issue is that the canonical of the scroll and the hyperplane class are incomparable, and hence the canonical of the total space is not going to be a torsion in the local class group which is what makes the (relative) canoncial not $\mathbb Q$-Cartier at the vertex.
The importance of this example is that it explains an interesting phenomenon in the moduli theory of canonically polarized varieties of dimension at least $2$ (as opposed to curves). While stable curves are Gorenstein and hence any family of stable curves is automatically Gorenstein (not just $\mathbb Q$-Gorenstein), the same is not true for surfaces and higher dimensional varieties.
This means that a stable family in dimensions at least $2$ is not simply a family of stable objects, but has an additional condition about the compatibility of the canonical polarizations. There are actually more intriguing issues that come up, but let me not write a book here, so if you want to know more about this check out the following references.
The last paper by Altmann and Kollár is actually a major (very recent) breakthrough in this question, resolving an open problem that has baffled many people in the last 25 years. In particular, from their work it follows that even just asking that a stable family be $\mathbb Q$-Gorenstein, one needs to assume something known as "Kollár's condition". Well, Altmann and Kollár call it "qG-deformation", but everyone else calls it "Kollár's condition". You can read about the difference between Viehweg's functor and Kollár's functor in the first two references, and see that in both of them the status is reported as unknown whether those two functors are really different in characteristic $0$, but now due the [AK16] we know they are.
Hacon, Christopher D.; Kovács, Sándor J. Classification of higher dimensional algebraic varieties. Oberwolfach Seminars, 41. Birkhäuser Verlag, Basel, 2010. x+208 pp. ISBN: 978-3-0346-0289-1
Kovács, Sándor J. Young person's guide to moduli of higher dimensional varieties. Algebraic geometry—Seattle 2005. Part 2, 711–743, Proc. Sympos. Pure Math., 80, Part 2, Amer. Math. Soc., Providence, RI, 2009.
Klaus Altmann, János Kollár; The dualizing sheaf on first-order deformations of toric surface singularities, arXiv:1601.07805 [math.AG]