[regression] SwitchingBundle in framedropping mode can hang
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mir |
Fix Released
|
Critical
|
Alexandros Frantzis | ||
mir (Ubuntu) |
Fix Released
|
Critical
|
Unassigned |
Bug Description
SwitchingBundle in framedropping mode can hang. To reproduce use
bin/mir_
with lp:mir/devel 1545. It seems that r1545 exposes the problem, but my understanding is that it doesn't cause it itself.
A sample run hangs with:
T1= client thread
T2 = one of the compositing threads
T1 client_acquire: enter (0x8974d8,
T1 entering framedropping
T2 compositor_release: enter (0x8974d8,
T2 complete_
T2 complete_
T2 compositor_release: leave (0x8974d8,
T2 compositor_acquire: enter (0x8974d8,
T2 compositor_acquire: leave (0x8974d8,
T2 compositor_release: enter (0x8974d8,
T2 compositor_release: leave (0x8974d8,
T1 enters the framedropping clause in client_acquire and blocks waiting for nready to become != 0 and hangs
There are two problems here:
1. T1 is not notified when a free buffer becomes available so it can unblock (nor does it check for it in the while loop after blocking).
2. Even if T1 managed to unblock, complete_
Related branches
- Alan Griffiths: Approve
- Alberto Aguirre (community): Approve
- PS Jenkins bot (community): Approve (continuous-integration)
-
Diff: 153 lines (+85/-11)3 files modifiedinclude/test/mir_test/wait_condition.h (+11/-4)
src/server/compositor/switching_bundle.cpp (+17/-7)
tests/unit-tests/compositor/test_switching_bundle.cpp (+57/-0)
Changed in mir: | |
assignee: | nobody → Alexandros Frantzis (afrantzis) |
Changed in mir: | |
milestone: | none → 0.1.9 |
Changed in mir (Ubuntu): | |
status: | Triaged → Fix Committed |
Changed in mir: | |
status: | Fix Committed → Fix Released |
This seems to be the cause of https:/ /jenkins. qa.ubuntu. com/job/ mir-mediumtests -runner- mako/1055/ console , and we will surely see more such failures.