Skip to content

鲲鹏920 Arm64 使用 OCR V5解析pdf或者图片报错:Segmentation fault is detected by the operating system #16609

@sduqlsc

Description

@sduqlsc

🔎 Search before asking

  • I have searched the PaddleOCR Docs and found no similar bug report.
  • I have searched the PaddleOCR Issues and found no similar bug report.
  • I have searched the PaddleOCR Discussions and found no similar bug report.

🐛 Bug (问题描述)

图片大小为1656*2339,无论enable_mkldnn是True还是False,都会报错。pdf识别同样的错误,145K以及3.8M都会报错,但是使用general_ocr_002.png正常。同样的文件,V3目前表现正常。并且这里也测试使用自己编译paddleinference以及ocr测试,同样效果不理想。

ocr = PaddleOCR(
            lang="ch",
            ocr_version="PP-OCRv3",
            enable_mkldnn=True,
            cpu_threads=8,
            use_doc_orientation_classify=False,
            use_doc_unwarping=False,
            use_textline_orientation=False,
            device='cpu'
        )

🏃‍♂️ Environment (运行环境)

OS : Ubuntu 22.04.4  ARM64 Docker
Python: 3.10.12
paddleocr                3.2.0
CPU: kunpeng-920
CUDA: None
NPU: None

🌰 Minimal Reproducible Example (最小可复现问题的Demo)

Python 3.10.12 (main, Aug 15 2025, 14:32:43) [GCC 11.4.0] on linux

>>> import os
>>> import sys
>>> import time
>>> import io
>>> import json
>>> from datetime import datetime
>>> from paddleocr import PaddleOCR
>>> img_file="../img_test/contract_00.jpg"
>>> ocr = PaddleOCR(
...             lang="ch",
...             device='cpu',
...             enable_mkldnn=False,
...             cpu_threads=8,
...             use_doc_orientation_classify=False,
...             use_doc_unwarping=False,
...             use_textline_orientation=True
...         )
Creating model: ('PP-LCNet_x1_0_textline_ori', None)
Model files already exist. Using cached files. To redownload, please delete the directory manually: `/root/.paddlex/official_models/PP-LCNet_x1_0_textline_ori`.
Creating model: ('PP-OCRv5_server_det', None)
Model files already exist. Using cached files. To redownload, please delete the directory manually: `/root/.paddlex/official_models/PP-OCRv5_server_det`.
Creating model: ('PP-OCRv5_server_rec', None)
Model files already exist. Using cached files. To redownload, please delete the directory manually: `/root/.paddlex/official_models/PP-OCRv5_server_rec`.
>>> result = ocr.predict(img_file)


--------------------------------------
C++ Traceback (most recent call last):
--------------------------------------
0   paddle::AnalysisPredictor::ZeroCopyRun(bool)
1   paddle::framework::NaiveExecutor::RunInterpreterCore(std::vector<std::string, std::allocator<std::string > > const&, bool, bool)
2   paddle::framework::InterpreterCore::Run(std::vector<std::string, std::allocator<std::string > > const&, bool, bool, bool, bool)
3   paddle::framework::PirInterpreter::Run(std::vector<std::string, std::allocator<std::string > > const&, bool, bool, bool, bool)
4   paddle::framework::PirInterpreter::TraceRunImpl()
5   paddle::framework::PirInterpreter::TraceRunInstructionList(std::vector<std::unique_ptr<paddle::framework::InstructionBase, std::default_delete<paddle::framework::InstructionBase> >, std::allocator<std::unique_ptr<paddle::framework::InstructionBase, std::default_delete<paddle::framework::InstructionBase> > > > const&)
6   paddle::framework::PirInterpreter::RunInstructionBase(paddle::framework::InstructionBase*)
7   paddle::framework::PhiKernelInstruction::Run()
8   phi::KernelImpl<void (*)(phi::CPUContext const&, phi::DenseTensor const&, phi::DenseTensor const&, std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&, std::string const&, std::vector<int, std::allocator<int> > const&, int, std::string const&, phi::DenseTensor*), &(void phi::ConvKernel<float, phi::CPUContext>(phi::CPUContext const&, phi::DenseTensor const&, phi::DenseTensor const&, std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&, std::string const&, std::vector<int, std::allocator<int> > const&, int, std::string const&, phi::DenseTensor*))>::Compute(phi::KernelContext*)
9   void phi::ConvKernelImpl<float, phi::CPUContext>(phi::CPUContext const&, phi::DenseTensor const&, phi::DenseTensor const&, std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&, std::string const&, int, std::vector<int, std::allocator<int> > const&, std::string const&, phi::DenseTensor*)
10  phi::funcs::Im2ColFunctor<(phi::funcs::ColFormat)0, phi::CPUContext, float>::operator()(phi::CPUContext const&, phi::DenseTensor const&, std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&, phi::DenseTensor*, common::DataLayout)

----------------------
Error Message Summary:
----------------------
FatalError: `Segmentation fault` is detected by the operating system.
  [TimeInfo: *** Aborted at 1759193212 (unix time) try "date -d @1759193212" if you are using GNU date ***]
  [SignalInfo: *** SIGSEGV (@0xfff58b4b1480) received by PID 171857 (TID 0xfffe1c250420) from PID 18446744071751537792 ***]

Segmentation fault (core dumped)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions