demo server locks up in certain scenarios with --disable-overlays false when starting/stopping second clients

Bug #1329868 reported by Kevin DuBois on 2014-06-13
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fix Released
Kevin DuBois
mir (Ubuntu)

Bug Description

This bug came up when trying to integrate the overlay work into the greater system. It should not be seen in unity, as unity has overlays disabled.

Basically, if you start a demo server with:
./mir_demo_server_basic --disable-overlays false --hwc-log report
and then start two clients, and you see that both were accepted as overlays,
and then start and stop the 2nd client repeatedly, approximately 1/7 times (nex4), the composition loop will block down in the hwc code.

Related branches

Revision history for this message
Kevin DuBois (kdub) wrote :

So basically, what is happening is:

<render 1>
one renderable is accepted as an overlay
fence for first renderable is raised, guaranteeing no one can /write/ to the buffer while hwc is /reading/

second renderable appears

<render 2>
both surfaces are rejected as on overlay, must be rendered via the fallback renderer
the buffer for the 1st client has not been updated, so the fallback renderer tries to gl_bind_to_texture the buffer.
the buffer waits on the fence indefinitely, as the hwc will never signal the fence until the next set() is called.

So, since both the hwc usage and the texture binding is a read-only operation, we're safe to allow the texture read while the buffer's fence is guarding a read-only operation.

Revision history for this message
Kevin DuBois (kdub) wrote :

fix merged into lp:mir/devel revision 1713

Changed in mir:
status: In Progress → Fix Committed
Changed in mir:
milestone: none → 0.4.0
Changed in mir:
status: Fix Committed → Fix Released
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

mir (0.4.0+14.10.20140701.1-0ubuntu1) utopic; urgency=medium

Changed in mir (Ubuntu):
importance: Undecided → High
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