使用linux sdk 测试 asr,个把小时后,必定会出现崩溃


(yanink) #1

感觉是服务器返回了些异常数据,但是sdk的代码没有处理好,导致出问题了

你们看下日志,看看是否是sdk的问题?

日志:

Can’t parse message of type “rokid.open.AsrResponse” because it is
missing required fields: id, result

gdb:

Thread 24 “test” received signal SIGSEGV, Segmentation fault.

#0 0x00007ffff6e18b1c in BIO_write () from
/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
#1 0x00007ffff4cd1bf2 in ?? () from /lib/x86_64-linux-gnu/libssl.so.1.0.0
#2 0x00007ffff4cd22e5 in ?? () from /lib/x86_64-linux-gnu/libssl.so.1.0.0
#3 0x00007ffff748cb2f in Poco::Net::SecureSocketImpl::sendBytes(void
const*, int, int) () from
/home/work/robot/build/external/output/lib/libPocoNetSSL.so.48
#4 0x00007ffff779391d in Poco::Net::WebSocketImpl::sendBytes(void
const*, int, int) () from
/home/work/lib/libPocoNet.so.48
#5 0x0000000000696205 in rokid::speech::SpeechConnection::sendFrame
(this=0x7fff9c0008c0, data=0x7fff74001270, length=2056, timeout=5)
at
/home//work/rokid/rokid-openvoice-sdk-master/src/common/speech_connection.cc:208
#6 0x00000000006895a3 in
rokid::speech::SpeechConnection::sendrokid::open::AsrRequest
(this=0x7fff9c0008c0, pbitem=…, timeout=5)
at
/home/work/rokid/rokid-openvoice-sdk-master/src/common/speech_connection.h:38
#7 0x0000000000688a3c in rokid::speech::AsrReqHandler::handle
(this=0xb05e78, in=std::shared_ptr (count 2, weak 0) 0x7fff74000a40,
arg=0xb05c90)
at
/home//work/rokid/rokid-openvoice-sdk-master/src/asr/asr_req_handler.cc:69
#8 0x0000000000687373 in
rokid::speech::PipelineHandler<rokid::speech::AsrReqInfo,
rokid::speech::AsrRespInfo>::do_work (this=0xb05e78, arg=0xb05c90)
at
/home/work/rokid/rokid-openvoice-sdk-master/src/common/pipeline_handler.h:77
#9 0x000000000067fa0d in
rokid::speech::Pipelinerokid::speech::AsrReqInfo::do_work
(this=0xb05c48, worker=…)
at
/home/work/rokid/rokid-openvoice-sdk-master/src/common/pipeline.h:113
#10 0x000000000067e58d in
rokid::speech::Pipelinerokid::speech::AsrReqInfo::run()::{lambda()#1}::operator()()
const (__closure=0xb06768)
at
/home/work/rokid/rokid-openvoice-sdk-master/src/common/pipeline.h:78
#11 0x00000000006868a4 in
std::_Bind_simple<rokid::speech::Pipelinerokid::speech::AsrReqInfo::run()::{lambda()#1}
()>::_M_invoke<>(std::_Index_tuple<>) (
this=0xb06768) at /usr/include/c++/5/functional:1531
#12 0x00000000006863e8 in
std::_Bind_simple<rokid::speech::Pipelinerokid::speech::AsrReqInfo::run()::{lambda()#1}
()>::operator()() (this=0xb06768)
at /usr/include/c++/5/functional:1520
#13 0x00000000006859d4 in
std::thread::_Impl<std::_Bind_simple<rokid::speech::Pipelinerokid::speech::AsrReqInfo::run()::{lambda()#1}
()> >::_M_run() (this=0xb06750)
at /usr/include/c++/5/thread:115
#14 0x00007ffff5f59c80 in ?? () from
/usr/lib/x86_64-linux-gnu/libstdc++.so.6
#15 0x00007ffff68836ba in start_thread (arg=0x7fffc0a1e700) at
pthread_create.c:333
#16 0x00007ffff56bf3dd in clone () at
…/sysdeps/unix/sysv/linux/x86_64/clone.S:109


(yanink) #2

能分析下吗?


(chen.zhang) #3

看log,你用的sdk版本太老了。
去置顶帖下载最新的版本吧


(lujnan) #4

我们目前已经有了初步可用的linux turn key solution, 可以到 https://rokid.github.io/rokidos-linux-docs/ 了解下目前的系统情况。