Damage mechanics of electromigration induced failure