Performing detailed studies of viscoelastic dewetting of thin polystyrene films on solid substrates, we demonstrate the existence of residual stress due to strongly out of equilibrium chain conformations and a reduced entanglement density resulting from film preparation by spin coating. The ratio of stress over elastic modulus was found to increase strongly with decreasing film thickness and increasing chain length. Full equilibration of chain conformations required long times comparable to bulk reptation times. However, for chains longer than about 3000 monomers, the residual stress relaxed faster, at a rate independent of chain length.