Bug 91546 - vaTerminate crashes the app
Summary: vaTerminate crashes the app
Status: CLOSED WONTFIX
Alias: None
Product: libva
Classification: Unclassified
Component: core (show other bugs)
Version: unspecified
Hardware: All Linux (All)
: medium major
Assignee: haihao
QA Contact: Sean V Kelley
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-04 01:37 UTC by Ratin
Modified: 2016-11-03 20:56 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
vaTerminate causes segfault in _int_free (12.88 KB, text/plain)
2015-08-04 01:37 UTC, Ratin
Details

Description Ratin 2015-08-04 01:37:17 UTC
Created attachment 117499 [details]
vaTerminate causes segfault in _int_free

(gdb) p pVaContext2->context_id
$18 = 0
(gdb) n
3346	    if (pVaContext && pVaContext->config_id )vaDestroyConfig(pVAAPICNTX->vaDisplay, pVaContext->config_id);
(gdb) p pVaContext
$19 = (struct vaapi_context *) 0x7fffe84cb710
(gdb) p *pVaContext
$20 = {display = 0x7fffe84f3ea0, config_id = 16777216, context_id = 0, pic_param_buf_id = 0, iq_matrix_buf_id = 0, bitplane_buf_id = 0, slice_buf_ids = 0x0, n_slice_buf_ids = 0, 
  slice_buf_ids_alloc = 0, slice_params = 0x0, slice_param_size = 2088, slice_params_alloc = 0, slice_count = 0, slice_data = 0x0, slice_data_size = 0}
(gdb) p pVaContext->config_id
$21 = 16777216
(gdb) 
$22 = 16777216
(gdb) n
3347	    if (pVaContext2 && pVaContext2->config_id )vaDestroyConfig(pVAAPICNTX->vaDisplay, pVaContext2->config_id);
(gdb) 
3350	    if (pVAAPICNTX->vaDisplay)
(gdb) p pVAAPICNTX->vaDisplay
$23 = (VADisplay) 0x7fffe84f3ea0
(gdb) 
$24 = (VADisplay) 0x7fffe84f3ea0
(gdb) n
3352	        vaTerminate(pVAAPICNTX->vaDisplay);
(gdb) 

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff4bb5c6d in _int_free (av=0x7fffe8000020, p=<optimized out>, have_lock=0) at malloc.c:3987
3987	malloc.c: No such file or directory.
Comment 1 haihao 2015-09-29 07:42:22 UTC
Could you provide the command line you're using ?
Comment 2 Ratin 2015-09-30 22:14:07 UTC
Its a custom app, it has a one root window and child windows where vaapi is used to display various decoded contents. But when vaterminate is called on those child windows, program crashes.
Comment 3 haihao 2015-10-30 05:00:10 UTC
Sorry for slow response.  If possible, could you provide a simple case to reproduce this issue ? otherwise it is hard to narrow down the issue.
Comment 4 Ratin 2015-10-30 08:53:37 UTC
(In reply to haihao from comment #3)
> Sorry for slow response.  If possible, could you provide a simple case to
> reproduce this issue ? otherwise it is hard to narrow down the issue.

I will have to come up with a simpler version of the app then to send you, but it will be a hassle for me, plus different platform will probably have different results because of gpu and glx data pipeline. Right now I have a work around , I only call XOpenDisplay once and pass the display pointer around to all vaapi instances and then vaterminate doesn't cause the crash.
Comment 5 Sean V Kelley 2016-11-03 20:56:20 UTC
Please re-open when you can duplicate with a open source use case that can be shared.


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.