Diffusion-induced stresses and their relaxation