Mir

BufferSwapperMulti::in_use_by_client counter drops below zero

Bug #1199717 reported by Daniel van Vugt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mir
Fix Released
High
Daniel van Vugt
mir (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

In my debugging I discovered that BufferSwapperMulti::in_use_by_client frequently drops below zero. It looks like a logic error. See attached a patch which tests for this and results in integration tests hanging.

Related branches

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

should be fixed for 13.10

Changed in mir:
importance: Undecided → High
status: New → Triaged
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I think I see the problem. When the switching bundle switches, it only assigns free buffers to the new swapper. Non-free buffers are those still in use by a client/compositor.

So it's quite possible and correct that there will be more release calls than acquires after a switch. Either we should remove the client counter (because it's plain wrong), or we should augment it with a second counter to distinguish client acquires which happened before/after the latest switch.

Changed in mir:
assignee: nobody → Daniel van Vugt (vanvugt)
Changed in mir:
status: Triaged → In Progress
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

Fix committed into lp:mir at revision 948, scheduled for release in mir, milestone 0.0.9

Changed in mir:
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mir - 0.0.8+13.10.20130809.3-0ubuntu1

---------------
mir (0.0.8+13.10.20130809.3-0ubuntu1) saucy; urgency=low

  [ Daniel van Vugt ]
  * Simplify and generalize buffer swapping to support arbitrary numbers
    of: - buffers - compositors - clients This is a unified N-buffers
    algorithm which supports any positive number of buffers, as well as
    dynamically switching between synchronous and asynchronous
    behaviour. So it does everything the existing code does and more.
    The key requirement is to support an arbitrary number of (different)
    simultaneous compositor acquisitions, as is needed for bypass
    support (coming soon). This then leads to the requirement that a
    compositor and a snapshot buffer should be acquired differently.
    Because a snapshot should never consume frames, only observe them.
    On the other hand, a compositior acquire must consume a frame (if
    available) so as to guarantee correct ordering when more than one
    are acquired simultaneously in bypass mode. Also fixes LP: #1199717
    and is half the fix for LP: #1199450. (LP: #1199450, #1199717)

  [ Alan Griffiths ]
  * doc, tools: update instructions for "flipped" image.

  [ Christopher James Halse Rogers ]
  * Split out unversioned Mir platform package to fix upgrades across
    libmirserver SONAME bumps.

  [ Ubuntu daily release ]
  * Automatic snapshot from revision 950
 -- Ubuntu daily release <email address hidden> Fri, 09 Aug 2013 11:14:41 +0000

Changed in mir (Ubuntu):
status: New → Fix Released
Changed in mir:
milestone: none → 0.0.9
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.