Closed xiaomore closed 3 years ago
同样的问题。 我从GPU换回CPU也米有解决。我是按照https://github.com/PaddlePaddle/PaddleOCR/blob/release/2.1/deploy/hubserving/readme.md 这个链接部署的paddlehub
我的环境如下: paddlepaddle==2.1.1 paddlehub==1.8.3 paddleocr release/2.1分支
执行下面的命令 python deploy/hubserving/ocr_system/module.py
0 paddle::framework::SignalHandle(char const*, int) 1 paddle::platform::GetCurrentTraceBackString[abi:cxx11]()
FatalError: Segmentation fault
is detected by the operating system.
[TimeInfo: Aborted at 1627460096 (unix time) try "date -d @1627460096" if you are using GNU date ]
[SignalInfo: SIGSEGV (@0x0) received by PID 59567 (TID 0x7f67be2b6740) from PID 0 ]
cuda版本可以重装为10.2或者11.0/2吗?这块不清楚是否为cuda环境和实际paddle编译的cuda版本不一样导致的~
我和楼主一起的,我们更换了cuda和cudnn版本,目前的环境版本cuda11.0, cudnn8.0.4,安装了paddlepaddle-gpu2.1.1.post110,还是没有解决。环境如下 absl-py==0.13.0 antlr4-python3-runtime==4.8 astor==0.8.1 attrs==21.2.0 cached-property==1.5.2 certifi==2021.5.30 charset-normalizer==2.0.3 click==8.0.1 cloudpickle==1.6.0 cycler==0.10.0 Cython==0.29.24 dataclasses==0.8 decorator==4.4.2 detectron2==0.4+cu111 Flask==1.1.1 future==0.18.2 fuzzysearch==0.7.3 fuzzywuzzy==0.18.0 fvcore==0.1.3.post20210317 gast==0.5.1 google-pasta==0.2.0 grpcio==1.38.1 gunicorn==20.0.4 h5py==3.1.0 idna==3.2 imageio==2.9.0 imgaug==0.4.0 importlib-metadata==4.6.1 Interface==2.11.1 iopath==0.1.9 itsdangerous==2.0.1 jieba==0.39 Jinja2==3.0.1 joblib==1.0.1 Keras==2.2.4 Keras-Applications==1.0.8 Keras-Preprocessing==1.1.2 kiwisolver==1.3.1 lmdb==1.2.1 lxml==4.6.3 Markdown==3.3.4 MarkupSafe==2.0.1 matplotlib==3.3.4 networkx==2.5.1 numpy==1.18.5 nvidia-cublas==11.2.1.74 nvidia-cuda-cupti==11.1.69 nvidia-cuda-nvcc==11.1.74 nvidia-cuda-nvrtc==11.1.105 nvidia-cuda-runtime==11.1.74 nvidia-cudnn==8.0.4.30 nvidia-cufft==10.3.0.74 nvidia-curand==10.2.2.74 nvidia-cusolver==11.0.0.74 nvidia-cusparse==11.2.0.275 nvidia-dali-cuda110==0.27.0 nvidia-dali-nvtf-plugin==0.27.0+nv20.11 nvidia-nccl==2.8.2 nvidia-pyindex==1.0.1 nvidia-tensorboard==1.15.0+nv20.11 nvidia-tensorflow==1.15.4+nv20.11 nvidia-tensorrt==7.2.1.6 omegaconf==2.1.0 opencv-python==4.2.0.32 opt-einsum==3.3.0 paddlepaddle-gpu==2.1.1.post110 pandas==1.0.5 pdf2image==1.16.0 pdfminer3k==1.3.4 Pillow==8.3.1 ply==3.11 portalocker==2.3.0 protobuf==3.17.3 pyclipper==1.3.0 pycocotools==2.0.2 pydot==1.4.2 PyMuPDF==1.18.14 pyparsing==2.4.7 PyPDF2==1.26.0 python-dateutil==2.8.2 python-docx==0.8.10 python-Levenshtein==0.12.0 pytz==2021.1 PyWavelets==1.1.1 PyYAML==5.4.1 requests==2.26.0 scikit-image==0.15.0 scikit-learn==0.24.2 scipy==1.5.4 Shapely==1.7.1 six==1.16.0 synonyms==3.10.2 tabulate==0.8.9 tensorboard @ https://pypi.ngc.nvidia.com/tensorboard/tensorboard-1.15.0-py2.py3-none-any.whl tensorflow-estimator==1.15.1 tensorflow-gpu==1.14.0 termcolor==1.1.0 threadpoolctl==2.2.0 torch==1.8.0+cu111 torchaudio==0.8.0 torchvision==0.9.0+cu111 tqdm==4.61.2 typing-extensions==3.10.0.0 urllib3==1.26.6 webencodings==0.5.1 Werkzeug==2.0.1 wrapt==1.12.1 xlrd==1.2.0 xlwt==1.3.0 yacs==0.1.8 zipp==3.5.0 zope.event==4.5.0 zope.interface==5.4.0 zope.schema==6.1.0
This error occasionally occurs due to the compatibility of cudnn and CUDA versions. According to issue #3379, with paddlepaddle-gpu==2.1.1.post110 using cuda 11.0 and cudnn 8.0.4, the error disappears. Or,with paddlepaddle-gpu==2.1.1.post101 using cuda 10.1 and cudnn 7.5, it is also well tested by the developers without errors.
Moreover, rebuilting a new and clean docker or env also helps slove this problem.
Since you haven\'t replied for more than 3 months, we have closed this issue/pr. If the problem is not solved or there is a follow-up one, please reopen it at any time and we will continue to follow up. It is recommended to pull and try the latest code first. 由于您超过三个月未回复,我们将关闭这个issue/pr。 若问题未解决或有后续问题,请随时重新打开(建议先拉取最新代码进行尝试),我们会继续跟进。
官方不给解释和解决方案吗?
@qinhuangdaoStation 更新一下paddle版本到3.0就好了
@qinhuangdaoStation 更新一下paddle版本到3.0就好了
3.0现在还是beta版本吧?
我试着换成了python=3.9, 然后paddlepaddle-gpu=2.6.1.post117(cudatoolkit=11.7),解决了。
但是在python=3.7, paddlepaddle-gpu=2.3.1d的时候,使用下面的加载方式报错了:
_static_model_file = os.path.join(model_dir, "inference.pdmodel") _static_params_file = os.path.join(model_dir, "inference.pdiparams") _config = paddle.inference.Config(_static_model_file, _static_params_file) self.predictor = paddle.inference.create_predictor(_config)
报错的内容如下,不知道有没有遇到过,帮忙解答下:
2024-08-06T09:17:59.747797530Z [libprotobuf ERROR /paddle/build/third_party/protobuf/src/extern_protobuf/src/google/protobuf/message_lite.cc:119] Can't parse message of type "paddle.framework.proto.ProgramDesc" because it is missing required fields: blocks[1].ops[16].attrs[13].type 2024-08-06T09:17:59.753752488Z [libprotobuf ERROR /paddle/build/third_party/protobuf/src/extern_protobuf/src/google/protobuf/message_lite.cc:119] Can't parse message of type "paddle.framework.proto.ProgramDesc" because it is missing required fields: blocks[1].ops[16].attrs[13].type 2024-08-06T09:17:59.757954750Z [2024-08-06 17:17:59 +0800] [17]: [ERROR] Exception in worker process 2024-08-06T09:17:59.757970633Z Traceback (most recent call last): 2024-08-06T09:17:59.757973948Z File "/opt/huawei/miniconda/envs/python36/lib/python3.7/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker 2024-08-06T09:17:59.757977633Z worker.init_process() 2024-08-06T09:17:59.757980358Z File "/opt/huawei/miniconda/envs/python36/lib/python3.7/site-packages/gunicorn/workers/ggevent.py", line 203, in init_process 2024-08-06T09:17:59.757983440Z super(GeventWorker, self).init_process() 2024-08-06T09:17:59.757986138Z File "/opt/huawei/miniconda/envs/python36/lib/python3.7/site-packages/gunicorn/workers/base.py", line 129, in init_process 2024-08-06T09:17:59.757989005Z self.load_wsgi() 2024-08-06T09:17:59.757991734Z File "/opt/huawei/miniconda/envs/python36/lib/python3.7/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi 2024-08-06T09:17:59.757994576Z self.wsgi = self.app.wsgi() 2024-08-06T09:17:59.758005712Z File "/opt/huawei/miniconda/envs/python36/lib/python3.7/site-packages/gunicorn/app/base.py", line 67, in wsgi 2024-08-06T09:17:59.758008629Z self.callable = self.load() 2024-08-06T09:17:59.758011237Z File "/opt/huawei/miniconda/envs/python36/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 52, in load 2024-08-06T09:17:59.758014039Z return self.load_wsgiapp() 2024-08-06T09:17:59.758016690Z File "/opt/huawei/miniconda/envs/python36/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 41, in load_wsgiapp 2024-08-06T09:17:59.758019528Z return util.import_app(self.app_uri) 2024-08-06T09:17:59.758022283Z File "/opt/huawei/miniconda/envs/python36/lib/python3.7/site-packages/gunicorn/util.py", line 350, in import_app 2024-08-06T09:17:59.758025080Z import(module) 2024-08-06T09:17:59.758027706Z File "/opt/huawei/framework/service/appcontainer/app.py", line 39, in
2024-08-06T09:17:59.758030834Z process = customer_class() 2024-08-06T09:17:59.758033388Z File "/model-data/component/process.py", line 25, in init 2024-08-06T09:17:59.758036135Z self.app_intention_model = APPIntention(model_dir) 2024-08-06T09:17:59.758038863Z File "/model-data/component/app_intention/app_intention.py", line 40, in init 2024-08-06T09:17:59.758041677Z self.intent_service = AppIntentionModel(model_root_dir) 2024-08-06T09:17:59.758044324Z File "/model-data/component/app_intention/app_intention_model.py", line 18, in init 2024-08-06T09:17:59.758047057Z self.intention_model = IntentionModel(intention_model_dir) 2024-08-06T09:17:59.758049766Z File "/model-data/component/intention_model/intention_model.py", line 21, in init 2024-08-06T09:17:59.758052482Z self._construct_model() 2024-08-06T09:17:59.758055483Z File "/model-data/component/intention_model/intention_model.py", line 47, in _construct_model 2024-08-06T09:17:59.758058298Z self.predictor = paddle.inference.create_predictor(_config) 2024-08-06T09:17:59.758060958Z ValueError: (InvalidArgument) Failed to parse programdesc from binary string. 2024-08-06T09:17:59.758063706Z [Hint: Expected desc.ParseFromString(binarystr) == true, but received desc.ParseFromString(binary_str):0 != true:1.] (at /paddle/paddle/fluid/framework/program_desc.cc:103)
你好!我在执行paddleocr的时候报下面图里的错,我看了很多相关的issue,包括换版本的、装nomkl的,都没有解决。 我目前的环境版本cuda11.1, cudnn8.1.1,因为这里:https://paddlepaddle.org.cn/whl/mkl/stable.html 没有找到paddlepaddle-gpu.post111的版本,所以安装了paddlepaddle-gpu2.1.1.post112,中间也有装过paddlepaddle-gpu2.0.0.post110,但都会报图里的错。请帮忙看一下呗,是哪里的问题。 验证过paddle 是装成功的。 此外,我发现这个报错,也不是每次执行都出现,时而有时而没有?