Firefly开源社区

打印 上一主题 下一主题

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

20

积分

0

威望

0

贡献

技术小白

积分
20

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

发表于 2020-5-18 11:56:57      浏览:6789 | 回复:3        打印      只看该作者   [复制链接] 楼主
本帖最后由 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种表现形式的错误截图和对应的日志文件参见附件。


mpp_segmentation_fault2.png (120.64 KB, 下载次数: 784)

mpp_segmentation_fault2.png

mpp_segmentation_fault1.png (184.31 KB, 下载次数: 785)

mpp_segmentation_fault1.png

mpp_segmentation_fault2_debugging.png (59.3 KB, 下载次数: 790)

mpp_segmentation_fault2_debugging.png

mpp_segmentation_faults.zip

6.19 KB, 下载次数: 0, 下载积分: 灯泡 -1 , 经验 -1

回复

使用道具 举报

20

积分

0

威望

0

贡献

技术小白

积分
20
发表于 2020-5-20 08:53:49        只看该作者  沙发
最后一张截图的call stack提供的信息量最大,欢迎MPP中间件的开发高手给些建议!
回复

使用道具 举报

20

积分

0

威望

0

贡献

技术小白

积分
20
发表于 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.
[Switching to Thread 0x7f90e0f1d0 (LWP 8537)]
_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
#1  mpp_list_add_tail (head=0x5556731440, _new=<optimized out>) at /home/firefly2/mpp/osal/mpp_list.cpp:80
#2  mpp_list::add_at_tail (this=0x5556d11ae0, data=data@entry=0x7f90e0e590, size=size@entry=8) at /home/firefly2/mpp/osal/mpp_list.cpp:105
#3  0x0000007fb7ec1964 in Mpp::put_packet (this=0x5556d1f480, packet=packet@entry=0x5556d1f320) at /home/firefly2/mpp/mpp/mpp.cpp:256
#4  0x0000007fb7ec4104 in mpi_decode_put_packet (ctx=0x5556d1f3e0, packet=0x5556d1f320) at /home/firefly2/mpp/mpp/mpi.cpp:161
#5  0x0000005555bb86c4 in decoder_routine ()
#6  0x0000005555b4f670 in thread_rtsp_decoder (arg=0x7fffffeef4) at /home/firefly2/potentialDangersRecognition/main.cpp:784
#7  0x0000007fb7e80088 in start_thread () from /lib/aarch64-linux-gnu/libpthread.so.0
#8  0x0000007fb76e14ec in ?? () from /lib/aarch64-linux-gnu/libc.so.6
回复

使用道具 举报

7

积分

0

威望

0

贡献

吃瓜的群众

积分
7
发表于 2022-4-13 20:17:20        只看该作者  地板
您好,请问您解决这个问题了吗
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

友情链接 : 爱板网 电子发烧友论坛 云汉电子社区 粤ICP备14022046号-2
快速回复 返回顶部 返回列表