The Euler characteristic of a cubic Fermat surface Let $F$ denote the cubic Fermat surface in $\mathbf{P}^3$ (everything is over the complex numbers):
$$ F = \{ X^3 + Y^3 + Z^3 + W^3  = 0\}\subseteq \mathbf{P}^3.$$
I wish to compute the Euler characteristic of this variety. (It is known to be 9, but I'm more interested in the method.) The approach I want to take is using complex Morse theory via Lefschetz pencils, as outlined by e.g. Lamotke or Nicolaescu. For a given pencil of hyperplanes in $\mathbf{P}^N$ and $X$ a (smooth) variety of dimension $n$ in $\mathbf{P}^N$, then we have a formula
$$ \chi (X) = 2\chi(X_b) - \chi(B) + (-1)^n r$$
where $X_b$ is a generic hyperplane section, $B$ is the base locus (i.e., the intersection of all hyperplanes in the pencil with $X$), and $r$ is the number of singular sections of the pencil (i.e., the number of hyperplanes in the pencil which do not intersect $X$ in a smooth variety). 
I apply this to the pencil
$$ \{ H_{[\lambda:\mu]}\}_{[\lambda:\mu]\in\mathbf{P}^1}, \qquad \text{where}\quad H_{[\lambda:\mu]} := \{ \lambda X + \mu Y = 0\}.$$
This is a Lefschetz pencil in the sense of Lamotke, and it is not difficult to see that $B$ is a discrete set of three points. A generic hyperplane section is just an elliptic curve, so that the above formula reduces to
$$\chi(F) = r - 3.$$
So we are left to find the number of hyperplanes that intersect $F$ in a singular variety, and it is here that I end up making a mistake. Let me outline my approach.
It is easy to see that $H_{[1:0]}$ is not one of the singular sections, so without loss of generality we may put $\mu=1$. The intersection $F \cap H_{[\lambda:1]}$ then becomes
$$ \{X^3 + Y^3 + Z^3 + W^3  = 0,\ \lambda X + Y = 0 \}.$$
The hyperplane $H_{[\lambda:1]}$ determines an embedding $\mathbf{P}^2 \to \mathbf{P}^3$ with image this hyperplane. This is an isomorphism onto its image, so studying this intersection is the same as studying the pullback of $F$ along this map, which is the variety
$$ \{(1 -\lambda^3) X^3 + Z^3 + W^3  = 0\}\subseteq \mathbf{P}^2$$
where I have chosen to use coordinates $(X,Z,W)$ on $\mathbf{P}^2$ for obvious reasons.
This is singular precisely when $\lambda^3 = 1$, i.e., when $\lambda$ is a third root of unity.
This would yield $r=3$, so that $\chi(F) = 0$, which is impossible.
(Even if one doesn't know the Euler characteristic, one can easily compute all but the second homology groups of $F$, and deduce that $\chi(F)$ must be at least 3.) Which singular sections am I missing?
 A: $\textbf{Lefschetz pencil.}$ As Lazzaro pointed out, the pencil you chose is not a Lefschetz pencil. A Lefschetz pencil is a general line in the dual space $(\mathbb P^3)^{\vee}$ intersecting the dual variety $\mathcal{D}$ of $F$ transversely at finitely many points (the number equals to $\deg \mathcal{D}$). To calculate this number, recall that the dual variety $\mathcal{D}$ is the image of the dual map 
$$F\to (\mathbb P^3)^{\vee},\  x\mapsto (\frac{\partial F}{\partial X}(x),\frac{\partial F}{\partial Y}(x), \frac{\partial F}{\partial Z}(x),\frac{\partial F}{\partial W}(x)).$$ 
Take two general hyperplane planes $\{a_iL+b_iJ+c_iK+d_iH=0,i=1,2\}$ in the dual space $(\mathbb P^3)^{\vee}$. It follows that their intersections with $\mathcal{D}$ coincides with the solutions of 
$$F=0,\ a_i\frac{\partial F}{\partial X}+b_i\frac{\partial F}{\partial Y}+c_i\frac{\partial F}{\partial Z}+d_i\frac{\partial F}{\partial W}=0,\ i=1,2$$
which contains $3\times 2\times 2=12$ points.
In particular, for a Lefschetz pencil of your Fermat cubic, there are exactly $12$ nodal cubic curves, so by applying your formula $\chi(F)=12-3=9.$
p.s., Usually we don't need to write down a Lefschetz pencil explicitly.
$\textbf{Special pencil.}$ However, it is still possible to calculate $\chi(F)$ via the pencil $\lambda X+Y=0$ that you chose. All you need is some topological properties of Eular characteristic $\chi$.
$\require{AMScd}$
\begin{CD}
\tilde{F} @>{\pi}>> \mathbb P^1\\
@V{\sigma}VV \\
F 
\end{CD}
Consider the diagram where $\sigma$ blowup base locus (three points) so $\chi(\tilde{F})=\chi(F)+3$. $\pi$ is elliptic fibration with three singular fibers $C_{\omega^i},i=0,1,2$ are three cocurrent lines so 
$\bullet$ $\chi(C_{\omega^i})=h^0+h^2=1+3=4$; 
$\bullet$ The exclusion $U=\tilde{F}\setminus \{C_1,C_{\omega},C_{\omega^2}\}$ gives $\chi(\tilde{F})=\chi(U)+\sum \chi(C_{\omega^i})=\chi(U)+12$;
$\bullet$ The restriction $\pi_U:U\to V$ is a smooth fiber bundle, where $V=\mathbb P^1\setminus \{1,\omega,\omega^2\}$, so $\chi(U)=\chi(V)\chi(\text{elliptic curve})=0$.
Put these results together, you get $\chi(F)=9$.
