Skip to content

  • 体验新版
    • 正在加载...
  • 登录
  • PaddlePaddle
  • Paddle
  • Issue
  • #23086

P
Paddle
  • 项目概览

PaddlePaddle / Paddle
大约 2 年 前同步成功

通知 2325
Star 20933
Fork 5424
  • 代码
    • 文件
    • 提交
    • 分支
    • Tags
    • 贡献者
    • 分支图
    • Diff
  • Issue 1423
    • 列表
    • 看板
    • 标记
    • 里程碑
  • 合并请求 543
  • Wiki 0
    • Wiki
  • 分析
    • 仓库
    • DevOps
  • 项目成员
  • Pages
P
Paddle
  • 项目概览
    • 项目概览
    • 详情
    • 发布
  • 仓库
    • 仓库
    • 文件
    • 提交
    • 分支
    • 标签
    • 贡献者
    • 分支图
    • 比较
  • Issue 1,423
    • Issue 1,423
    • 列表
    • 看板
    • 标记
    • 里程碑
  • 合并请求 543
    • 合并请求 543
  • Pages
  • 分析
    • 分析
    • 仓库分析
    • DevOps
  • Wiki 0
    • Wiki
  • 成员
    • 成员
  • 收起侧边栏
  • 动态
  • 分支图
  • 创建新Issue
  • 提交
  • Issue看板
已关闭
开放中
Opened 3月 18, 2020 by saxon_zh@saxon_zhGuest

PaddlePaddle DS2 model load fails in Tornado server

Created by: shoegazerstella

System information -PaddlePaddle version >= 1.6.0 -OS Platform ubuntu 18.04 -Python version: 3.7.4 -Name of Model: DeepSpeech2

I am trying to load a DeepSpeech2 model inside a tornado server using a SingletonMixin class and I have this error:

W0318 11:19:35.634687   150 init.cc:209] Warning: PaddlePaddle catches a failure signal, it may not work properly
W0318 11:19:35.634742   150 init.cc:211] You could check whether you killed PaddlePaddle thread/process accidentally or report the case to PaddlePaddle
W0318 11:19:35.634757   150 init.cc:214] The detail failure signal is:
W0318 11:19:35.634773   150 init.cc:217] *** Aborted at 1584530375 (unix time) try "date -d @1584530375" if you are using GNU date ***
W0318 11:19:35.637790   150 init.cc:217] PC: @                0x0 (unknown)
W0318 11:19:35.638175   150 init.cc:217] *** SIGSEGV (@0x130) received by PID 150 (TID 0x7fd82fb11f40) from PID 304; stack trace: ***
W0318 11:19:35.640535   150 init.cc:217]     @     0x7fd830016730 (unknown)
W0318 11:19:35.641213   150 init.cc:217]     @     0x7fd7e91a01aa pybind11::detail::make_new_python_type()
W0318 11:19:35.642088   150 init.cc:217]     @     0x7fd7e91a27b8 pybind11::detail::generic_type::initialize()
W0318 11:19:35.642894   150 init.cc:217]     @     0x7fd7e9316c94 _ZN8pybind115enum_IN10onnx_torch20TensorProto_DataTypeEEC1IJEEERKNS_6handleEPKcDpRKT_
W0318 11:19:35.644227   150 init.cc:217]     @     0x7fd7e931029c torch::onnx::initONNXBindings()
W0318 11:19:35.645166   150 init.cc:217]     @     0x7fd7e8fca218 initModule()
W0318 11:19:35.647357   150 init.cc:217]     @     0x7fd830265042 _PyImport_LoadDynamicModuleWithSpec
W0318 11:19:35.649078   150 init.cc:217]     @     0x7fd830264dc9 _imp_create_dynamic
W0318 11:19:35.651010   150 init.cc:217]     @     0x7fd830176025 _PyMethodDef_RawFastCallDict
W0318 11:19:35.652886   150 init.cc:217]     @     0x7fd830175d10 _PyCFunction_FastCallDict
W0318 11:19:35.654853   150 init.cc:217]     @     0x7fd8301eb833 _PyEval_EvalFrameDefault
W0318 11:19:35.657164   150 init.cc:217]     @     0x7fd8301e5831 _PyEval_EvalCodeWithName
W0318 11:19:35.659276   150 init.cc:217]     @     0x7fd830176982 _PyFunction_FastCallKeywords
W0318 11:19:35.661051   150 init.cc:217]     @     0x7fd8301ea3b2 _PyEval_EvalFrameDefault
W0318 11:19:35.662883   150 init.cc:217]     @     0x7fd8301768da _PyFunction_FastCallKeywords
W0318 11:19:35.664608   150 init.cc:217]     @     0x7fd8301e6992 _PyEval_EvalFrameDefault
W0318 11:19:35.666405   150 init.cc:217]     @     0x7fd8301768da _PyFunction_FastCallKeywords
W0318 11:19:35.668154   150 init.cc:217]     @     0x7fd8301e6bb1 _PyEval_EvalFrameDefault
W0318 11:19:35.670182   150 init.cc:217]     @     0x7fd8301768da _PyFunction_FastCallKeywords
W0318 11:19:35.672044   150 init.cc:217]     @     0x7fd8301e6bb1 _PyEval_EvalFrameDefault
W0318 11:19:35.674051   150 init.cc:217]     @     0x7fd8301768da _PyFunction_FastCallKeywords
W0318 11:19:35.676153   150 init.cc:217]     @     0x7fd8301e6bb1 _PyEval_EvalFrameDefault
W0318 11:19:35.678510   150 init.cc:217]     @     0x7fd83017704a _PyFunction_FastCallDict
W0318 11:19:35.679981   150 init.cc:217]     @     0x7fd8301765bd object_vacall
W0318 11:19:35.681828   150 init.cc:217]     @     0x7fd830177dbb _PyObject_CallMethodIdObjArgs
W0318 11:19:35.683385   150 init.cc:217]     @     0x7fd830200521 PyImport_ImportModuleLevelObject.localalias.22
W0318 11:19:35.685279   150 init.cc:217]     @     0x7fd8301e9b39 _PyEval_EvalFrameDefault
W0318 11:19:35.687129   150 init.cc:217]     @     0x7fd8301e5831 _PyEval_EvalCodeWithName
W0318 11:19:35.689189   150 init.cc:217]     @     0x7fd8301e5539 PyEval_EvalCodeEx
W0318 11:19:35.691130   150 init.cc:217]     @     0x7fd8301e54fb PyEval_EvalCode
W0318 11:19:35.692857   150 init.cc:217]     @     0x7fd83025f114 builtin_exec
W0318 11:19:35.695096   150 init.cc:217]     @     0x7fd830176025 _PyMethodDef_RawFastCallDict
Segmentation fault

the signleton class:

class ResourceLoader(SingletonMixin):

    def __init__(self):

        self.deepspeech2_model = None

    def load_ds2_model(self):
        """LOAD DeepSpeech2 model"""
       self.deepspeech2_model = load_deepspeech2_model(DEEPSPEECH2_MODEL_PATH, vocab_path, mean_std_path)

I am executing this script which is the tornado run app:

class WebServer(threading.Thread):
    def run(self):
        asyncio.set_event_loop_policy(AnyThreadEventLoopPolicy())
        asyncio.get_event_loop().set_default_executor(ThreadPoolExecutor(max_workers=1))
        app = application()
        app.listen(PORT)
        tornado.ioloop.IOLoop.instance().start()

if __name__ == "__main__":
      ResourceLoader.instance().load_ds2_model()
      WebServer().start()

From inside the Docker container, the script that does load + inference alone works fine. The problem appears when I try to load it through the singleton inside tornado. Thank you for your help!

指派人
分配到
无
里程碑
无
分配里程碑
工时统计
无
截止日期
无
标识: paddlepaddle/Paddle#23086
渝ICP备2023009037号

京公网安备11010502055752号

网络110报警服务 Powered by GitLab CE v13.7
开源知识
Git 入门 Pro Git 电子书 在线学 Git
Markdown 基础入门 IT 技术知识开源图谱
帮助
使用手册 反馈建议 博客
《GitCode 隐私声明》 《GitCode 服务条款》 关于GitCode
Powered by GitLab CE v13.7