[regression] [BufferQueue] double-buffered client freezes as no buffer is returned on compositor_release.
Bug #1319765 reported by
Daniel van Vugt
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mir |
Fix Released
|
Medium
|
Daniel van Vugt | ||
mir (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Double-buffered clients can freeze in some cases, indefinitely waiting for a callback that never comes (because no new compositor frames are scheduled).
Test case:
1. Force double-buffering in the server by changing 3 to 2 in buffer_
2. Start your modified server using: mir_demo_
3. Run: mir_demo_
4. Rotate the screen (Ctrl+Alt+
Expected: Screen rotates and client keeps rendering.
Observed: Screen rotates but client is frozen until you drag or resize it.
Related branches
lp:~vanvugt/mir/fix-1319765
- Kevin DuBois (community): Approve
- Alberto Aguirre (community): Approve
- PS Jenkins bot (community): Approve (continuous-integration)
-
Diff: 111 lines (+83/-5)2 files modifiedsrc/server/compositor/buffer_queue.cpp (+21/-5)
tests/unit-tests/compositor/test_buffer_queue.cpp (+62/-0)
summary: |
- [regression] [BufferQueue] client freezes as no buffer is returned after + [regression] [BufferQueue] client freezes as no buffer is returned on compositor_release. |
Changed in mir: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
> if (current_ compositor_ buffer != buffer.get() && nbuffers > 1) buffer. get(), std::move(lock));
> release(
> // else ... what happens to buffer? It's not in any queue any more, is it?
If the buffer is not released (and assuming nbuffers >1), then this means that the buffer is stored in "current_ compositor_ buffer" and therefore is not lost. The current_ compositor_ buffer is released to the client when in compositor_ acquire( ) we decide that it's time to give out a newer buffer (i.e. !should_ use_current_ buffer) .
So, everything seems to be in order here. Of course, there may be a sequence of actions that is problematic and we haven't yet discovered, but we need more information to investigate further.