Skip to content

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

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 5月 07, 2018 by saxon_zh@saxon_zhGuest

Segmentation fault in using JNI_CreateJavaVM with paddle

Created by: rmalav15

Hey,

We are using DeepSpeech in our project using provided docker image. First of all, terrific work in both PaddlePaddle and DeepSpeech.

In DeepSpeech they use c++ decoder which is used with swig wrapper in the python code. To reproduce the error, we made a sample github repo. For the project requirement we need to use JNI_CreateJavaVM to use java jar classes in our c++ code, which is in turn will be used in DeepSpeech python code using swig wrapper.

When we run demo test.py (which doesn't import paddle), it runs prefectly. But when we add import paddle:

import gfg
import paddle.v2 as paddle

print gfg.fact(5)
print gfg.my_mod(3,4)
#gfg.vm()
gfg.main()

and run it, we get:

120
3
using pool:)
Segmentation fault (core dumped)

The stack trace is this (When we used JNI_CreateJavaVM in DeepSpeech Code):

Received utterance[length=245760] from 10.158.19.119, saved to demo_cache/20180504155105_10.158.19.119.wav.

* Aborted at 1525449065 (unix time) try "date -d @1525449065" if you are using GNU date *

PC: @ 0x0 (unknown)

* SIGSEGV (@0x50) received by PID 7060 (TID 0x7fde57e0a700) from PID 80; stack trace: *

@ 0x7fde579e6390 (unknown) @ 0x7fde57bfe73c (unknown) @ 0x7fde57c07851 (unknown) @ 0x7fde57c02564 (unknown) @ 0x7fde57c06da9 (unknown) @ 0x7fde57407f09 (unknown) @ 0x7fde57c02564 (unknown) @ 0x7fde57408571 (unknown) @ 0x7fde57407fa1 dlopen @ 0x7fde133fce75 os::Linux::clock_init() @ 0x7fde13400049 os::init() @ 0x7fde1354cca2 Threads::create_vm() @ 0x7fde131aae64 JNI_CreateJavaVM @ 0x7fde13daf06e create_vm() @ 0x7fde13daf2dc main_fn() @ 0x7fde13d46af8 _wrap_main_fn @ 0x4c468a PyEval_EvalFrameEx @ 0x4c2765 PyEval_EvalCodeEx @ 0x4ca099 PyEval_EvalFrameEx @ 0x4c2765 PyEval_EvalCodeEx @ 0x4ca8d1 PyEval_EvalFrameEx @ 0x4c2765 PyEval_EvalCodeEx @ 0x4ca8d1 PyEval_EvalFrameEx @ 0x4c9d8f PyEval_EvalFrameEx @ 0x4c2765 PyEval_EvalCodeEx @ 0x4de6fe (unknown) @ 0x4b0cb3 PyObject_Call @ 0x4f492e (unknown) @ 0x4b0cb3 PyObject_Call @ 0x4ce5d0 PyEval_CallObjectWithKeywords @ 0x4e17e4 PyInstance_New @ 0x4b0cb3 PyObject_Call Segmentation fault (core dumped)

This sounds weird, but its actually happening.

It looks like there is some problem in using threads. The JNI_CreateJavaVM function description says that it "Loads and initializes a Java VM. The current thread becomes the main thread." Which is I think causing the problem. (I am not sure, I may be completely wrong).

Please let us know why its happening, It will be huge help.

Much Thanks

指派人
分配到
无
里程碑
无
分配里程碑
工时统计
无
截止日期
无
标识: paddlepaddle/Paddle#10456
渝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