Media (Intel® oneAPI Video Processing Library, Intel Media SDK)
Access community support with transcoding, decoding, and encoding in applications using media tools from Intel. This includes Intel® oneAPI Video Processing Library and Intel® Media SDK.

sample_decode jpeg fail with gpu hang

Daydaysee
Beginner
946 Views

Platform: Centos 7.4 Kernel 5.2.4 with E3-1515M
decode gpu-hang.jpg using sample_decode, the program will get stuck for a while and then return normally, but the decoded image is invalid, while dmesg show "i915 0000:00:02.0: Resetting vcs0 for hang on vcs0"

The attachment is gpu-hang.jpg,gpu hang can be reproduced with decoding this image.

#dmesg -T
[Tue Aug 25 16:17:48 2020] i915 0000:00:02.0: Resetting vcs0 for hang on vcs0
[Tue Aug 25 16:25:29 2020] i915 0000:00:02.0: Resetting vcs0 for hang on vcs0

#./sample_decode jpeg -i gpu-hang.jpg -o out.yuv
pretending that aspect ratio is 1:1
libva info: VA-API version 1.4.1
libva info: va_getDriverName() returns 0
libva info: User requested driver 'iHD'
libva info: Trying to open /usr/lib/dri//iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_4
libva info: va_openDriver() returns 0
Decoding Sample Version 8.3.26.

Input video JPEG
Output format NV12
Input:
Resolution 352x288
Crop X,Y,W,H 0,0,352,288
Output:
Resolution 352x288
Frame rate 30.00
Memory type system
MediaSDK impl hw
MediaSDK version 1.29

Decoding started
Frame number: 1, fps: 0.128, fread_fps: 0.000, fwrite_fps: 2597.403
Decoding finished

Labels (1)
0 Kudos
5 Replies
IntelSupport
Community Manager
927 Views

Hi Daydaysee,


What version of Media SDK are you using? I believe API 1.29 was included in release 2019 Q1 which is quite old. Do you see the same behavior on the latest Media SDK 20.2 release?


Regards,

Jesus


Daydaysee
Beginner
912 Views

We have saw the same behavior  with MediaSDK 20.2.0.

[Tue Sep 8 11:18:57 2020] i915 0000:00:02.0: Resetting vcs0 for preemption time out
[root@localhost samples]# ./sample_decode jpeg -i gpu-hang.jpg
libva info: VA-API version 1.8.0
libva info: Trying to open /usr/lib/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_8
libva info: va_openDriver() returns 0
pretending that aspect ratio is 1:1
Decoding Sample Version 20.2.0


Input video JPEG
Output format NV12
Input:
Resolution 352x288
Crop X,Y,W,H 0,0,352,288
Output:
Resolution 352x288
Frame rate 30.00
Memory type system
MediaSDK impl hw
MediaSDK version 1.33

Decoding started
Frame number: 1, fps: 0.148, fread_fps: 0.000, fwrite_fps: 0.000
Decoding finished
[root@localhost samples]#

Mark_L_Intel1
Moderator
856 Views

Hi Guoqing,


Sorry for the late response.


Yes, I can reproduce this issue. I also did some investigation on the input file, its meta data looks normal, but I got the same error when I open it with my Preview app in Mac.


I have reported this to dev team and I will update you with the result.


Mark


Mark_L_Intel1
Moderator
784 Views

Hi Guoqing,


Just an update.


Dev team has completed the investigation and identify the root cause. They will put the fix next.


Mark


Mark_L_Intel1
Moderator
662 Views

Hi Guoqing,


I have confirmed this issue is fixed by the commit:

https://github.com/intel/media-driver/commit/d0571ead99efae0c36fb16133a4c8cd987575a8d


Please try it and let me know if this issue is still exists in the latest code.


Mark


Reply