Skip to content

lib/lp-scene.c: Deadlock on scene disposal #20

@rodrimc

Description

@rodrimc

Disposing the scene while there is a media playing may lead to deadlock. The function scene_step_unlocked() blocks indefinitely after calling g_main_context_iteration().

Here is the relevant part of the backtrace.
#0 0x00007ffff63f03ed in poll () from /lib64/libc.so.6
#1 0x00007ffff76aacb6 in g_main_context_poll (priority=, n_fds=2, fds=0x7fffac0010c0, timeout=, context=0x81cdb0) at gmain.c:4135
#2 g_main_context_iterate (context=context@entry=0x81cdb0, block=block@entry=1, dispatch=dispatch@entry=1, self=) at gmain.c:3835
#3 0x00007ffff76aadbc in g_main_context_iteration (context=0x81cdb0, may_block=may_block@entry=1) at gmain.c:3901
#4 0x00007ffff7bce734 in scene_step_unlocked (scene=scene@entry=0x6b40b0, block=block@entry=1) at lp-scene.c:438
#5 0x00007ffff7bd009f in _lp_scene_step (scene=0x6b40b0, block=1) at lp-scene.c:1321
#6 0x00007ffff7bcd875 in lp_media_dispose (object=0x892000) at lp-media.c:1226
#7 0x00007ffff7983ea6 in g_object_unref (_object=0x892000) at gobject.c:3146
#8 0x00007ffff7bce4b3 in scene_stop_unlocked (scene=scene@entry=0x6b40b0) at lp-scene.c:387
#9 0x00007ffff7bced30 in lp_scene_dispose (object=0x6b40b0) at lp-scene.c:991
#10 0x00007ffff7983ea6 in g_object_unref (_object=0x6b40b0) at gobject.c:3146

To reproduce the deadlock, run the program play ($PROJECT_DIR/src/play.c) and close the window while the media is still playing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions