Flickering showing stale buffers on Krillin
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| | Mir |
Fix Released
|
High
|
Kevin DuBois | |
| | mir (Ubuntu) |
Undecided
|
Unassigned | ||
Bug Description
Occasionally after a restart I get flickering showing stale buffers on Krillin with the latest vivid-proposed image (mir 0.12.1).
A video showing the problem: http://
The HWC log indicates that we somehow end up with an unexpected buffer when compositing:
set list():
# | handle
0 | 0x3f4770 <====== This buffer is the odd one out
1 | 0x3f4188
...
set list():
# | handle
0 | 0xac202978
1 | 0x3f4188
...
set list():
# | handle
0 | 0xac203f60
1 | 0x3f4188
Related branches
- Alberto Aguirre: Approve on 2015-04-27
- Alan Griffiths: Approve on 2015-04-27
- Alexandros Frantzis (community): Approve on 2015-04-24
- PS Jenkins bot: Approve (continuous-integration) on 2015-04-23
-
Diff: 533 lines (+162/-37)16 files modifiedsrc/client/buffer_stream.cpp (+5/-0)
src/client/buffer_stream.h (+1/-0)
src/client/client_buffer_depository.cpp (+14/-3)
src/client/client_buffer_depository.h (+2/-2)
src/common/graphics/android/mir_native_window.cpp (+4/-3)
src/include/client/mir/egl_native_surface.h (+1/-0)
src/include/common/mir/graphics/android/android_driver_interpreter.h (+1/-0)
src/platforms/android/client/egl_native_surface_interpreter.cpp (+7/-0)
src/platforms/android/client/egl_native_surface_interpreter.h (+6/-5)
src/platforms/android/server/server_render_window.cpp (+5/-0)
src/platforms/android/server/server_render_window.h (+6/-5)
tests/include/mir_test_doubles/mock_egl_native_surface.h (+1/-0)
tests/include/mir_test_doubles/stub_driver_interpreter.h (+12/-4)
tests/unit-tests/client/android/test_android_native_window.cpp (+9/-0)
tests/unit-tests/client/android/test_egl_native_surface_interpreter.cpp (+21/-0)
tests/unit-tests/client/test_client_buffer_depository.cpp (+67/-15)
| Daniel van Vugt (vanvugt) wrote : | #1 |
| Daniel van Vugt (vanvugt) wrote : | #2 |
Is this with standard images or built yourself? If standard (Mir 0.12) then I'd say this is probably related to bug 1270245.
| Changed in mir: | |
| status: | New → Incomplete |
| Alexandros Frantzis (afrantzis) wrote : | #3 |
> Is this with standard images or built yourself? If standard (Mir 0.12) then I'd say this is probably related to bug 1270245.
This is with 0.12.1 (latest vivid-proposed image).
| Changed in mir: | |
| status: | Incomplete → New |
| description: | updated |
| Changed in mir: | |
| status: | New → In Progress |
| Changed in mir: | |
| milestone: | none → 0.13.0 |
| Alexandros Frantzis (afrantzis) wrote : | #4 |
A much easier way to reproduce the problem:
https:/
Run a client (e.g. mir_demo_
| Kevin DuBois (kdub) wrote : | #5 |
Interestingly, this happens with --disable-
| Changed in mir: | |
| assignee: | Alexandros Frantzis (afrantzis) → Kevin DuBois (kdub) |
| Kevin DuBois (kdub) wrote : | #6 |
At about the same time that the re-allocation sequence happens on the server, the client starts to produce black/blank frames.
| Kevin DuBois (kdub) wrote : | #7 |
Setting NATIVE_
What is happening is the first time the client sees the newly-allocated frame, it registerBuffers() the new buffer without error, and then the driver dequeue()s the buffer, and then queue the buffer, but doesn't write to the buffer.
| Kevin DuBois (kdub) wrote : | #8 |
Best guess at this point is that the driver has a pipeline of buffers its working on, and the introduction of a new, same-sized buffer mid-flight causes the driver not to write to the buffer.
| tags: | added: android krillin |
| Kevin DuBois (kdub) wrote : | #9 |
Seems the root cause is that the driver is requesting and remembering that specific number of buffers are available (in this case, 5 buffers). If one of the buffers the driver has remembered gets unregistered in gralloc, then the incoming buffer that takes the slot of the remembered+
I don't think at first glance that this related to any lingering out-of-order bugs.
| Kevin DuBois (kdub) wrote : | #10 |
"I don't think at first glance that this related to any lingering out-of-order bugs."
eh, thinking a bit more, it seems something that could be related... will check if #1270245 is still happening with the patch
| Daniel van Vugt (vanvugt) wrote : | #11 |
Tested. Sadly bug 1270245 still happens with the patch.
| PS Jenkins bot (ps-jenkins) wrote : | #12 |
Fix committed into lp:mir at revision None, scheduled for release in mir, milestone 0.13.0
| Changed in mir: | |
| status: | In Progress → Fix Committed |
| Changed in mir: | |
| status: | Fix Committed → Fix Released |
| Launchpad Janitor (janitor) wrote : | #13 |
This bug was fixed in the package mir - 0.13.1+
---------------
mir (0.13.1+
[ Cemil Azizoglu ]
* New upstream release 0.13.1 (https:/
- ABI summary: No ABI break. Servers and clients do not need rebuilding.
. Mirclient ABI unchanged at 8
. Mircommon ABI unchanged at 4
. Mirplatform ABI unchanged at 7
. Mirserver ABI unchanged at 31
- Bug fixes:
. Can't load app purchase UI without a U1 account (LP: #1450377)
. Crash because uncaught exception in mir::events:
-- CI Train Bot <email address hidden> Wed, 20 May 2015 21:20:15 +0000
| Changed in mir (Ubuntu): | |
| status: | New → Fix Released |

Could be related to stale frame bug 1270245 that also affects krillin.