Mir

Resizing windows can crash mir_demo_server [std::exception::what: unexpected release: no buffers were given to client]

Bug #1575211 reported by Alan Griffiths on 2016-04-26
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mir
Fix Released
Low
Alan Griffiths
mir (Ubuntu)
Undecided
Unassigned

Bug Description

$ mir_demo_server --launch mir_demo_client_egltriangle

Repeatedly Alt+drag middle button to make the surface as narrow as possible leads to:

Resized to 1x289
Surface occluded
Signal 1 received. Good night.
ERROR: /build/mir-pkdHET/mir-0.21.0+16.04.20160330/src/server/compositor/buffer_queue.cpp(259): Throw in function virtual void mir::compositor::BufferQueue::client_release(mir::graphics::Buffer*)
Dynamic exception type: boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<std::logic_error> >
std::exception::what: unexpected release: no buffers were given to client

Related branches

Alan Griffiths (alan-griffiths) wrote :

Empirically, this is broken in 0.21 and 0.22 but has been fixed since - not sure which commit (I got inconsistent results bisecting)

Daniel van Vugt (vanvugt) wrote :

I was wondering what bug 1506358 might look like since we turned NBS on. Maybe this is the new form of bug 1506358...

Can you reproduce it with --nbuffers=3 or do you hit bug 1506358 instead?

description: updated
Daniel van Vugt (vanvugt) wrote :

Ignore my question. From the description it is obviously using BufferQueue and not NBS.

Alan Griffiths (alan-griffiths) wrote :

Yes activating NBS "fixes" it.

mir_demo_server --launch mir_demo_client_egltriangle --nbuffers=0

works on 0.21

and

mir_demo_server --launch mir_demo_client_egltriangle --nbuffers=3

fails on trunk

Alan Griffiths (alan-griffiths) wrote :

With bit of debugging:

The "released_buffer" is in buffers and *already* in ready_to_composite_queue. ready_to_composite_queue has two entries, the second of which is the released_buffer.

The "released_buffer" is not in buffers_owned_by_client, free_buffers, or buffers_sent_to_compositor.

There is an entry in pending_client_notifications - not sure if that is relevant.

ready_to_composite_queue is only populated by BufferQueue::client_release(). Ignoring the second release only leads to "client released out of sequence" later.

Alan Griffiths (alan-griffiths) wrote :

And... the callstack comes from mir::examples::SurfaceInfo::SwappingPainter::swap_buffers()

which *doesn't* ensure that the callback stores a (new) buffer before painting and swapping - which could lead to posting one buffer twice and another never.

Changed in mir:
status: New → Confirmed
Changed in mir:
status: Confirmed → In Progress
importance: Undecided → Low
assignee: nobody → Alan Griffiths (alan-griffiths)
Mir CI Bot (mir-ci-bot) wrote :

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

Changed in mir:
status: In Progress → Fix Committed
Changed in mir:
milestone: none → 0.23.0
summary: - Resizing can crash mir_demo_server
+ Resizing windows can crash mir_demo_server
summary: - Resizing windows can crash mir_demo_server
+ Resizing windows can crash mir_demo_server [std::exception::what:
+ unexpected release: no buffers were given to client]
Changed in mir:
status: Fix Committed → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mir - 0.23.0+16.10.20160602.1-0ubuntu1

---------------
mir (0.23.0+16.10.20160602.1-0ubuntu1) yakkety; urgency=medium

  [ Kevin DuBois ]
  * New upstream release 0.23.0 (https://launchpad.net/mir/+milestone/0.23.0)
    - ABI summary:
      . mirclient ABI unchanged at 9
      . mirserver ABI bumped to 40
      . mircommon ABI bumped at 6
      . mirplatform ABI unchanged at 11
      . mirprotobuf ABI unchanged at 3
      . mirplatformgraphics ABI unchanged at 9
      . mirclientplatform ABI unchanged at 5
      . mirinputplatform ABI unchanged at 5
    - Enhancements:
      . Enable internal usage of more flexible graphics buffer submission,
        precursing client API additions.
    - Bug fixes:
      . Potential NBS performance loss after resize (LP: #1579076)
      . Performance loss with NBS and overlays on (LP: #1578159)
      . Mir crashes with useless backtrace when mg::Platform methods throw
        (LP: #1553549)
      . Virtual output is not removed when screencast client disappears
        (LP: #1573572)
      . Can't VT switch from mir_demo_server (any more) (LP: #1576260)
      . mir_demo_server(_minimal): Window movement/resizing stops responding
        when the cursor leaves the surface, and can lead to windows 1px wide
        and unrecoverable. (LP: #1447886)
      . Virtual display output configuration is set to LVDS (LP: #1573782)
      . Mir-on-X11 doesn't pass Alt+primary button drag to Mir (LP: #1575765)
      . Mir-on-X11 breaks mir_proving_server resize logic (LP: #1575192)
      . Resizing can crash mir_demo_server (LP: #1575211)
      . [regression] Cursor stops at phantom edge on M10 and N7 (LP: #1580774)
      . [regression] MIR_CLIENT_PERF_REPORT is showing bogus render times and
        buffer lag (LP: #1581368)
      . Test failures in ClientLogging.reports_performance due to the above
        fix. (LP: #1583970, LP: #1584603, LP: #1584605)
      . Do not throw when creating some objects under HWC 1.5 (LP: #1583086)
      . Correct black frame issue under Xmir (LP: #1584784)

  [ Tarmac, Kevin DuBois <email address hidden>, Daniel van Vugt <email address hidden>, Andreas Pokorny <email address hidden>, Alberto Aguirre ]
  * 0.23.0 Mir release

 -- Kevin DuBois <email address hidden> Thu, 02 Jun 2016 13:18:03 +0000

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

Other bug subscribers