Physics of failure