hybrid GPU: crash deep in Mesa's i965 driver
while running in hybrid GPU under the following stack:
- mesa: master at a5053ba27e
- mutter: master at 70fcf745
- gnome-shell: master at 0b51ead00
- gnome-shell-extensions: master at ae65a82 (not strictly necessary but to keep dpkg happy)
with the following basic setup:
-[0000:00]-+-00.0 Intel Corporation Xeon E3-1200 v6/7th Gen Core Processor Host Bridge/DRAM Registers [8086:5910]
+-01.0-[01]----00.0 NVIDIA Corporation GP106M [GeForce GTX 1060]
Linux uini 4.14.0-3-amd64 #1 SMP Debian 4.14.13-1 (2018-01-14) x86_64 GNU/Linux (buster/sid)
with the dGPU powered up (echo ON > /proc/acpi/bbswitch
) and started prior to opening a session (servicectl stop gdm3.service ; modprobe nouveau ; servicectl start gdm3.service
) and with an external monitor plugged into the dGPU's HDMI port after starting nouveau but before starting a GNOME Shell session.
Action:
- in the GNOME Control Center, change the logical position of monitors to match the physical arrangement, click "confirm"
Expected:
- the session is stable, applies the requested changes, and shows the "confirm changes" dialog for 15 seconds
Obtained:
- the session crashes with the following stack trace:
#0 0x00007f8178efb000 in raise (sig=11) at ../sysdeps/unix/sysv/linux/raise.c:51
#1 0x000055fef5c309fb in dump_gjs_stack_on_signal_handler (signo=11) at ../src/main.c:367
#2 0x00007f8178efb160 in <signal handler called> () at /lib/x86_64-linux-gnu/libpthread.so.0
#3 0x00007f8178c898f1 in __memmove_avx_unaligned_erms () at ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:427
#4 0x00007f8160521ed7 in memcpy (__len=2816, __src=0x80, __dest=<optimized out>) at /usr/include/x86_64-linux-gnu/bits/string_fortified.h:34
#5 0x00007f8160521ed7 in copy_array_to_vbo_array (brw=brw@entry=0x55fef6bb64d0, min=min@entry=4, max=max@entry=91, buffer=buffer@entry=0x55fef6bd8100, dst_stride=dst_stride@entry=32, element=<optimized out>)
at ../../../../../../src/mesa/drivers/dri/i965/brw_draw_upload.c:440
#6 0x00007f8160522a99 in brw_prepare_vertices (brw=brw@entry=0x55fef6bb64d0) at ../../../../../../src/mesa/drivers/dri/i965/brw_draw_upload.c:650
#7 0x00007f816078b3f6 in gen9_emit_vertices (brw=0x55fef6bb64d0) at ../../../../../../src/mesa/drivers/dri/i965/genX_state_upload.c:459
#8 0x00007f816052ec58 in check_and_emit_atom (atom=0x55fef6bdcc48, state=<synthetic pointer>, brw=0x55fef6bb64d0) at ../../../../../../src/mesa/drivers/dri/i965/brw_state_upload.c:456
#9 0x00007f816052ec58 in brw_upload_pipeline_state (pipeline=BRW_RENDER_PIPELINE, brw=0x55fef6bb64d0) at ../../../../../../src/mesa/drivers/dri/i965/brw_state_upload.c:575
#10 0x00007f816052ec58 in brw_upload_render_state (brw=brw@entry=0x55fef6bb64d0) at ../../../../../../src/mesa/drivers/dri/i965/brw_state_upload.c:597
#11 0x00007f8160521490 in brw_draw_single_prim (indirect=0x0, stream=0, xfb_obj=0x0, prim_id=0, prim=<optimized out>, arrays=0x55fef6b9dd48, ctx=0x55fef6bb64d0) at ../../../../../../src/mesa/drivers/dri/i965/brw_draw.c:882
#12 0x00007f8160521490 in brw_draw_prims (ctx=0x55fef6bb64d0, prims=<optimized out>, nr_prims=1, ib=<optimized out>, index_bounds_valid=<optimized out>, min_index=<optimized out>, max_index=<optimized out>, gl_xfb_obj=0x0, stream=0, indirect=0x0) at ../../../../../../src/mesa/drivers/dri/i965/brw_draw.c:1018
#13 0x00007f81602f0308 in vbo_validated_drawrangeelements (ctx=ctx@entry=0x55fef6bb64d0, mode=mode@entry=4, index_bounds_valid=index_bounds_valid@entry=0 '\000', start=start@entry=0, end=end@entry=4294967295, count=count@entry=132, type=5121, indices=0x6, basevertex=0, numInstances=1, baseInstance=0) at ../../../src/mesa/vbo/vbo_exec_array.c:889
#14 0x00007f81602f0a7f in vbo_exec_DrawElements (mode=4, count=132, type=5121, indices=0x6) at ../../../src/mesa/vbo/vbo_exec_array.c:1039
#15 0x00007f8177c12032 in _cogl_framebuffer_gl_draw_indexed_attributes (framebuffer=0x55fef6d00740, pipeline=<optimized out>, mode=COGL_VERTICES_MODE_TRIANGLES, first_vertex=<optimized out>, n_vertices=132, indices=0x55fef94c4ea0, attributes=0x55fef6ba19d0, n_attributes=3, flags=(COGL_DRAW_SKIP_JOURNAL_FLUSH | COGL_DRAW_SKIP_PIPELINE_VALIDATION | COGL_DRAW_SKIP_FRAMEBUFFER_FLUSH | COGL_DRAW_SKIP_LEGACY_STATE)) at driver/gl/cogl-framebuffer-gl.c:1249
#16 0x00007f8177c53d14 in _cogl_journal_flush_modelview_and_entries (batch_start=<optimized out>, batch_len=22, data=0x7fffbc055c00) at cogl-journal.c:329
#17 0x00007f8177c54136 in batch_and_call (entries=<optimized out>, n_entries=<optimized out>, can_batch_callback=0x7f8177c53e90 <compare_entry_pipelines>, batch_callback=0x7f8177c549d0 <_cogl_journal_flush_pipeline_and_entries>, data=0x7fffbc055c00) at cogl-journal.c:266
#18 0x00007f8177c549a9 in batch_and_call (data=<optimized out>, batch_callback=<optimized out>, can_batch_callback=<optimized out>, n_entries=<optimized out>, entries=<optimized out>) at cogl-journal.c:252
#19 0x00007f8177c549a9 in _cogl_journal_flush_texcoord_vbo_offsets_and_entries (batch_start=0x55fefadd6c30, batch_len=24, data=0x7fffbc055c00) at cogl-journal.c:565
#20 0x00007f8177c543de in batch_and_call (data=0x7fffbc055c00, batch_callback=0x7f8177c54900 <_cogl_journal_flush_texcoord_vbo_offsets_and_entries>, can_batch_callback=0x7f8177c54010 <compare_entry_layer_numbers>, n_entries=24, entries=0x55fefadd6c30) at cogl-journal.c:252
#21 0x00007f8177c543de in _cogl_journal_flush_vbo_offsets_and_entries (batch_start=0x55fefadd6c30, batch_len=24, data=<optimized out>) at cogl-journal.c:673
#22 0x00007f8177c55719 in batch_and_call (data=0x7fffbc055c00, batch_callback=0x7f8177c54180 <_cogl_journal_flush_clip_stacks_and_entries>, can_batch_callback=0x7f8177c53bb0 <compare_entry_clip_stacks>, n_entries=<optimized out>, entries=<optimized out>) at cogl-journal.c:252
#23 0x00007f8177c55719 in _cogl_journal_flush (journal=<optimized out>) at cogl-journal.c:1400
#24 0x00007f8177c30cbc in _cogl_flush_attributes_state (framebuffer=framebuffer@entry=0x55fef6d00740, pipeline=0x55fef9d61eb0, flags=flags@entry=(unknown: 0), attributes=attributes@entry=0x55fef9082a80, n_attributes=n_attributes@entry=2) at cogl-attribute.c:631
#25 0x00007f8177c11f81 in _cogl_framebuffer_gl_draw_indexed_attributes (framebuffer=0x55fef6d00740, pipeline=<optimized out>, mode=COGL_VERTICES_MODE_TRIANGLES, first_vertex=0, n_vertices=150, indices=0x55fef94c4ea0, attributes=0x55fef9082a80, n_attributes=2, flags=(unknown: 0)) at driver/gl/cogl-framebuffer-gl.c:1221
#26 0x00007f8177c31e05 in _cogl_primitive_draw (primitive=<optimized out>, framebuffer=<optimized out>, pipeline=<optimized out>, flags=<optimized out>) at cogl-primitive.c:619
#27 0x00007f81796ad12c in emit_vertex_buffer_geometry (node=0x55fef9d80980, node=0x55fef9d80980, pipeline=0x55fef9d61eb0, fb=0x55fef6d00740) at cogl-pango-display-list.c:383
#28 0x00007f81796ad12c in _cogl_framebuffer_draw_display_list_texture (node=0x55fef9d80980, pipeline=0x55fef9d61eb0, fb=0x55fef6d00740) at cogl-pango-display-list.c:401
#29 0x00007f81796ad12c in _cogl_pango_display_list_render (fb=fb@entry=0x55fef6d00740, dl=0x55fefad4b380, color=color@entry=0x7fffbc055fb0) at cogl-pango-display-list.c:445
#30 0x00007f81796ae92c in cogl_pango_show_layout (fb=0x55fef6d00740, layout=0x55fef707d000, x=0, y=0, color=0x7fffbc055fb0) at cogl-pango-render.c:432
#31 0x00007f81796aeac1 in cogl_pango_render_layout_subpixel (layout=<optimized out>, x=<optimized out>, y=<optimized out>, color=<optimized out>, flags=<optimized out>) at cogl-pango-render.c:459
#32 0x00007f81796aeadb in cogl_pango_render_layout (layout=<optimized out>, x=<optimized out>, y=<optimized out>, color=<optimized out>, flags=<optimized out>) at cogl-pango-render.c:473
#33 0x00007f817996f81d in clutter_text_paint (self=0x55fefaca49a0 [ClutterText]) at clutter-text.c:2551
#34 0x00007f81799078fc in clutter_actor_continue_paint (self=self@entry=0x55fefaca49a0 [ClutterText]) at clutter-actor.c:4030
#35 0x00007f817990dca4 in clutter_actor_paint (self=0x55fefaca49a0 [ClutterText]) at clutter-actor.c:3946
#36 0x00007f817990df30 in clutter_actor_real_paint (actor=<optimized out>) at clutter-actor.c:3645
#37 0x00007f81799078fc in clutter_actor_continue_paint (self=self@entry=0x55fefaca44c0 [StButton]) at clutter-actor.c:4030
#38 0x00007f817990dca4 in clutter_actor_paint (self=0x55fefaca44c0 [StButton]) at clutter-actor.c:3946
#39 0x00007f817990df30 in clutter_actor_real_paint (actor=<optimized out>) at clutter-actor.c:3645
#40 0x00007f81799078fc in clutter_actor_continue_paint (self=self@entry=0x55fefaca8830 [StWidget]) at clutter-actor.c:4030
#41 0x00007f817990dca4 in clutter_actor_paint (self=self@entry=0x55fefaca8830 [StWidget]) at clutter-actor.c:3946
#42 0x00007f817990df01 in clutter_actor_paint (self=self@entry=0x55fefaca8830 [StWidget]) at clutter-actor.c:3972
#43 0x00007f81786ef208 in st_box_layout_paint (actor=<optimized out>) at ../src/st/st-box-layout.c:428
#44 0x00007f81799078fc in clutter_actor_continue_paint (self=self@entry=0x55fefaca7c50 [StBoxLayout]) at clutter-actor.c:4030
#45 0x00007f817990dca4 in clutter_actor_paint (self=0x55fefaca7c50 [StBoxLayout]) at clutter-actor.c:3946
#46 0x00007f817990df30 in clutter_actor_real_paint (actor=<optimized out>) at clutter-actor.c:3645
#47 0x00007f81799078fc in clutter_actor_continue_paint (self=self@entry=0x55fefaca6c40 [Gjs_Dialog]) at clutter-actor.c:4030
#48 0x00007f817990dca4 in clutter_actor_paint (self=0x55fefaca6c40 [Gjs_Dialog]) at clutter-actor.c:3946
#49 0x00007f817990df30 in clutter_actor_real_paint (actor=<optimized out>) at clutter-actor.c:3645
#50 0x00007f81799078fc in clutter_actor_continue_paint (self=self@entry=0x55fefacb0c40 [StWidget]) at clutter-actor.c:4030
#51 0x00007f817990dca4 in clutter_actor_paint (self=0x55fefacb0c40 [StWidget]) at clutter-actor.c:3946
#52 0x00007f817990df30 in clutter_actor_real_paint (actor=<optimized out>) at clutter-actor.c:3645
#53 0x00007f81799078fc in clutter_actor_continue_paint (self=self@entry=0x55fefacae470 [StBin]) at clutter-actor.c:4030
#54 0x00007f817990dca4 in clutter_actor_paint (self=0x55fefacae470 [StBin]) at clutter-actor.c:3946
#55 0x00007f817990df30 in clutter_actor_real_paint (actor=<optimized out>) at clutter-actor.c:3645
#56 0x00007f81799078fc in clutter_actor_continue_paint (self=self@entry=0x55fef9a0be40 [StWidget]) at clutter-actor.c:4030
#57 0x00007f817990dca4 in clutter_actor_paint (self=0x55fef9a0be40 [StWidget]) at clutter-actor.c:3946
#58 0x00007f817990df30 in clutter_actor_real_paint (actor=<optimized out>) at clutter-actor.c:3645
#59 0x00007f81799078fc in clutter_actor_continue_paint (self=self@entry=0x55fef795bd50 [StWidget]) at clutter-actor.c:4030
#60 0x00007f817990dca4 in clutter_actor_paint (self=self@entry=0x55fef795bd50 [StWidget]) at clutter-actor.c:3946
#61 0x00007f817990df01 in clutter_actor_paint (self=self@entry=0x55fef795bd50 [StWidget]) at clutter-actor.c:3972
#62 0x00007f817b568ed4 in shell_generic_container_paint (actor=0x55fef793ad40 [ShellGenericContainer]) at ../src/shell-generic-container.c:149
#63 0x00007f81799078fc in clutter_actor_continue_paint (self=self@entry=0x55fef793ad40 [ShellGenericContainer]) at clutter-actor.c:4030
#64 0x00007f817990dca4 in clutter_actor_paint (self=0x55fef793ad40 [ShellGenericContainer]) at clutter-actor.c:3946
#65 0x00007f817990df01 in clutter_actor_paint (self=<optimized out>) at clutter-actor.c:3972
#66 0x00007f81799624aa in clutter_stage_paint (self=<optimized out>) at clutter-stage.c:701
#67 0x00007f817917b602 in meta_stage_paint (actor=0x55fef6ce5e90 [MetaStage]) at backends/meta-stage.c:141
#68 0x00007f81799078fc in clutter_actor_continue_paint (self=self@entry=0x55fef6ce5e90 [MetaStage]) at clutter-actor.c:4030
#69 0x00007f817990dca4 in clutter_actor_paint (self=self@entry=0x55fef6ce5e90 [MetaStage]) at clutter-actor.c:3946
#70 0x00007f817990df01 in clutter_actor_paint (self=self@entry=0x55fef6ce5e90 [MetaStage]) at clutter-actor.c:3972
#71 0x00007f81799665ff in clutter_stage_do_paint_view (stage=stage@entry=0x55fef6ce5e90 [MetaStage], view=view@entry=0x55fef6cfe180 [MetaRendererView], clip=clip@entry=0x7fffbc057380) at clutter-stage.c:669
#72 0x00007f81799668f3 in _clutter_stage_paint_view (stage=stage@entry=0x55fef6ce5e90 [MetaStage], view=view@entry=0x55fef6cfe180 [MetaRendererView], clip=clip@entry=0x7fffbc057380) at clutter-stage.c:685
#73 0x00007f81798f67f4 in paint_stage (stage_cogl=stage_cogl@entry=0x55fef6ce6590 [MetaStageNative], view=view@entry=0x55fef6cfe180 [MetaRendererView], clip=clip@entry=0x7fffbc057380) at cogl/clutter-stage-cogl.c:424
#74 0x00007f81798f6993 in clutter_stage_cogl_redraw_view (stage_window=stage_window@entry=0x55fef6ce6590, view=0x55fef6cfe180 [MetaRendererView]) at cogl/clutter-stage-cogl.c:757
#75 0x00007f81798f7b7b in clutter_stage_cogl_redraw (stage_window=0x55fef6ce6590) at cogl/clutter-stage-cogl.c:868
#76 0x00007f8179963467 in clutter_stage_do_redraw (stage=0x55fef6ce5e90 [MetaStage]) at clutter-stage.c:1121
#77 0x00007f8179963467 in _clutter_stage_do_update (stage=0x55fef6ce5e90 [MetaStage]) at clutter-stage.c:1236
#78 0x00007f817994efe9 in master_clock_update_stages (master_clock=0x55fef6d05e80 [ClutterMasterClockDefault], stages=0x55fefa6fd360 = {...}) at clutter-master-clock-default.c:443
#79 0x00007f817994efe9 in clutter_clock_dispatch (source=source@entry=0x55fef6d27a90, callback=<optimized out>, user_data=<optimized out>) at clutter-master-clock-default.c:567
#80 0x00007f817ac8dd37 in g_main_dispatch (context=0x55fef69636e0) at ../../../../glib/gmain.c:3177
#81 0x00007f817ac8dd37 in g_main_context_dispatch (context=context@entry=0x55fef69636e0) at ../../../../glib/gmain.c:3830
#82 0x00007f817ac8df70 in g_main_context_iterate (context=0x55fef69636e0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../../../../glib/gmain.c:3903
#83 0x00007f817ac8e282 in g_main_loop_run (loop=0x55fef6d085f0) at ../../../../glib/gmain.c:4099
#84 0x00007f81791ab7ac in meta_run () at core/main.c:660
#85 0x000055fef5c3041c in main (argc=<optimized out>, argv=<optimized out>) at ../src/main.c:525
Note: the Xwayland server started next to the gnome-session also crashed, but apparently just due to an abrupt termination of the wayland event pipe at xwl_read_events; this is acceptable as a consequence of gnome-session dying.