Community
cancel
Showing results for 
Search instead for 
Did you mean: 
mehrotra_kk
Beginner
111 Views

callgrind / valgrind + h264 decoder gets killed in ipp libraries

Hi,
i was using valgrind / callgrind to analyse the performance of the functions in intel H264 decoder. I was using valgrind / callgrind for this purpose. when i use valgrind and run the h264 decoder the process terminating with default action of signal 4 (SIGILL)
==16008== Illegal opcode at address 0x9F4F04A
==16008== at 0x9F4F04A: ??? (in /home/amehrotra/views/amehrotra_brody_DCA-ENG-2.1_NSNTweaks_11_2/dca/build/inst/gstreamer/lib/gstreamer-0.10/libdcadec_h264.so)
==16008== by 0x9E7944E: y8_ippiFilterDeblockingChroma_VerEdge_H264_8u_C1IR (in /home/amehrotra/views/amehrotra_brody_DCA-ENG-2.1_NSNTweaks_11_2/dca/build/inst/gstreamer/lib/gstreamer-0.10/libdcadec_h264.so)


Attaching the full trace for your reference:


regards
Abhishek

.................................................................................................................................................................

Running gst-launch under Valgrind/callgrind!
==16008== Callgrind, a call-graph generating cache profiler
==16008== Copyright (C) 2002-2010, and GNU GPL'd, by Josef Weidendorfer et al.
==16008== Using Valgrind-3.6.0 and LibVEX; rerun with -h for copyright info
==16008== Command: ./inst/gstreamer/bin/gst-launch-0.10 --gst-debug=*:0 filesrc location=/home/amehrotra/2_22712.ts ! mpegtsdemux ! dcadec_h264 iNumThreads=1 ! fakesink
==16008==
==16008== For interactive control, run 'callgrind_control -h'.

(gst-launch-0.10:16009): GStreamer-WARNING **: Failed to load plugin '/home/amehrotra/views/amehrotra_brody_DCA-ENG-2.1_NSNTweaks_11_2/dca/../dca/build/inst/gstreamer/lib//libintlc.so': /home/amehrotra/views/amehrotra_brody_DCA-ENG-2.1_NSNTweaks_11_2/dca/../dca/build/inst/gstreamer/lib//libintlc.so: file too short

(gst-launch-0.10:16009): GStreamer-WARNING **: Failed to load plugin '/home/amehrotra/views/amehrotra_brody_DCA-ENG-2.1_NSNTweaks_11_2/dca/../dca/build/inst/gstreamer/lib//libsvml.so': /home/amehrotra/views/amehrotra_brody_DCA-ENG-2.1_NSNTweaks_11_2/dca/../dca/build/inst/gstreamer/lib//libsvml.so: undefined symbol: __intel_cpu_indicator
==16009==
==16009== Events : Ir
==16009== Collected : 158904319
==16009==
==16009== I refs: 158,904,319
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
vex amd64->IR: unhandled instruction bytes: 0x49 0xF 0xFC 0x6B 0x10 0xF
==16008== valgrind: Unrecognised instruction at address 0x9f4f04a.
==16008== Your program just tried to execute an instruction that Valgrind
==16008== did not recognise. There are two possible reasons for this.
==16008== 1. Your program has a bug and erroneously jumped to a non-code
==16008== location. If you are running Memcheck and you just saw a
==16008== warning about a bad jump, it's probably your program's fault.
==16008== 2. The instruction is legitimate but Valgrind doesn't handle it,
==16008== i.e. it's Valgrind's fault. If you think this is the case or
==16008== you are not sure, please let us know and we'll try to fix it.
==16008== Either way, Valgrind will now raise a SIGILL signal which will
==16008== probably kill your program.
==16008==
==16008== Process terminating with default action of signal 4 (SIGILL)
==16008== Illegal opcode at address 0x9F4F04A
==16008== at 0x9F4F04A: ??? (in /home/amehrotra/views/amehrotra_brody_DCA-ENG-2.1_NSNTweaks_11_2/dca/build/inst/gstreamer/lib/gstreamer-0.10/libdcadec_h264.so)
==16008== by 0x9E7944E: y8_ippiFilterDeblockingChroma_VerEdge_H264_8u_C1IR (in /home/amehrotra/views/amehrotra_brody_DCA-ENG-2.1_NSNTweaks_11_2/dca/build/inst/gstreamer/lib/gstreamer-0.10/libdcadec_h264.so)
==16008== by 0x9CDE5D7: UMC::H264SegmentDecoder::DeblockChroma420(unsigned int, UMC::DeblockingParameters*) (umc_h264_segment_decoder_deblocking.cpp:446)
==16008== by 0x9CDFAA1: UMC::H264SegmentDecoder::DeblockMacroblockISlice(int) (umc_h264_segment_decoder_deblocking.cpp:186)
==16008== by 0x9CDFDA4: UMC::H264SegmentDecoder::DeblockSegment(int, int) (umc_h264_segment_decoder_deblocking.cpp:121)
==16008== by 0x9C2D8D5: UMC::H264SegmentDecoder::DeblockSlice(int, int&) (umc_h264_segment_decoder.cpp:81)
==16008== by 0x9C1D529: UMC::H264SegmentDecoderMultiThreaded::ProcessSegment() (umc_h264_segment_decoder_mt.cpp:210)
==16008== by 0x9C00F45: UMC::TaskSupplier::RunDecoding(UMC::MediaData*, UMC::MediaData*, bool) (umc_h264_task_supplier.cpp:3175)
==16008== by 0x9C02669: UMC::TaskSupplier::AddSource(UMC::MediaData*&, UMC::MediaData*) (umc_h264_task_supplier.cpp:2334)
==16008== by 0x9BFB074: UMC::H264VideoDecoder::ParseFrame(UMC::MediaData*, UMC::MediaData*) (umc_h264_dec_decode_pic.cpp:268)
==16008== by 0x9BFB16B: UMC::H264VideoDecoder::GetFrame(UMC::MediaData*, UMC::MediaData*) (umc_h264_dec_decode_pic.cpp:216)
==16008== by 0x9BF9428: dcah264_dec_chain (in /home/amehrotra/views/amehrotra_brody_DCA-ENG-2.1_NSNTweaks_11_2/dca/build/inst/gstreamer/lib/gstreamer-0.10/libdcadec_h264.so)
==16008==
==16008== Events : Ir
==16008== Collected : 257134093
==16008==
==16008== I refs: 257,134,093
./runGSTCallGrind.sh: line 14: 16008 Killed valgrind --tool=callgrind --separate-threads=no --compress-strings=no --callgrind-out-file=gst_callgrind_eai_false_%p.out ./inst/gstreamer/bin/gst-launch-0.10 --gst-debug=*:0 filesrc location=/home/amehrotra/2_22712.ts ! mpegtsdemux ! dcadec_h264 iNumThreads=1 ! fakesink
-rwxr--r-- 1 amehrotra clearusr 1408588 Apr 3 23:16 gst_callgrind_eai_false_25680.out
-rwxr--r-- 1 amehrotra clearusr 322598 Apr 3 23:16 gst_callgrind_eai_false_25677.out
-rwxr--r-- 1 amehrotra clearusr 3321857 Apr 3 23:18 gst_callgrind_eai_false_25749.out
-rwxr--r-- 1 amehrotra clearusr 714650 Apr 3 23:18 gst_callgrind_eai_false_25748.out
-rwxr--r-- 1 amehrotra clearusr 489636 Apr 3 23:18 gst_callgrind_eai_false_25755.out
-rwxr--r-- 1 amehrotra clearusr 1515272 Apr 4 00:07 gst_callgrind_eai_false_25754.out
-rw------- 1 amehrotra clearusr 439716 Jun 19 21:14 gst_callgrind_eai_false_15990.out
-rw------- 1 amehrotra clearusr 889884 Jun 19 21:14 gst_callgrind_eai_false_15988.out
-rw------- 1 amehrotra clearusr 438328 Jun 19 21:16 gst_callgrind_eai_false_16009.out
-rw------- 1 amehrotra clearusr 1553565 Jun 19 21:16 gst_callgrind_eai_false_16008.out

0 Kudos
2 Replies
Chao_Y_Intel
Employee
111 Views

Hi,

For the error reported here, "unhandled instruction bytes". Intel IPP takes the latest CPU instructions with optimization. One possible reason is that the Valgrind does not handle the instruction or prefix correctly.

I did a search, and find similar problem reported in the Valgrind FAQ:

http://valgrind.org/docs/manual/faq.html

I would also suggest you also check with valgrind forum if there is some known problem.

Thanks
Chao

apolo74
Beginner
111 Views

Hello, I was wondering if there has been any solution to this Valgrind message... I am taking my code from a 32bit Linux into a 64bit Linux, and it's only with the 64bit instruction ippsMax_64f that I get this error message. In a sample code like:
Ipp64f src[5*3]={ 1.0f, 2.0f, 3.0f, 4.0f, 5.0f,6.0f, 7.0f, 8.0f, 9.0f,6.0f, 2.0f, 7.0f, 1.0f};
Ipp64f maxField;
cout << "Max of a field..." << endl;
ippsMax_64f( src, 5*3, &maxField );
cout << "Max: " << maxField << endl;
If I just run it, I get what I want:

Max of a field...
Max: 9
But when I run this with Valgrind, I get:
Max of a field...
vex amd64->IR: unhandled instruction bytes: 0xF2 0x48 0xF 0x5F 0x7 0x66
==26274== valgrind: Unrecognised instruction at address 0x732cab0.
==26274== Your program just tried to execute an instruction that Valgrind
==26274== did not recognise. There are two possible reasons for this.
==26274== 1. Your program has a bug and erroneously jumped to a non-code
==26274== location. If you are running Memcheck and you just saw a
==26274== warning about a bad jump, it's probably your program's fault.
==26274== 2. The instruction is legitimate but Valgrind doesn't handle it,
==26274== i.e. it's Valgrind's fault. If you think this is the case or
==26274== you are not sure, please let us know and we'll try to fix it.
==26274== Either way, Valgrind will now raise a SIGILL signal which will
==26274== probably kill your program.
==26274==
==26274== Process terminating with default action of signal 4 (SIGILL)
==26274== Illegal opcode at address 0x732CAB0
==26274== at 0x732CAB0: ??? (in /opt/intel/composerxe-2011.3.174/ipp/lib/intel64/libippsy8.so.7.0)
==26274== by 0x5BD9EFE: (below main) (libc-start.c:226)
I'm using that function in a much bigger code and even though my code runs, I do NOT get the expected results and maybe it is because this error. Any suggestions???
Reply