Mir

Mir server crahes when allocating & freeing surfaces from multiple threads

Bug #1185589 reported by Thomi Richards
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mir
Fix Released
High
Robert Carr

Bug Description

The mir_demo_server crashes if I try and allocate & free surfaces from multiple threads. To reproduce, grab:

lp:~thomir/+junk/mir-stress

Build it:

mkdir build
cd build
cmake ..
make

And run it like so:

./mir-stress -t 2 -n 10

(that runs with 2 threads for 10 seconds - if you want to be more violent, try with '-t 8' for 8 threads, or omit the '-t n' parameter alltogether, in which case it will use num_cores).

Related branches

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

Upon further investigation, it seems the crash is prevented by running:

./mir_demo_server --enable-input=false

And the stack trace indicates the input system is to blame, so I think we now have a pretty good idea of where the problem is :)

Changed in mir:
status: New → Triaged
importance: Undecided → High
assignee: nobody → Robert Carr (robertcarr)
Revision history for this message
Robert Carr (robertcarr) wrote :

There were quite a few things going on here (and a different set of things prior to and after landing rebuild-input-targeting). Eventually there was also a deadlock triggered only when moving the mouse during the stress test.

Things seem to work fine with the above changes.

I think I owe an explanation of what was going on as it is an interesting warning for the future (and perhaps indicative of some other problems) but am kind of burned out on thinking about this right now! So am going to come back monday. If I forget, someone should harass me before closing this bug!

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.4

Changed in mir:
status: Triaged → Fix Committed
Changed in mir:
milestone: none → 0.0.4
Changed in mir:
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

Remote bug watches

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