Mir

core when running nested Mir

Bug #1507518 reported by Alan Griffiths
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mir
Expired
Undecided
Unassigned

Bug Description

During testing of display configuration errors while replugging an external monitor (on a laptop) I crashed the nested Mir server...

It doesn't seem to be related to the plugging, just to having an external monitor attached.

/1/ The system compositor:

    $ DISPLAY= sudo bin/mir_demo_server --window-manager system-compositor --arw-file --vt 1 --display-config sidebyside

/2/ The nested compositor:

    $ DISPLAY= bin/mir_demo_server --host /tmp/mir_socket --display-config sidebyside

/3/ A client:

    $ bin/mir_demo_client_egltriangle

After some time (around half an hour) I get the following core and stack trace:

Core was generated by `bin/mir_demo_server.bin --host /tmp/mir_socket --display-config sidebyside'.
Program terminated with signal SIGABRT, Aborted.
#0 0x00007fa8d5e54267 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:55
55 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0 0x00007fa8d5e54267 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:55
#1 0x00007fa8d5e55eca in __GI_abort () at abort.c:89
#2 0x00007fa8d5e97c53 in __libc_message (do_abort=do_abort@entry=1, fmt=fmt@entry=0x7fa8d5fb01a8 "*** Error in `%s': %s: 0x%s ***\n")
    at ../sysdeps/posix/libc_fatal.c:175
#3 0x00007fa8d5e9fc69 in malloc_printerr (ptr=<optimised out>, str=0x7fa8d5fac2fa "free(): invalid pointer", action=1) at malloc.c:4965
#4 _int_free (av=<optimised out>, p=<optimised out>, have_lock=0) at malloc.c:3834
#5 0x00007fa8d5ea389c in __GI___libc_free (mem=<optimised out>) at malloc.c:2950
#6 0x00007fa8cde5e319 in ?? () from /usr/lib/x86_64-linux-gnu/dri/i965_dri.so
#7 0x00007fa8cde5e3ce in ?? () from /usr/lib/x86_64-linux-gnu/dri/i965_dri.so
#8 0x00007fa8cde420d1 in ?? () from /usr/lib/x86_64-linux-gnu/dri/i965_dri.so
#9 0x00007fa8cdfc1047 in ?? () from /usr/lib/x86_64-linux-gnu/dri/i965_dri.so
#10 0x00007fa8cdf5a4ab in ?? () from /usr/lib/x86_64-linux-gnu/dri/i965_dri.so
#11 0x00007fa8ce01c463 in ?? () from /usr/lib/x86_64-linux-gnu/dri/i965_dri.so
#12 0x00007fa8d3bd7ef6 in dri2_swap_buffers (drv=<optimised out>, disp=<optimised out>, draw=0x1a25ef0)
    at ../../../../../../src/egl/drivers/dri2/platform_mir.c:460
#13 0x00007fa8d3bc95e5 in eglSwapBuffers (dpy=0x195e900, surface=<optimised out>) at ../../../../../src/egl/main/eglapi.c:830
#14 0x00007fa8d5423e39 in mir::graphics::nested::detail::DisplayBuffer::swap_buffers (this=0x1970e00)
    at /home/alan/display_server/mir/src/server/graphics/nested/display_buffer.cpp:73
#15 0x00007fa8d543791b in mir::renderer::gl::CurrentRenderTarget::swap_buffers (this=0x7fa8ac015e58)
    at /home/alan/display_server/mir/src/renderers/gl/renderer.cpp:68
#16 0x00007fa8d543860b in mir::renderer::gl::Renderer::render (this=0x7fa8ac015e50, renderables=std::vector of length 0, capacity 0)
    at /home/alan/display_server/mir/src/renderers/gl/renderer.cpp:206
#17 0x00007fa8d530d546 in mir::compositor::DefaultDisplayBufferCompositor::composite(std::vector<std::shared_ptr<mir::compositor::SceneElement>, std::allocator<std::shared_ptr<mir::compositor::SceneElement> > >&&) (this=0x7fa8ac079c00,
    scene_elements=<unknown type in /home/alan/.clion11/system/cmake/generated/9ec817d/9ec817d/Debug/lib/libmirserver.so.35, CU 0x680c97, DIE 0x68d3c1>)
    at /home/alan/display_server/mir/src/server/compositor/default_display_buffer_compositor.cpp:83
#18 0x00007fa8d53197e4 in mir::compositor::CompositingFunctor::operator() (this=0x1adda70)
    at /home/alan/display_server/mir/src/server/compositor/multi_threaded_compositor.cpp:143
#19 0x00007fa8d531c74e in std::_Function_handler<void (), std::reference_wrapper<mir::compositor::CompositingFunctor> >::_M_invoke(std::_Any_data const&)
    (__functor=...) at /usr/include/c++/4.9/functional:2069
#20 0x00007fa8d51f8f28 in std::function<void ()>::operator()() const (this=0x7fa8c6ffcdd0) at /usr/include/c++/4.9/functional:2439
#21 0x00007fa8d542e621 in (anonymous namespace)::Task::execute (this=0x7fa8c6ffcdd0)
    at /home/alan/display_server/mir/src/server/thread/basic_thread_pool.cpp:40
#22 0x00007fa8d542e957 in (anonymous namespace)::Worker::operator() (this=0x1a54640)
    at /home/alan/display_server/mir/src/server/thread/basic_thread_pool.cpp:91
#23 0x00007fa8d54322cb in std::__invoke<(anonymous namespace)::Worker> (__f=...) at /usr/include/c++/4.9/functional:202
#24 0x00007fa8d54322a0 in std::reference_wrapper<(anonymous namespace)::Worker>::operator()<>(void) const (this=0x1266138)
    at /usr/include/c++/4.9/functional:435
#25 0x00007fa8d543223a in std::_Bind_simple<std::reference_wrapper<(anonymous namespace)::Worker>()>::_M_invoke<>(std::_Index_tuple<>) (this=0x1266138)
    at /usr/include/c++/4.9/functional:1700
#26 0x00007fa8d543216c in std::_Bind_simple<std::reference_wrapper<(anonymous namespace)::Worker>()>::operator()(void) (this=0x1266138)
    at /usr/include/c++/4.9/functional:1688
#27 0x00007fa8d54320da in std::thread::_Impl<std::_Bind_simple<std::reference_wrapper<(anonymous namespace)::Worker>()> >::_M_run(void) (this=0x1266120)
    at /usr/include/c++/4.9/thread:115
#28 0x00007fa8d66d7e30 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#29 0x00007fa8d61f06aa in start_thread (arg=0x7fa8c6ffd700) at pthread_create.c:333
#30 0x00007fa8d5f25eed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

On further investigation, I get the same error without doing any plugging of the external monitor. Just leaving the system running for a while (didn't time it - about half an hour).

summary: - core when replugging external monitor
+ core when running nested Mir
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

Still not sure what triggers this, but it doesn't seem to happen without an external monitor attached.

description: updated
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

This is intel laptop running vivid with Mir trunk.

Revision history for this message
Alexandros Frantzis (afrantzis) wrote :
Download full text (4.1 KiB)

With an intel GPU, Mir trunk, latest wily, moving the client window between screens causes the nested server to crash soon after (although not immediately). The backtrace I get is:

#0 0x00007ffff7089267 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:55
#1 0x00007ffff708aeca in __GI_abort () at abort.c:89
#2 0x00007ffff70ccc53 in __libc_message (do_abort=do_abort@entry=1,
    fmt=fmt@entry=0x7ffff71e51a8 "*** Error in `%s': %s: 0x%s ***\n")
    at ../sysdeps/posix/libc_fatal.c:175
#3 0x00007ffff70d4c69 in malloc_printerr (ptr=<optimized out>,
    str=0x7ffff71e12fa "free(): invalid pointer", action=1) at malloc.c:4965
#4 _int_free (av=<optimized out>, p=<optimized out>, have_lock=0) at malloc.c:3834
#5 0x00007ffff70d889c in __GI___libc_free (mem=<optimized out>) at malloc.c:2950
#6 0x00007fffeba360b9 in _mesa_delete_program (ctx=<optimized out>, prog=0x76fde0)
    at ../../../../src/mesa/program/program.c:407
#7 0x00007fffeba3617b in _mesa_reference_program_ (ctx=ctx@entry=0x7ffff7fcf038,
    ptr=ptr@entry=0x7b3870, prog=prog@entry=0x0) at ../../../../src/mesa/program/program.c:483
#8 0x00007fffeba18b37 in _mesa_reference_program (prog=0x0, ptr=<optimized out>, ctx=0x7ffff7fcf038)
    at ../../../../src/mesa/program/program.h:121
#9 _mesa_reference_vertprog (prog=0x0, ptr=<optimized out>, ctx=0x7ffff7fcf038)
    at ../../../../src/mesa/program/program.h:129
#10 _mesa_meta_end (ctx=ctx@entry=0x7ffff7fcf038) at ../../../../src/mesa/drivers/common/meta.c:961
#11 0x00007fffeba19448 in meta_clear (ctx=ctx@entry=0x7ffff7fcf038, buffers=buffers@entry=2,
    glsl=glsl@entry=true) at ../../../../src/mesa/drivers/common/meta.c:1817
#12 0x00007fffeba1991a in _mesa_meta_glsl_Clear (ctx=ctx@entry=0x7ffff7fcf038, buffers=buffers@entry=2)
    at ../../../../src/mesa/drivers/common/meta.c:1502
#13 0x00007fffebb50e4b in brw_clear (ctx=0x7ffff7fcf038, mask=0)
    at ../../../../../../../src/mesa/drivers/dri/i965/brw_clear.c:264
#14 0x00007ffff687fe0f in mir::renderer::gl::Renderer::render (this=0x7fffd40008c0,
    renderables=std::vector of length 2, capacity 2 = {...})
    at /storage/work/mir/src/renderers/gl/renderer.cpp:198
#15 0x00007ffff67eca32 in mir::compositor::DefaultDisplayBufferCompositor::composite(std::vector<std::shared_ptr<mir::compositor::SceneElement>, std::allocator<std::shared_ptr<mir::compositor::SceneElement> > >&&) (this=this@entry=0x7fffd404a250,
    scene_elements=scene_elements@entry=<unknown type in /storage/work/mir/build/lib/libmirserver.so.35, CU 0x727f01, DIE 0x7349b4>)
    at /storage/work/mir/src/server/compositor/default_display_buffer_compositor.cpp:83
---Type <return> to continue, or q <return> to quit---
#16 0x00007ffff67f3f1c in mir::compositor::CompositingFunctor::operator() (this=0x821c70)
    at /storage/work/mir/src/server/compositor/multi_threaded_compositor.cpp:143
#17 0x00007ffff687c261 in std::function<void ()>::operator()() const (this=0x7fffe8b7ee70)
    at /usr/include/c++/5/functional:2271
#18 (anonymous namespace)::Task::execute (this=0x7fffe8b7ee70)
    at /storage/work/mir/src/server/thread/basic_thread_pool.cpp:40
#19 (anonymous namespace)::Worker::operator() (this=0x...

Read more...

Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

Also reproduced with wily with Mir trunk.

Changed in mir:
status: New → Confirmed
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

If it's occurring even without an external monitor, might be related to bug 1489689.

Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

Can no longer reproduce on wily with Mir 0.18 or trunk. Possibly related to a specific mesa revision.

Changed in mir:
status: Confirmed → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for Mir because there has been no activity for 60 days.]

Changed in mir:
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.