Re: Clutter freezes with egl backend (starting from VT)



On Sun, Apr 23, 2017 at 08:15:26PM +0200, Ole Jørgen Brønner wrote:
Small test program and CLUTTER_DEBUG=all output attached.

The color of the stage should periodically (1hz) change between blue
and yellow. This works as expected when using the x11 backend running
in an X session.

When changing to "eglnative" and starting from a VT it freezes on blue.

The stacktrace is:

#0  0x00007ff12a5de8a0 in __read_nocancel () from
/nix/store/a5g*-glibc-2.25/lib/libpthread.so.0
#1  0x00007ff12dbccac7 in drmHandleEvent () from
/nix/store/kbx*-libdrm-2.4.75/lib/libdrm.so.2
#2  0x00007ff12e462c50 in handle_drm_event.isra.0.part () from
/nix/store/j6f*-cogl-1.22.2/lib/libcogl.so.20
#3  0x00007ff12e452823 in cogl_poll_renderer_dispatch () from
/nix/store/j6f*-cogl-1.22.2/lib/libcogl.so.20
#4  0x00007ff12e45b737 in cogl_glib_source_dispatch () from
/nix/store/j6f*-cogl-1.22.2/lib/libcogl.so.20
#5  0x00007ff12be0ed47 in g_main_context_dispatch () from
/nix/store/x7h*-glib-2.50.3/lib/libglib-2.0.so.0
#6  0x00007ff12be0efa0 in g_main_context_iterate.isra () from
/nix/store/x7h*-glib-2.50.3/lib/libglib-2.0.so.0
#7  0x00007ff12be0f2c2 in g_main_loop_run () from
/nix/store/x7h*-glib-2.50.3/lib/libglib-2.0.so.0

Running 'continue' and sampling a few more stacktraces indicates it's
blocking in "__read_nocancel ()"

The most suspicious thing I can see in the debug log is the "bail" messages.

Clutter-Message: [            +250]:[CLIPPING]:clutter-actor.c:17418:
Bail from get_paint_volume (<unnamed>[<ClutterGroup>:0xd8ae10]): Actor
failed to report a volume


We use clutter v1.26 built with "--enable-egl-native"

The gpu tested on is Intel HD Graphics 3000 .


We're trying to write a wayland compositor based on clutter and ran
into this problem. Narrowing it down the problem occurs without any
wayland libraries/interaction though.

It might just be that we initiate things incorrectly - if so -
feedback is greatly appreciated :)


I'd suspect this is due to clutter believing a page flip was queued, but
in fact it was not. It'll wait indefinitely for the page flip callback,
which will never happen. If this is due to your application or a bug in
clutter its hard to say, but would definitely not rule out the eglnative
backend of clutter being broken.

With that said, the original user of the eglnative backend in clutter
(mutter that is) does not use the stand alone clutter library anymore,
but a fork, that is bundled in the mutter git repository, together with
a fork of cogl. The reason for this was because it was a huge
pain to split KMS/drm interaction between three different code bases,
and that writing a Wayland compositor have very different requirements
from the backend compared to regular applications.

The 'eglnative' backend of clutter is more or less completely gone in
mutters clutter, and so is the corresponding parts of the cogl fork. The
only thing left is the evdev (libinput) part. KMS/drm interaction is
done completely inside mutter.

Thus, it is also not possible to use the forked clutter/cogl outside of
libmutter.

So, from a mutter/gnome-shell point of view, the eglnative backend of
clutter is pretty much abandoned.


Jonas



Best regard
Ole Jørgen

Clutter-Message: [       133647560]:[MISC]:clutter-feature.c:92: checking features
Clutter-Message: [            +409]:[MISC]:clutter-feature.c:96: allocating features data
Clutter-Message: [            +419]:[BACKEND]:clutter-backend.c:412: Checking for the OpenGL 3.2 core 
profile driver
Clutter-Message: [            +425]:[BACKEND]:clutter-backend.c:263: Creating Cogl renderer
Clutter-Message: [            +445]:[BACKEND]:clutter-backend.c:280: Connecting the renderer
Clutter-Message: [          +30209]:[BACKEND]:clutter-backend.c:285: Creating Cogl swap chain
Clutter-Message: [          +30253]:[BACKEND]:clutter-backend.c:288: Creating Cogl display
Clutter-Message: [          +43140]:[BACKEND]:clutter-backend.c:329: Setting up the display
Clutter-Message: [          +43599]:[BACKEND]:clutter-backend.c:333: Creating the Cogl context
Clutter-Message: [          +45194]:[BACKEND]:clutter-backend.c:481: Cogl only supports one onscreen 
framebuffer
Clutter-Message: [          +45215]:[BACKEND]:clutter-backend.c:491: Cogl doesn't support swap buffers 
throttling
Clutter-Message: [          +45221]:[BACKEND]:clutter-backend.c:495: Cogl supports swap buffers complete 
events
Clutter-Message: [          +45226]:[MISC]:clutter-feature.c:115: features checked
Clutter-Message: [          +46851]:[MISC]:clutter-main.c:762: Text direction: ltr
Clutter-Message: [          +46878]:[EVENT]:evdev/clutter-device-manager-evdev.c:2131: Initializing evdev 
backend
Clutter-Message: [         +197159]:[MISC]:clutter-input-device.c:1656: Associating device 4 'event3' to 
device 3 'Virtual keyboard device for seat'
Clutter-Message: [         +197185]:[EVENT]:evdev/clutter-device-manager-evdev.c:1151: Added physical 
device 'event3', type keyboard
Clutter-Message: [         +197202]:[MISC]:clutter-input-device.c:1656: Associating device 5 'event5' to 
device 3 'Virtual keyboard device for seat'
Clutter-Message: [         +197209]:[EVENT]:evdev/clutter-device-manager-evdev.c:1151: Added physical 
device 'event5', type keyboard
Clutter-Message: [         +197223]:[MISC]:clutter-input-device.c:1656: Associating device 6 'event2' to 
device 3 'Virtual keyboard device for seat'
Clutter-Message: [         +197230]:[EVENT]:evdev/clutter-device-manager-evdev.c:1151: Added physical 
device 'event2', type keyboard
Clutter-Message: [         +197243]:[MISC]:clutter-input-device.c:1656: Associating device 7 'event15' to 
device 3 'Virtual keyboard device for seat'
Clutter-Message: [         +197249]:[EVENT]:evdev/clutter-device-manager-evdev.c:1151: Added physical 
device 'event15', type keyboard
Clutter-Message: [         +197265]:[MISC]:clutter-input-device.c:1656: Associating device 8 'event0' to 
device 3 'Virtual keyboard device for seat'
Clutter-Message: [         +197271]:[EVENT]:evdev/clutter-device-manager-evdev.c:1151: Added physical 
device 'event0', type keyboard
Clutter-Message: [         +197285]:[EVENT]:evdev/clutter-device-manager-evdev.c:1151: Added physical 
device 'event6', type touchpad
Clutter-Message: [         +197298]:[MISC]:clutter-input-device.c:1656: Associating device 10 'event16' to 
device 2 'Virtual pointer device for seat'
Clutter-Message: [         +197304]:[EVENT]:evdev/clutter-device-manager-evdev.c:1151: Added physical 
device 'event16', type pointer
Clutter-Message: [         +197317]:[MISC]:clutter-input-device.c:1656: Associating device 11 'event4' to 
device 3 'Virtual keyboard device for seat'
Clutter-Message: [         +197323]:[EVENT]:evdev/clutter-device-manager-evdev.c:1151: Added physical 
device 'event4', type keyboard
Clutter-Message: [         +197414]:[MISC]:cally/cally.c:90: Clutter Accessibility initialized
Clutter-Message: [         +197787]:[PAINT]:clutter-actor.c:8793: Skipping 
queue_redraw('<unnamed>[<ClutterGroup>:0xd8ae10]'): mapped=no, mapped_clones=no, in_cloned_branch=no
Clutter-Message: [         +197797]:[BACKEND]:clutter-stage.c:2138: Creating stage from the default backend
Clutter-Message: [         +197845]:[ANIMATION]:clutter-actor.c:19241: Skipping implicit transition for 
'<unnamed>[<ClutterGroup>:0xd8ae10]::background-color'
Clutter-Message: [         +197860]:[PAINT]:clutter-actor.c:8793: Skipping 
queue_redraw('<unnamed>[<ClutterGroup>:0xd8ae10]'): mapped=no, mapped_clones=no, in_cloned_branch=no
Clutter-Message: [         +199037]:[PAINT]:clutter-actor.c:8793: Skipping 
queue_redraw('<unnamed>[<ClutterGroup>:0xd8ae10]'): mapped=no, mapped_clones=no, in_cloned_branch=no
Clutter-Message: [         +199134]:[ACTOR]:clutter-actor.c:2012: Realizing actor 
'<unnamed>[<ClutterGroup>:0xd8ae10]'
Clutter-Message: [         +199144]:[BACKEND]:cogl/clutter-stage-cogl.c:136: Realizing stage 
'ClutterStageEglNative' [0xd95000]
Clutter-Message: [         +199181]:[ANIMATION]:clutter-actor.c:19241: Skipping implicit transition for 
'<unnamed>[<ClutterGroup>:0xd8ae10]::background-color'
Clutter-Message: [         +199192]:[ACTOR]:clutter-stage.c:1078: Recomputing layout
Clutter-Message: [         +199198]:[LAYOUT]:clutter-actor.c:9115: Preferred size (height-for-width)
Clutter-Message: [         +199202]:[LAYOUT]:clutter-actor.c:9530: Width request for -1.00 px
Clutter-Message: [         +199211]:[LAYOUT]:clutter-actor.c:9665: Height request for 1366.00 px
Clutter-Message: [         +199217]:[ACTOR]:clutter-stage.c:1094: Allocating (0, 0 - 1366, 768) for the 
stage
Clutter-Message: [         +199236]:[LAYOUT]:clutter-actor.c:9384: Size cache hit for size: -1.00
Clutter-Message: [         +199242]:[LAYOUT]:clutter-actor.c:9384: Size cache hit for size: 1366.00
Clutter-Message: [         +199248]:[LAYOUT]:clutter-actor.c:9306: Adjusting allocated X and width
Clutter-Message: [         +199252]:[LAYOUT]:clutter-actor.c:9344: Adjusting allocated Y and height
Clutter-Message: [         +199257]:[ANIMATION]:clutter-actor.c:19241: Skipping implicit transition for 
'<unnamed>[<ClutterGroup>:0xd8ae10]::allocation'
Clutter-Message: [         +199263]:[LAYOUT]:clutter-actor.c:9946: Calling 
<unnamed>[<ClutterGroup>:0xd8ae10]::allocate()
Clutter-Message: [         +199269]:[LAYOUT]:clutter-stage.c:453: Overriding original allocation of 
1366.00x768.00 with 1366.00x768.00 (absolute origin not changed)
Clutter-Message: [         +199276]:[LAYOUT]:clutter-actor.c:2497: Allocation for 
'<unnamed>[<ClutterGroup>:0xd8ae10]' changed
Clutter-Message: [         +199284]:[PAINT]:clutter-actor.c:8793: Skipping 
queue_redraw('<unnamed>[<ClutterGroup>:0xd8ae10]'): mapped=no, mapped_clones=no, in_cloned_branch=no
Clutter-Message: [         +199290]:[PAINT]:clutter-actor.c:8793: Skipping 
queue_redraw('<unnamed>[<ClutterGroup>:0xd8ae10]'): mapped=no, mapped_clones=no, in_cloned_branch=no
Clutter-Message: [         +199295]:[PAINT]:clutter-actor.c:8793: Skipping 
queue_redraw('<unnamed>[<ClutterGroup>:0xd8ae10]'): mapped=no, mapped_clones=no, in_cloned_branch=no
Clutter-Message: [         +199301]:[ACTOR]:clutter-actor.c:1503: Mapping actor 
'<unnamed>[<ClutterGroup>:0xd8ae10]'
Clutter-Message: [         +199306]:[ACTOR]:clutter-actor.c:1512: Pick id '0' for actor 
'<unnamed>[<ClutterGroup>:0xd8ae10]'
Clutter-Message: [       134897089]:[ANIMATION]:clutter-actor.c:19241: Skipping implicit transition for 
'<unnamed>[<ClutterGroup>:0xd8ae10]::background-color'
Clutter-Message: [             +83]:[CLIPPING]:clutter-stage.c:3951: stage_queue_actor_redraw 
(actor=<unnamed>[<ClutterGroup>:0xd8ae10], clip=(nil)): 
Clutter-Message: [             +92]:[PAINT]:clutter-stage.c:3957: First redraw request
Clutter-Message: [            +140]:[SCHEDULER]:clutter-master-clock-default.c:315: draw the first frame 
immediately
Clutter-Message: [            +151]:[SCHEDULER]:clutter-master-clock-default.c:536: Master clock [tick]
Clutter-Message: [            +160]:[CLIPPING]:clutter-actor.c:17418: Bail from get_paint_volume 
(<unnamed>[<ClutterGroup>:0xd8ae10]): Actor failed to report a volume
Clutter-Message: [            +172]:[PAINT]:clutter-stage.c:1118: Redraw started for stage 
'<unnamed>[<ClutterGroup>:0xd8ae10]'[0xd8ae10]
Clutter-Message: [            +178]:[BACKEND]:clutter-backend.c:941: Setting the new stage [0xd8ae10]
Clutter-Message: [            +186]:[PAINT]:clutter-stage.c:3438: Setting up the viewport { w:1366.000000, 
h:768.000000 }
Clutter-Message: [            +216]:[CLIPPING]:clutter-stage.c:3951: stage_queue_actor_redraw 
(actor=<unnamed>[<ClutterGroup>:0xd8ae10], clip=(nil)): 
Clutter-Message: [            +223]:[PAINT]:clutter-stage.c:3969: Redraw request number 1
Clutter-Message: [            +232]:[CLIPPING]:cogl/clutter-stage-cogl.c:538: Unclipped stage paint

Clutter-Message: [            +238]:[CLIPPING]:clutter-stage.c:676: Setting stage clip too: x=0.000000, 
y=0.000000, width=1366.000000, height=768.000000
Clutter-Message: [            +250]:[CLIPPING]:clutter-actor.c:17418: Bail from get_paint_volume 
(<unnamed>[<ClutterGroup>:0xd8ae10]): Actor failed to report a volume
Clutter-Message: [            +256]:[CLIPPING]:clutter-actor.c:3495: Bail from update_last_paint_volume 
(<unnamed>[<ClutterGroup>:0xd8ae10]): Actor failed to report a paint volume
Clutter-Message: [            +261]:[CLIPPING]:clutter-actor.c:3447: Bail from cull_actor without culling 
(<unnamed>[<ClutterGroup>:0xd8ae10]): ->last_paint_volume_valid == FALSE
Clutter-Message: [            +288]:[PAINT]:clutter-actor.c:3680: Stage clear color: (0, 0, 255, 255)
Render tree starting from 0xd89800:
{"type":"ClutterDummyNode","name":"Root","node-data":{"actor":"<unnamed>[<ClutterGroup>:0xd8ae10]"},"operations":[],"children":[{"type":"ClutterRootNode","name":"stageClear","node-data":null,"operations":[{"texrect":[0,0,1366,768,0,0,1,1]}],"children":[]}]}
Clutter-Message: [           +1798]:[BACKEND]:cogl/clutter-stage-cogl.c:631: cogl_onscreen_swap_buffers 
(onscreen: 0x9c4250)
Clutter-Message: [           +9305]:[PAINT]:clutter-stage.c:1149: Redraw finished for stage 
'<unnamed>[<ClutterGroup>:0xd8ae10]'[0xd8ae10]
Clutter-Message: [           +9358]:[SCHEDULER]:clutter-stage.c:1195: Queued 1 redraws during the last cycle

#include <clutter/clutter.h>
#include <glib.h>


static gboolean toggle_state = TRUE;
static int counter = 0;

static ClutterActor *stage = NULL; 
static GMainLoop *loop = NULL;

gboolean
swap_color(gpointer data)
{
  if(toggle_state)
    clutter_actor_set_background_color(stage,
                                       clutter_color_get_static(CLUTTER_COLOR_BLUE));
  else
    clutter_actor_set_background_color(stage,
                                       clutter_color_get_static(CLUTTER_COLOR_YELLOW));

  toggle_state = !toggle_state;
  counter++;

  if(counter > 20)
    g_main_loop_quit(loop);

  return TRUE;
}

int
main (int argc, char **argv) {

 // clutter_set_windowing_backend("x11");
  clutter_set_windowing_backend("eglnative");

  if(!clutter_init(&argc, &argv))
    return 1;

  stage = (ClutterActor*)clutter_stage_new();

  clutter_actor_set_background_color(stage,
                                     clutter_color_get_static(CLUTTER_COLOR_WHITE));

  clutter_actor_show(stage);

  g_timeout_add_seconds(1, swap_color, NULL);

  loop = g_main_loop_new (NULL, FALSE);
  g_main_loop_run(loop);

  return 0;
}


_______________________________________________
clutter-list mailing list
clutter-list gnome org
https://mail.gnome.org/mailman/listinfo/clutter-list



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]