Skip to content
This repository has been archived by the owner on Oct 23, 2023. It is now read-only.

deak lock when decoding hevc #584

Closed
waiter89 opened this issue Sep 14, 2016 · 7 comments · Fixed by #586
Closed

deak lock when decoding hevc #584

waiter89 opened this issue Sep 14, 2016 · 7 comments · Fixed by #586

Comments

@waiter89
Copy link

(gdb) bt
#0 0x00007ffff3b7142d in std::_Rb_tree_increment(std::_Rb_tree_node_base const*) () from ./libstdc++.so.6
#1 0x00007fffe1699cfc in std::_Rb_tree_const_iteratorstd::tr1::shared_ptr<YamiMediaCodec::VaapiDecPictureH265 >::operator++ (this=) at /usr/include/c++/4.8/bits/stl_tree.h:270
#2 std::__find_ifstd::_Rb_tree_const_iterator<std::tr1::shared_ptr<YamiMediaCodec::VaapiDecPictureH265 >, std::tr1::_Bind<bool ((std::tr1::_Placeholder<1>, short unsigned int))(const std::tr1::shared_ptrYamiMediaCodec::VaapiDecPictureH265&, unsigned int)> > (__pred=..., __last=..., __first=...) at /usr/include/c++/4.8/bits/stl_algo.h:151
#3 std::find_ifstd::_Rb_tree_const_iterator<std::tr1::shared_ptr<YamiMediaCodec::VaapiDecPictureH265 >, std::tr1::_Bind<bool (
(std::tr1::_Placeholder<1>, short unsigned int))(const std::tr1::shared_ptrYamiMediaCodec::VaapiDecPictureH265&, unsigned int)> > (__pred=..., __last=..., __first=...) at /usr/include/c++/4.8/bits/stl_algo.h:4465
#4 YamiMediaCodec::VaapiDecoderH265::DPB::checkLatency (this=0x7fff5810d6e0, this@entry=0x379d328, sps=0x0, sps@entry=0x3558ef0) at vaapidecoder_h265.cpp:362
#5 0x00007fffe169c0f2 in YamiMediaCodec::VaapiDecoderH265::DPB::init (this=this@entry=0x379d328, picture=..., slice=slice@entry=0x7fff58007d00, nalu=nalu@entry=0x7fff7fffe740, newStream=) at vaapidecoder_h265.cpp:397
#6 0x00007fffe169d640 in YamiMediaCodec::VaapiDecoderH265::decodeSlice (this=this@entry=0x379d0c0, nalu=nalu@entry=0x7fff7fffe740) at vaapidecoder_h265.cpp:1043
#7 0x00007fffe169d937 in YamiMediaCodec::VaapiDecoderH265::decodeNalu (this=this@entry=0x379d0c0, nalu=nalu@entry=0x7fff7fffe740) at vaapidecoder_h265.cpp:1064
#8 0x00007fffe169dae4 in YamiMediaCodec::VaapiDecoderH265::decode (this=0x379d0c0, buffer=) at vaapidecoder_h265.cpp:1118
#9 0x00007fffe0dcb35e in sw_decodec (Acodec=0x379c930, Ainput=0x7fff64062a40, AiLen=1366) at ../shanwei_yami.cpp:758
#10 0x00007fffe86f85cb in sw_decodec (Acodec=0x33d8100, Ainput=0x7fff64062a40, AiLen=1366) at ../shanwei_proc/shanwei_proc.c:242

@xuguangxin
Copy link
Contributor

Hi @waiter89
seems somthing happen in dpb bump, could you help to provide the clip

@waiter89
Copy link
Author

another stack

(gdb) bt
#0 YamiMediaCodec::VaapiDecoderH265::DPB::checkLatency (this=this@entry=0x1dfb588, sps=sps@entry=0x1fb0e40) at vaapidecoder_h265.cpp:356
#1 0x00007f177294b0f2 in YamiMediaCodec::VaapiDecoderH265::DPB::init (this=this@entry=0x1dfb588, picture=..., slice=slice@entry=0x7f174805bc00, nalu=nalu@entry=0x7f176d0968a0, newStream=) at vaapidecoder_h265.cpp:397
#2 0x00007f177294c640 in YamiMediaCodec::VaapiDecoderH265::decodeSlice (this=this@entry=0x1dfb320, nalu=nalu@entry=0x7f176d0968a0) at vaapidecoder_h265.cpp:1043
#3 0x00007f177294c937 in YamiMediaCodec::VaapiDecoderH265::decodeNalu (this=this@entry=0x1dfb320, nalu=nalu@entry=0x7f176d0968a0) at vaapidecoder_h265.cpp:1064
#4 0x00007f177294cae4 in YamiMediaCodec::VaapiDecoderH265::decode (this=0x1dfb320, buffer=) at vaapidecoder_h265.cpp:1118
#5 0x00007f1771f504d8 in sw_decodec (Acodec=0x1df2ad0, Ainput=0x7f175c000a70, AiLen=8207) at ../shanwei_yami/shanwei_yami.cpp:751
#6 0x00007f17759a2932 in sw_decodec (Acodec=0x1df16b0, Ainput=0x7f175c000a70, AiLen=8207) at ../shanwei_proc/shanwei_proc.c:253
#7 0x00000000004cdd73 in UiControler::ZZVideoCallback (AusrDat=0x1ce1870, Aid=5, Aframe=0x7f175c0008c0) at ../uicontroler.cpp:3609
#8 0x00007f176d502d8a in ProxyFeedback::OnVideoFrame (this=0x1d215c0, Aid=5, Aframe=0x7f175c0008c0) at ProxyOperator.cpp:51
#9 0x00007f176d512e3a in ProxyCamera::Deliver (this=0x7f1750025890) at CameraProxy.cpp:99
#10 0x00007f176d4f8218 in ProxyDeliverer::PDInstance::Step (this=0x1d21660, Aop=...) at ProxyEngine.cpp:289
#11 0x00007f176d4f7deb in ProxyDeliverer::Run (this=0x1addd10) at ProxyEngine.cpp:218
#12 0x00007f176d4f7acf in SharedEngine::operator() (this=0x7f176d752740 , Aarg=0x1d25180) at ProxyEngine.cpp:186
#13 0x00007f176d4fea6c in GrThread::GrThread(SharedEngine&, void_, void_, bool)::A::Run() (this=0x1ae56c0) at ../sharedinc/grthread.hpp:440
#14 0x00007f176d4fea93 in GrThread::GrThread(SharedEngine&, void_, void_, bool)::A::proc(void*) (Aarg=0x1ae56c0) at ../sharedinc/grthread.hpp:444
#15 0x00007f178cfd4474 in start_thread () from /lib64/libpthread.so.0
#16 0x00007f178c4763ed in clone () from /lib64/libc.so.6

@xuguangxin
Copy link
Contributor

Hi @waiter89
Please attach the clip, without it, we cant't do any debug.

@lizhong1008
Copy link
Contributor

Maybe hevc decoder can refer this commit: e0a5f44

@xuguangxin
Copy link
Contributor

Yeah, @waiter89 , you can try add bump check like e0a5f44.And get some feedback for us

@waiter89
Copy link
Author

@xuguangxin yes,it works,thanks

@xuguangxin
Copy link
Contributor

You have wrong bitstream?

xuguangxin added a commit to xuguangxin/libyami that referenced this issue Sep 14, 2016
If there are some error bit stream or the dpb logical have some bug,
the checkDpbSize return true and it’s not frame to output,
the bump will return false, and do not remove any thing from dpb.
Again the dpb still full, it trap to an infinite loop. Check the bump
result will break the loop.This fixes intel#584
Vector0420 added a commit to Vector0420/libyami that referenced this issue Mar 15, 2023
If there are some error bit stream or the dpb logical have some bug,
the checkDpbSize return true and it’s not frame to output,
the bump will return false, and do not remove any thing from dpb.
Again the dpb still full, it trap to an infinite loop. Check the bump
result will break the loop.This fixes intel/libyami#584
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants