The aim of this paper is to show that the Jacobi–Davidson (JD) method is an accurate and robust method for solving large generalized algebraic eigenvalue problems with a singular second matrix. Such problems are routinely encountered in linear hydrodynamic stability analysis of flows that arise in various areas of continuum mechanics. As we use the Chebyshev collocation as a discretization method, the first matrix in the pencil is nonsymmetric, full rank, and ill-conditioned. Because of the singularity of the second matrix, QZ and Arnoldi-type algorithms may produce spurious eigenvalues. As a systematic remedy of this situation, we use two JD methods, corresponding to real and complex situations, to compute specific parts of the spectrum of the eigenvalue problems. Both methods overcome potentially severe problems associated with spurious unstable eigenvalues and are fairly stable with respect to the order of discretization. The real JD outperforms the shift-and-invert Arnoldi method with respect to the CPU time for large discretizations. Three specific flows are analyzed to advocate our statements, namely a multicomponent convection–diffusion in a porous medium, a thermal convection in a variable gravity field, and the so-called Hadley flow. Copyright © 2012 John Wiley & Sons, Ltd.