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.
Could you provide the command line you're using ?
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.
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.
(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.
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.