Skip to content
This repository was archived by the owner on Jan 31, 2025. It is now read-only.
This repository was archived by the owner on Jan 31, 2025. It is now read-only.

i965_put_surface_dri failure causes a deadlock problem #515

Open
@moonpfe

Description

@moonpfe

Program is freezed on calling again i965_put_surface_dri() after i965_put_surface_dri() is failed with VA_STATUS_ERROR_ALLOCATION_FAILED.
This is because i965_put_surface_dri lock mutex, but ASSERT_RET does not unlock mutex.

_i965LockMutex(&i965->render_mutex);
dri_drawable = dri_vtable->get_drawable(ctx, (Drawable)draw);
ASSERT_RET(dri_drawable, VA_STATUS_ERROR_ALLOCATION_FAILED);
buffer = dri_vtable->get_rendering_buffer(ctx, dri_drawable);
ASSERT_RET(buffer, VA_STATUS_ERROR_ALLOCATION_FAILED);
dest_region = render_state->draw_region;
if (dest_region == NULL) {
dest_region = (struct intel_region *)calloc(1, sizeof(*dest_region));
ASSERT_RET(dest_region, VA_STATUS_ERROR_ALLOCATION_FAILED);
render_state->draw_region = dest_region;
}

(gdb) bt
#0  0x00007ffff39d9620 in __lll_lock_wait () at /usr/lib/libpthread.so.0
#1  0x00007ffff39d1df3 in pthread_mutex_lock () at /usr/lib/libpthread.so.0
#2  0x00007fffe78f9544 in i965_put_surface_dri () at /usr/lib/dri/i965_drv_video.so
#3  0x00007fffe789f44f in i965_PutSurface () at /usr/lib/dri/i965_drv_video.so
#4  0x00005555557349d5 in edc_va_put_surface
    (surface_id=0x4000140, drawable=<optimized out>, width=<optimized out>, height=<optimized out>, src_x=<optimized out>, src_y=<optimized out>, src_width=1280, src_height=720, dest_width=298, dest_height=200, deinterlace=<optimized out>) at ../edc/edc-va.c:1167
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions