mtsh 发表于 2020-5-18 11:56:57

[Core-3399Pro-JD4]MPP库的硬解码出现段错误(Segmentation Fault)

本帖最后由 mtsh 于 2020-5-20 08:53 编辑

固件版本号:AIO-RK3399PROC-UBUNTU18.04-GPT-20200321-1536.img
嵌入式操作系统:Ubuntu 18.04 64位
复现步骤如下:
1. 开三个子线程, 每个子线程拥有独立的MppContext实例;
2. 每个子线程里通过RTSP拉流,通过MPP API进行硬解码。
3. 利用gdb运行程序,程序正常运行一段时间后(3分钟到50分钟不固定),会出现段错误(Segmentation Fault)导致的崩溃,有2种表现形式,但在异常调用栈里统一都指向MppBufferService::get_group_by_id(unsigned int) () from /usr/lib/aarch64-linux-gnu/librockchip_mpp.so.1导致的段错误。

段错误(Segmentation Fault)2种表现形式的错误截图和对应的日志文件参见附件。


mtsh 发表于 2020-5-20 08:53:49

最后一张截图的call stack提供的信息量最大,欢迎MPP中间件的开发高手给些建议!

mtsh 发表于 2020-5-20 13:04:35

还有第3种表现形式,如下所示:
mpp_packet: check_is_mpp_packet pointer 0x555672f9e0 failed on check
mpp_packet: mpp_packet_write invalid input: packet 0x555672f9e0 data 0x555672e9a0
mpp_packet: check_is_mpp_packet pointer 0x555672f9e0 failed on check
mpp_packet: check_is_mpp_packet pointer 0x555672f9e0 failed on check
mpi: mpi_decode_put_packet found invalid context 0x555672faa0
mpi: mpi_decode_get_frame found invalid context 0x555672faa0
decode_get_frame failed ret -2
mpi: mpi_decode_put_packet found invalid context 0x555672faa0
mpi: mpi_decode_get_frame found invalid context 0x555672faa0
decode_get_frame failed ret -2
mpi: mpi_decode_put_packet found invalid context 0x555672faa0
mpi: mpi_decode_get_frame found invalid context 0x555672faa0
decode_get_frame failed ret -2
mpi: mpi_decode_put_packet found invalid context 0x555672faa0
mpi: mpi_decode_get_frame found invalid context 0x555672faa0
decode_get_frame failed ret -2
After pushing, image queue to be reconigzed has the size of 59
mpi: mpi_decode_put_packet found invalid context 0x555672faa0
mpi: mpi_decode_get_frame found invalid context 0x555672faa0
decode_get_frame failed ret -2
mpi: mpi_decode_put_packet found invalid context 0x555672faa0
mpi: mpi_decode_get_frame found invalid context 0x555672faa0
decode_get_frame failed ret -2
mpi: mpi_decode_put_packet found invalid context 0x555672faa0
mpi: mpi_decode_get_frame found invalid context 0x555672faa0
decode_get_frame failed ret -2
mpi: mpi_decode_put_packet found invalid context 0x555672faa0
mpi: mpi_decode_get_frame found invalid context 0x555672faa0
decode_get_frame failed ret -2
mpi: mpi_decode_put_packet found invalid context 0x555672faa0
mpi: mpi_decode_get_frame found invalid context 0x555672faa0
decode_get_frame failed ret -2
mpi: mpi_decode_put_packet found invalid context 0x555672faa0
mpi: mpi_decode_get_frame found invalid context 0x555672faa0
decode_get_frame failed ret -2
mpi: mpi_decode_put_packet found invalid context 0x555672faa0
mpi: mpi_decode_get_frame found invalid context 0x555672faa0
decode_get_frame failed ret -2

Thread 13 "potentialDanger" received signal SIGSEGV, Segmentation fault.

_mpp_list_add (next=0x5556731440, prev=0x5452c9b6609885fb, _new=<optimized out>) at /home/firefly2/mpp/osal/mpp_list.cpp:70
70          prev->next = _new;
(gdb) bt
#0_mpp_list_add (next=0x5556731440, prev=0x5452c9b6609885fb, _new=<optimized out>) at /home/firefly2/mpp/osal/mpp_list.cpp:70
#1mpp_list_add_tail (head=0x5556731440, _new=<optimized out>) at /home/firefly2/mpp/osal/mpp_list.cpp:80
#2mpp_list::add_at_tail (this=0x5556d11ae0, data=data@entry=0x7f90e0e590, size=size@entry=8) at /home/firefly2/mpp/osal/mpp_list.cpp:105
#30x0000007fb7ec1964 in Mpp::put_packet (this=0x5556d1f480, packet=packet@entry=0x5556d1f320) at /home/firefly2/mpp/mpp/mpp.cpp:256
#40x0000007fb7ec4104 in mpi_decode_put_packet (ctx=0x5556d1f3e0, packet=0x5556d1f320) at /home/firefly2/mpp/mpp/mpi.cpp:161
#50x0000005555bb86c4 in decoder_routine ()
#60x0000005555b4f670 in thread_rtsp_decoder (arg=0x7fffffeef4) at /home/firefly2/potentialDangersRecognition/main.cpp:784
#70x0000007fb7e80088 in start_thread () from /lib/aarch64-linux-gnu/libpthread.so.0
#80x0000007fb76e14ec in ?? () from /lib/aarch64-linux-gnu/libc.so.6

ちづる 发表于 2022-4-13 20:17:20

您好,请问您解决这个问题了吗
页: [1]
查看完整版本: [Core-3399Pro-JD4]MPP库的硬解码出现段错误(Segmentation Fault)