What are some examples of $4$-manifolds $M$ for which the class $w_3(TM)\in H^3(M;\mathbb{Z}/2)$ is nontrivial? Is there a mapping torus with this property?
Motivation: I am wondering whether any such $4$-manifolds can be "built out of" a $3$-manifold by the mapping torus construction, despite the fact that $w_3$ vanishes on $3$-manifolds. In asking myself this, I realized my that go-to examples of $4$-manifolds -- $\mathbb{R} P^4$, $\mathbb{C} P^2$, and $K3$ -- all have trivial $w_3$.
This is a partial answer, showing what one should demand if they were to try to find an example with $w_3(T_f) \neq 0$: If $M$ is an orientable 4-manifold then $w_3(M) = 0$. So $f$ would have to either be an orientation-reversing diffeomorphism or a diffeomorphism of a non-orientable manifold.
To prove this, use Wu classes. These are the classes $\nu_i \in H^i(M;\Bbb Z/2)$ for which the two maps $H^{n-i}(X;\Bbb Z/2) \to \Bbb Z/2$ given by $\nu_i \cdot x$ and $\text{Sq}^i x$ agree. Wu's theorem is that we have the property $$\sum_{i=0}^{\lfloor k/2\rfloor} \text{Sq}^{k-i} \nu_i = w_i.$$
We see from the definition that $\nu_3 = 0$ because $\text{Sq}^3$ vanishes on classes of degree less than $3$, and we see from orientability that $\nu_1 = 0$, and hence $\nu_2 = w_2$. Therefore we have $w_3 = \text{Sq}^1 w_2$. (In fact, this is true for an arbitrary 4-manifold; one needs to argue that $(\text{Sq}^1)^2 w_1$, which in principle contributes, is always zero). The operation $\text{Sq}^1$ is sometimes better known as the Bockstein map. This map factors as the composite of the integral Bockstein $\beta_{\Bbb Z}: H^2(M;\Bbb Z/2) \to H^3(M;\Bbb Z)$ and reducing coefficients modulo 2, so it suffices to show that if $M$ is an oriented closed 4-manifold, we have $\beta_{\Bbb Z} w_2(M) = 0$.
A really elegant proof of this fact is given in the main proposition of this short note. I will not reproduce it. The essential point is that the Bockstein long exact sequence shows that $\beta_{\Bbb Z} w_2(M) = 0$ if and only if $w_2(M)$ lifts to an integral class, and that note explains how to show that $w_2(M)$ lifts to an integral class.