In a recent study of diffusional creep in polycrystalline thin films deposited on substrates, we have discovered a new class of defects called the grain boundary diffusion wedges (Gao et al., Acta Mat. 47, pp. 2865-2878, 1999). These diffusion wedges are formed by stress driven mass transport between the free surface of the film and the grain boundaries during the process of substrate-constrained grain boundary diffusion. The mathematical modeling involves solution of integro-differential equations representing a strong coupling between elasticity and diffusion. The solution can be decomposed into diffusional eigenmodes reminiscent of crack-like opening displacement along the grain boundary which leads to a singular stress field at the root of the grain boundary. We find that the theoretical analysis successfully explains the difference between the mechanical behaviors of passivated and unpassivated copper films during thermal cycling on a silicon substrate. An important implication of our theoretical analysis is that dislocations with Burgers vector parallel to the interface can be nucleated at the root of the grain boundary. This is a new dislocation mechanism in thin films which contrasts to the well known Mathews-Freund-Nix mechanism of threading dislocation propagation. Recent TEM experiments at the Max Planck Institute for Metals Research have shown that, while threading dislocations dominate in passivated metal films, parallel glide dislocations begin to dominate in unpassivated copper films with thickness below 400 nm. This is consistent with our theoretical predictions. We have developed large scale molecular dynamics simulations of grain boundary diffusion wedges to clarify the nucleation mechanisms of parallel glide in thin films. Such atomic scale simulations of thin film diffusion not only show results which are consistent with both continuum theoretical and experimental studies, but also revealed the atomic processes of dislocation nucleation, climb, glide and storage in grain boundaries. The study should have far reaching implications for modeling deformation and diffusion in micro- and nanostructured materials.