This section describes how to construct simple faults, including node faults, parameter plane network faults, and service plane faults.
Constructing a processor fault may cause security risks. Contact Huawei technical support to perform this operation.
Restart the training node to simulate node status loss caused by node power-off. This fault can be automatically rectified after the node is restarted.
reboot
kubectl get pod -A
The pod status changes from Terminating to Pending and finally to Running, indicating that the training job has been restarted.
kubectl logs -n Namespace_name Pod_name
1 2 3 | [2025-06-22 14:47:00] iteration 10/ 5000 | consumed samples: 640 | elapsed time per iteration (ms): 1932.5 | learning rate: 2.500000E-07 | global batch size: 64 | lm loss: 1.053084E+01 | loss scale: 1.0 | g rad norm: 56.739 | num zeros: 0 | number of skipped iterations: 0 | number of nan iterations: 0 | [2025-06-22 14:47:02] iteration 11/ 5000 | consumed samples: 704 | elapsed time per iteration (ms): 1981.0 | learning rate: 2.750000E-07 | global batch size: 64 | lm loss: 1.044677E+01 | loss scale: 1.0 | g rad norm: 57.590 | num zeros: 0 | number of skipped iterations: 0 | number of nan iterations: 0 | ...... |
A parameter plane network fault can be simulated by disconnecting the NPU network link. NPU network faults do not affect single-server training jobs. After the link is disconnected, you need to manually restore the link. Otherwise, the fault persists.
hccn_tool -i {device_id} -link -s down
device_id indicates the NPU ID. You can run the npu-smi info command to view the NPU ID.
hccn_tool -i {device_id} -net_health -g
1 | net health status: Fault |
kubectl get pod -A
The pod status changes from Terminating to Pending and finally to Running, indicating that the training job has been restarted.
kubectl logs -n Namespace_name Pod_name
1 2 3 | [2025-06-22 14:47:00] iteration 10/ 5000 | consumed samples: 640 | elapsed time per iteration (ms): 1932.5 | learning rate: 2.500000E-07 | global batch size: 64 | lm loss: 1.053084E+01 | loss scale: 1.0 | g rad norm: 56.739 | num zeros: 0 | number of skipped iterations: 0 | number of nan iterations: 0 | [2025-06-22 14:47:02] iteration 11/ 5000 | consumed samples: 704 | elapsed time per iteration (ms): 1981.0 | learning rate: 2.750000E-07 | global batch size: 64 | lm loss: 1.044677E+01 | loss scale: 1.0 | g rad norm: 57.590 | num zeros: 0 | number of skipped iterations: 0 | number of nan iterations: 0 | ...... |
hccn_tool -i {device_id} -cfg recovery
hccn_tool -i {device_id} -net_health -g
1 | net health status: Success |
A service plane fault can be simulated by deleting the training process.
ps -ef | grep python| grep Training startup script .py
kill -9 pid
kubectl get pod -A
The pod status changes from Terminating to Pending and finally to Running, indicating that the training job has been restarted.
kubectl logs -n Namespace_name Pod_name
The sample output below shows that the latest checkpoint file from the ninth iteration is used to resume training at the tenth iteration after a fault occurs.
1 2 3 | [2025-06-22 14:47:00] iteration 10/ 5000 | consumed samples: 640 | elapsed time per iteration (ms): 1932.5 | learning rate: 2.500000E-07 | global batch size: 64 | lm loss: 1.053084E+01 | loss scale: 1.0 | g rad norm: 56.739 | num zeros: 0 | number of skipped iterations: 0 | number of nan iterations: 0 | [2025-10-16 14:47:02] iteration 11/ 5000 | consumed samples: 704 | elapsed time per iteration (ms): 1981.0 | learning rate: 2.750000E-07 | global batch size: 64 | lm loss: 1.044677E+01 | loss scale: 1.0 | g rad norm: 57.590 | num zeros: 0 | number of skipped iterations: 0 | number of nan iterations: 0 | ...... |