#79758·Paddle

使用PPOCRv5训练模型,出现错误:Segmentation fault,再次训练会出现系统崩溃,无任何终端输出错误,直接CPU卡死。

Author: pphh0903-labCreated Sep 10, 2026Updated Sep 10, 2026
Labelsstatus/new-issuetype/bug-report

bug描述 Describe the Bug


C++ Traceback (most recent call last):

0 egr::Backward(std::vector<paddle::Tensor, std::allocatorpaddle::Tensor > const&, std::vector<paddle::Tensor, std::allocatorpaddle::Tensor > const&, bool) 1 egr::RunBackward(std::vector<paddle::Tensor, std::allocatorpaddle::Tensor > const&, std::vector<paddle::Tensor, std::allocatorpaddle::Tensor > const&, bool, bool, std::vector<paddle::Tensor, std::allocatorpaddle::Tensor > const&, bool, std::vector<paddle::Tensor, std::allocatorpaddle::Tensor > const&) 2 MultiplyGradNode::operator()(paddle::small_vector<std::vector<paddle::Tensor, std::allocatorpaddle::Tensor >, 15u>&, bool, bool) 3 paddle::experimental::multiply_grad(paddle::Tensor const&, paddle::Tensor const&, paddle::Tensor const&, int, paddle::Tensor*, paddle::Tensor*) 4 void phi::ElementwiseMulGrad(phi::GPUContext const&, phi::DenseTensor const&, phi::DenseTensor const&, phi::DenseTensor const&, phi::DenseTensor*, phi::DenseTensor*, int) 5 phi::DenseTensor::data() const 6 phi::DenseTensor::check_memory_size() const 7 phi::DenseTensorMeta::is_contiguous() const


Error Message Summary:

FatalError: Segmentation fault is detected by the operating system. [TimeInfo: *** Aborted at 1789002148 (unix time) try "date -d @1789002148" if you are using GNU date ***] [SignalInfo: *** SIGSEGV (@0x4b010) received by PID 51298 (TID 0x799ad2748440) from PID 307216 ***]

段错误 (核心已转储)

其他补充信息 Additional Supplementary Information

尝试使用过paddlepaddle_gpu3.3,3.1,3.0,2.6,同样触发错误。正常训练过程中突然中断,log文件和终端并未输出任何代码回溯错误信息 conda环境配置: Package Version


albucore 0.0.24 albumentations 2.0.8 annotated-types 0.7.0 anyio 4.12.1 certifi 2026.1.4 charset-normalizer 3.5.1 Cython 3.3.0 decorator 5.2.1 eval_type_backport 0.4.0 exceptiongroup 1.3.1 h11 0.16.0 httpcore 1.0.9 httpx 0.28.1 idna 3.11 ImageIO 2.37.2 lazy-loader 0.5 lmdb 2.3.0 networkx 3.2.1 numpy 2.0.2 nvidia-cublas-cu11 11.11.3.6 nvidia-cuda-cupti-cu11 11.8.87 nvidia-cuda-nvrtc-cu11 11.8.89 nvidia-cuda-runtime-cu11 11.8.89 nvidia-cudnn-cu11 8.9.6.50 nvidia-cufft-cu11 10.9.0.58 nvidia-curand-cu11 10.3.0.86 nvidia-cusolver-cu11 11.4.1.48 nvidia-cusparse-cu11 11.7.5.86 nvidia-nccl-cu11 2.19.3 nvidia-nvtx-cu11 11.8.86 opencv-python 5.0.0.93 opt-einsum 3.3.0 packaging 26.3 paddlepaddle-gpu 3.1.0 pillow 11.3.0 pip 25.2 protobuf 6.33.4 pyclipper 1.3.0.post6 pydantic 2.13.5 pydantic_core 2.46.5 PyYAML 6.0.3 RapidFuzz 3.13.0 requests 2.32.5 scikit-image 0.24.0 scipy 1.13.1 setuptools 80.9.0 shapely 2.0.7 simsimd 6.5.16 stringzilla 4.6.1 tifffile 2024.8.30 tqdm 4.70.0 typing_extensions 4.15.0 typing-inspection 0.4.2 urllib3 2.6.3 wheel 0.45.1 训练参数: python3 tools/train.py -c /PaddleOCR/PaddleOCR/configs/det/PP-OCRv5/PP-OCRv5_mobile_det.yml -o Global.pretrained_model=/PaddleOCR/pretrain_model/PP-OCRv5_mobile_det_pretrained.pdparams Global.epoch_num=100 Global.save_epoch_step=20 Global.print_batch_step=10 Global.eval_batch_step="[0, 50]" Optimizer.lr.learning_rate=0.0001 Optimizer.lr.warmup_epoch=10 Train.loader.batch_size_per_card=4 Train.loader.num_workers=2 Eval.loader.num_workers=2 Train.dataset.data_dir=/OCR/det/det_image Train.dataset.label_file_list="[/OCR/det/det/train.txt]" Eval.dataset.data_dir=/OCR/det/det_image Eval.dataset.label_file_list="[/OCR/det/det/val.txt]"