sherpa-onnx icon indicating copy to clipboard operation
sherpa-onnx copied to clipboard

java api example AsrWebsocketServer.java run error

Open ghjdegithub opened this issue 2 years ago • 4 comments

hs_err_pid83268.log client : python-api-examples/web/ js websocket client connent websocket server(AsrWebsocketServer.java). There are two types of errors that can occur:

1:

# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x0000000116a24004, pid=83268, tid=48643
#
# JRE version: Java(TM) SE Runtime Environment Oracle GraalVM 17.0.8+9.1 (17.0.8+9) (build 17.0.8+9-LTS-jvmci-23.0-b14)
# Java VM: Java HotSpot(TM) 64-Bit Server VM Oracle GraalVM 17.0.8+9.1 (17.0.8+9-LTS-jvmci-23.0-b14, mixed mode, emulated-client, sharing, tiered, jvmci, jvmci compiler, compressed oops, compressed class ptrs, g1 gc, bsd-aarch64)
# Problematic frame:
# C  [libsherpa-onnx-core.dylib+0x44004]  sherpa_onnx::Clone(OrtAllocator*, Ort::Value const*)+0x38
#
# No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /Users/gonghuijun/IdeaProjects/LearnJava/sherpaonnxdemo/hs_err_pid83268.log
[hs_err_pid83268.log](https://github.com/k2-fsa/sherpa-onnx/files/12356744/hs_err_pid83268.log)

#
# If you would like to submit a bug report, please visit:
#   https://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

2: github.com/k2-fsa/sherpa-onnx/sherpa-onnx/csrc/features.cc:GetFrames:116 59808 + 39 > 59817

ghjdegithub avatar Aug 16 '23 07:08 ghjdegithub

过程: 用python的web端连接java的websocket server后,持续解析语言为文本的中,会不定时突然java程序崩溃,然后报以上2个错误中的一个,就是挂着不说话或者不停的说话,都会可能java程序突然崩溃,不定时随机性

ghjdegithub avatar Aug 16 '23 07:08 ghjdegithub

运行命令: client:python -m http.server (dir: python-api-examples/web) server: make runsrv (dir: java-api-examples)

页面操作: http:localhost:6009/streaming_record.html 点击click me to connect ! 端口号选择java server的websocket端口号 然后点击 Streaming-record

image

第一个错误偶发,第二个错误频繁

ghjdegithub avatar Aug 16 '23 08:08 ghjdegithub

尝试修改decoder_thread_num为1,也会报GetFrames 这个错误

ghjdegithub avatar Aug 16 '23 08:08 ghjdegithub

@ghjdegithub 目前java srv应该只能适配java client。 先试试java client有没有上面的问题?

zhaomingwork avatar Aug 16 '23 12:08 zhaomingwork