Bug 86913 - VPP crashes in GPE pipeline
Summary: VPP crashes in GPE pipeline
Status: RESOLVED FIXED
Alias: None
Product: libva
Classification: Unclassified
Component: intel (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: haihao
QA Contact: Sean V Kelley
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-01 19:26 UTC by Antti Seppälä
Modified: 2014-12-15 05:01 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
GPE Pipeline load tester (6.27 KB, text/plain)
2014-12-01 19:26 UTC, Antti Seppälä
Details

Description Antti Seppälä 2014-12-01 19:26:07 UTC
Created attachment 110316 [details]
GPE Pipeline load tester

It seems that the libva-intel-driver gpe pipeline crashes quite frequently (on Haswell i5 at least) when running sharpening filter to a surface.

It either crashes with a segmentation fault or an assert.

My setup:
libva-1.4.1
libva-intel-driver-1.4.2.pre1 (git commit b66b860 from libva-intel-driver master branch)
Intel D54250WYK NUC kit (Haswell i5)


I'm attaching a simple test application that can reproduce the crash reliably.
The test application can be compiled with:
gcc -ggdb -Wall -lX11 -lva -lva-x11 gpe-crash.c -o gpe-crash

It can be run by: ./gpe-crash

The application creates and fills a surface and repeatedly tries to apply sharpening filter to it. After a while (about 13000 iterations) it crashes either with an assert:

gpe-crash: libva-intel-driver/src/gen75_vpp_gpe.c:181: gen75_gpe_process_interface_setup: Assertion `bo->virtual' failed.

or with a segmentation fault:

Program received signal SIGSEGV, Segmentation fault.
gen75_gpe_process_parameters_fill (ctx=<optimized out>, vpp_gpe_ctx=0x7fffb0266ba0) at gen75_vpp_gpe.c:238
238	         *command_ptr++ = (CMD_MEDIA_OBJECT | (size/sizeof(int) + 6 - 2));
Comment 1 Antti Seppälä 2014-12-01 19:28:56 UTC
Here is a gdb backtrace of the assert:

Program received signal SIGSEGV, Segmentation fault.
gen75_gpe_process_parameters_fill (ctx=<optimized out>, vpp_gpe_ctx=0x63e1a0)
    at /libva-intel-driver/src/gen75_vpp_gpe.c:238
238	         *command_ptr++ = (CMD_MEDIA_OBJECT | (size/sizeof(int) + 6 - 2));
(gdb) bt
#0  gen75_gpe_process_parameters_fill (ctx=<optimized out>, vpp_gpe_ctx=0x63e1a0)
    at libva-intel-driver/src/gen75_vpp_gpe.c:238
#1  gen75_gpe_process_pipeline_setup (vpp_gpe_ctx=0x63e1a0, ctx=0x30)
    at libva-intel-driver/src/gen75_vpp_gpe.c:268
#2  gen75_gpe_process_prepare (vpp_gpe_ctx=0x63e1a0, ctx=0x30)
    at libva-intel-driver/src/gen75_vpp_gpe.c:328
#3  gen75_gpe_process (vpp_gpe_ctx=0x63e1a0, ctx=0x30)
    at libva-intel-driver/src/gen75_vpp_gpe.c:352
#4  vpp_gpe_process (ctx=ctx@entry=0x60e360, vpp_gpe_ctx=vpp_gpe_ctx@entry=0x63e1a0)
    at libva-intel-driver/src/gen75_vpp_gpe.c:613
#5  0x00007ffff614c0b6 in vpp_gpe_process_sharpening (vpp_gpe_ctx=0x63e1a0, ctx=0x60e360)
    at libva-intel-driver/src/gen75_vpp_gpe.c:738
#6  vpp_gpe_process_picture (ctx=ctx@entry=0x60e360, vpp_gpe_ctx=0x63e1a0)
    at libva-intel-driver/src/gen75_vpp_gpe.c:833
#7  0x00007ffff6149e1a in gen75_vpp_gpe (proc_ctx=0x63dd40, ctx=0x60e360)
    at libva-intel-driver/src/gen75_picture_process.c:105
#8  gen75_proc_picture (ctx=0x60e360, profile=VAProfileNone, codec_state=0x612ce8, hw_context=0x63dd40)
    at libva-intel-driver/src/gen75_picture_process.c:201
#9  0x00007ffff788f72f in vaEndPicture (dpy=0x60e310, context=33554433) at libva-1.4.1/va/va.c:1129
#10 0x00000000004016f3 in gpe_loop (va_dpy=0x60e310) at gpe-crash.c:171
#11 0x000000000040187a in main () at gpe-crash.c:208
Comment 2 Antti Seppälä 2014-12-01 19:31:13 UTC
And here is gdb backtrace of the other crash:

 gpe-crash: libva-intel-driver/src/gen75_vpp_gpe.c:181: gen75_gpe_process_interface_setup: Assertion `bo->virtual' failed.
Program received signal SIGABRT, Aborted.
0x00007ffff7316297 in raise () from /lib64/libc.so.6
(gdb) bt
#0  0x00007ffff7316297 in raise () from /lib64/libc.so.6
#1  0x00007ffff73175b8 in abort () from /lib64/libc.so.6
#2  0x00007ffff730f3c6 in __assert_fail_base () from /lib64/libc.so.6
#3  0x00007ffff730f472 in __assert_fail () from /lib64/libc.so.6
#4  0x00007ffff614bc4b in gen75_gpe_process_interface_setup (ctx=<optimized out>, vpp_gpe_ctx=0x63e1a0)
    at libva-intel-driver/src/gen75_vpp_gpe.c:181
#5  gen75_gpe_process_prepare (vpp_gpe_ctx=0x63e1a0, ctx=0x60e360)
    at libva-intel-driver/src/gen75_vpp_gpe.c:324
#6  gen75_gpe_process (vpp_gpe_ctx=0x63e1a0, ctx=0x60e360)
    at libva-intel-driver/src/gen75_vpp_gpe.c:352
#7  vpp_gpe_process (ctx=ctx@entry=0x60e360, vpp_gpe_ctx=vpp_gpe_ctx@entry=0x63e1a0)
    at libva-intel-driver/src/gen75_vpp_gpe.c:613
#8  0x00007ffff614c0b6 in vpp_gpe_process_sharpening (vpp_gpe_ctx=0x63e1a0, ctx=0x60e360)
    at libva-intel-driver/src/gen75_vpp_gpe.c:738
#9  vpp_gpe_process_picture (ctx=ctx@entry=0x60e360, vpp_gpe_ctx=0x63e1a0)
    at libva-intel-driver/src/gen75_vpp_gpe.c:833
#10 0x00007ffff6149e1a in gen75_vpp_gpe (proc_ctx=0x63dd40, ctx=0x60e360)
    at libva-intel-driver/src/gen75_picture_process.c:105
#11 gen75_proc_picture (ctx=0x60e360, profile=VAProfileNone, codec_state=0x612ce8, hw_context=0x63dd40)
    at libva-intel-driver/src/gen75_picture_process.c:201
#12 0x00007ffff788f72f in vaEndPicture (dpy=0x60e310, context=33554433) at libva-1.4.1/va/va.c:1129
#13 0x00000000004016df in gpe_loop (va_dpy=0x60e310) at gpe-crash.c:171
#14 0x0000000000401866 in main () at gpe-crash.c:208
Comment 3 haihao 2014-12-15 05:01:11 UTC
This issue should be fixed by the following commit

commit da410c51863560aacae617946688bad8cd1473e0
Author: Xiang, Haihao <haihao.xiang@intel.com>
Date:   Mon Dec 15 12:01:16 2014 +0800

    Fix misused dri_bo_reference()


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.