Failure mechanism in fiber-shaped electrodes for lithium-ion batteries