We present a series of nonequilibrium molecular dynamics simulations, investigating the rupture mechanisms in glassy polymer films confined between two solid surfaces. Such systems provide a useful model for the strong nonlinear reinforcement of rubber by colloidal filler particles. Depending on the degree of confinement three qualitatively different rupture modes have been found, which originate from the interplay of internal (polymer-polymer) and external (polymer-wall) interactions. In very thin films we observe the formation and stretching of many single-chain bridges between the confining surfaces. Progressing to thicker samples we observe fewer bridges, consisting of bundled polymer chains, and eventually just one large bridge in thick specimens. The yield stress and the elongational modulus of the polymer films have been calculated from the stress-strain curves at various temperatures and confinements and their behavior has been analyzed in terms of polymer-polymer and polymer-surface interaction energies. The thinnest films (5 monomer diameters) are always glassy in our simulations, while the others display a glass transition temperature around 0.50-0.55 (in units ε(0)/k(B) of the Lennard-Jones interaction energy), depending on their thickness. This range of values, which has been determined using both the nonequilibrium tensile simulations and equilibrium diffusion data, agrees with the transition temperature previously found by shear simulations [Baljon and Robbins, Science 271, 482 (1996)].