Mir

mir_stress suite causes mir_demo_server to crash

Bug #1195089 reported by Thomi Richards
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mir
Fix Released
Critical
Robert Carr
mir (Ubuntu)
Fix Released
Critical
Unassigned

Bug Description

Running the mir_stress suite causes the mir_demo_server binary to crash.

I'm building lp:mir from trunk, and running mir_demo_server and the mir_stress binaries. See attached stack trace for details.

Related branches

Revision history for this message
Thomi Richards (thomir-deactivatedaccount) wrote :
Changed in mir:
status: New → Triaged
importance: Undecided → Critical
Changed in mir:
assignee: nobody → Robert Ancell (robert-ancell)
Revision history for this message
Robert Ancell (robert-ancell) wrote :

I'm not able to reproduce. I've done basically:

$ bzr branch lp:mir
$ cd mir
$ ./native-compile.sh
$ sudo ./build-linux-x86/bin/mir_demo_server

And from another VT:
$ sudo ./build-linux-x86/bin/mir_stress

Revision history for this message
Thomi Richards (thomir-deactivatedaccount) wrote :

It seems you need to run mir_stress a second time before it will crash the server.

Revision history for this message
Robert Ancell (robert-ancell) wrote :

I had to run mir_stress a number of times but it does now reproduce for me.

Revision history for this message
Robert Ancell (robert-ancell) wrote :

This seems to be related to the threading in the frontend, still investigating...

Changed in mir:
status: Triaged → In Progress
Revision history for this message
Robert Carr (robertcarr) wrote :

Found the cause (short story: session_manager::close_session can throw and SessionMediator::disconnect is unequipped to deal with it. SessionManager::close_session is throwing due to a few seperate races though), think I've found a solution for it all. Will have a proposal tomorrow :)

Revision history for this message
Olli Ries (ories) wrote :

this (mir stress tests) will become part of the release criteria - and thus will require some attention.
Robert A/C, was there any progress?

Revision history for this message
Francis Ginther (fginther) wrote :

The qa team is working to enable the mir stress test as a default part of the mir-ci job to give feedback on future merge proposals. Eventually this will also be enabled for merging to trunk (i.e. mir-autolanding). We can coordinate timing to allow the mir team to resolve this.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Seems no longer in progress. Also, I just found a machine which can reproduce the crash...

terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<std::logic_error> >'
  what(): Invalid Session

#0 0x00007fdd59921f77 in __GI_raise (sig=sig@entry=6)
    at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1 0x00007fdd599255e8 in __GI_abort () at abort.c:90
#2 0x00007fdd59f286e5 in __gnu_cxx::__verbose_terminate_handler() ()
   from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#3 0x00007fdd59f26856 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#4 0x00007fdd59f25919 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#5 0x00007fdd59f264ca in __gxx_personality_v0 ()
   from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#6 0x00007fdd59cc17f3 in ?? () from /lib/x86_64-linux-gnu/libgcc_s.so.1
#7 0x00007fdd59cc1d27 in _Unwind_Resume ()
   from /lib/x86_64-linux-gnu/libgcc_s.so.1
#8 0x00007fdd5ad2d537 in mir::shell::SessionManager::close_session (
    this=0x1aa41d8, session=...)
    at /home/dan/bzr/mir/trunk/src/server/shell/session_manager.cpp:130
#9 0x00007fdd5acd583b in mir::frontend::SessionMediator::~SessionMediator (
    this=0x7fdd2c003408, __in_chrg=<optimised out>)
    at /home/dan/bzr/mir/trunk/src/server/frontend/session_mediator.cpp:74
#10 0x00007fdd5acae7e7 in __gnu_cxx::new_allocator<mir::frontend::SessionMediator>::destroy<mir::frontend::SessionMediator> (this=0x7fdd2c003400,
    __p=0x7fdd2c003408) at /usr/include/c++/4.8/ext/new_allocator.h:124
#11 0x00007fdd5acacfdb in std::allocator_traits<std::allocator<mir::frontend::SessionMediator> >::_S_destroy<mir::frontend::SessionMediator> (__a=...,
    __p=0x7fdd2c003408) at /usr/include/c++/4.8/bits/alloc_traits.h:281
#12 0x00007fdd5acaba0e in std::allocator_traits<std::allocator<mir::frontend::SessionMediator> >::destroy<mir::frontend::SessionMediator> (__a=...,
    __p=0x7fdd2c003408) at /usr/include/c++/4.8/bits/alloc_traits.h:405
#13 0x00007fdd5aca9775 in std::_Sp_counted_ptr_inplace<mir::frontend::SessionMediator, std::allocator<mir::frontend::SessionMediator>, (__gnu_cxx::_Lock_policy)2>::_M_dispose (this=0x7fdd2c0033f0)
    at /usr/include/c++/4.8/bits/shared_ptr_base.h:407
#14 0x0000000000452b0e in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (this=0x7fdd2c0033f0)
    at /usr/include/c++/4.8/bits/shared_ptr_base.h:144
#15 0x0000000000452441 in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count (this=0x7fdd2c003558, __in_chrg=<optimised out>)
    at /usr/include/c++/4.8/bits/shared_ptr_base.h:553
#16 0x00007fdd5acdadde in std::__shared_ptr<mir::protobuf::DisplayServer, (__gnu_cxx::_Lock_policy)2>::~__shared_ptr (this=0x7fdd2c003550,
    __in_chrg=<optimised out>)
    at /usr/include/c++/4.8/bits/shared_ptr_base.h:810
#17 0x00007fdd5acdadf8 in std::shared_ptr<mir::protobuf::DisplayServer>::~shared_ptr (this=0x7fdd2c003550, __in_chrg=<optimised out>)
    at /usr/include/c++/4.8/bits/shared_ptr.h:93
...

Changed in mir:
status: In Progress → Confirmed
assignee: Robert Ancell (robert-ancell) → nobody
Revision history for this message
Robert Carr (robertcarr) wrote :

I think there is a good chance that this is fixed now . I'm unable to reproduce it so far. I think the changes in focus control flow in client-focus-notifications fix the main issue that I was seeing (an invalid surface exception is thrown out of focus and handled up in the frontend, preventing the session mediator from clearing it's .session after disconnect and before ~SessionMediator which then tries to destroy the session again but it's gone).

Revision history for this message
Robert Carr (robertcarr) wrote :

IT was too good to be true, disregard that.

Changed in mir:
assignee: nobody → Robert Carr (robertcarr)
status: Confirmed → In Progress
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

The bug also manifests as:

terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<std::logic_error> >'
  what(): Requesting handle for an unregistered channel

If you run mir_stress with some input on another client.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

Fix committed into lp:mir at revision None, scheduled for release in mir, milestone 0.0.10

Changed in mir:
status: In Progress → Fix Committed
Changed in mir:
milestone: none → 0.0.10
status: Fix Committed → Fix Released
Changed in mir (Ubuntu):
status: New → Fix Committed
importance: Undecided → Critical
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mir - 0.0.10+13.10.20130827.1-0ubuntu1

---------------
mir (0.0.10+13.10.20130827.1-0ubuntu1) saucy; urgency=low

  [ Alan Griffiths ]
  * ipc: add a protocol version to the wire protocol so that we can bump
    it in future.
  * graphics::nested: Handling of output configuration changes.
  * graphics.nested: Hookup NestedDisplay to display change
    notifications.

  [ Daniel van Vugt ]
  * Introducing mir_demo_client_progressbar. It's pretty boring;
    designed to simulate key repeat scrolling in a terminal, as an aid
    for tracking down bug 1216472. . (LP: #1216472)

  [ Eleni Maria Stea ]
  * changed the GBMBufferAllocator constructor and class to use the
    gbm_device instead of the GBMPlatform to remove the dependency from
    the mg::Platform interface - this way we can use the
    GBMBufferAllocator with the NativeGBMPlatform (nested mir).

  [ Ubuntu daily release ]
  * Automatic snapshot from revision 1025
 -- Ubuntu daily release <email address hidden> Tue, 27 Aug 2013 18:04:47 +0000

Changed in mir (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

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