The propagation of guided internal waves on non-uniform large-scale flows of arbitrary geometry is studied within the framework of linear inviscid theory in the WKB-approximation. Our study is based on a set of Hamiltonian ray equations, with the Hamiltonian being determined from the Taylor-Goldstein boundary-value problem for a stratified shear flow. Attention is focused on the fundamental fact that the generic smooth non-uniformities of the large-scale flow result in specific singularities of the Hamiltonian. Interpreting wave packets as particles with momenta equal to their wave vectors moving in a certain force field, one can consider these singularities as infinitely deep potential holes acting quite similarly to the ‘black holes’ of astrophysics. It is shown that the particles fall for infinitely long time, each into its own ‘black hole’. In terms of a particular wave packet this falling implies infinite growth with time of the wavenumber and the amplitude, as well as wave motion focusing at a certain depth. For internal-wave-field dynamics this provides a robust mechanism of a very specific conservative and moreover Hamiltonian irreversibility. This phenomenon was previously studied for the simplest model ot the flow nonuniformity, parallel shear flow (Badulin, Shrira & Tsimring 1985), where the term ‘trapping’ for it was introduced and the basic features were established. In the present paper we study the case of arbitrary flow geometry. Our main conclusion is that although the wave dynamics in the general case is incomparably more complicated, the phenomenon persists and retains its most fundamental features. Qualitatively new features appear as well, namely, the possibility of three-dimensional wave focusing and of ‘non-dispersive’ focusing. In terms of the particle analogy, the latter means that a certain group of particles fall into the same hole. These results indicate a robust tendency of the wave field towards an irreversible transformation into small spatial scales, due to the presence of large-scale flows and towards considerable wave energy concentration in narrow spatial zones.