Mir mesa-kms driver crashes ("Failed to schedule page flip") if you turn the monitor off
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| | Mir |
Expired
|
High
|
Unassigned | |
Bug Description
Mir crashes if you turn the monitor off.
Test case:
1. Start a Mir server
2. Turn the monitor off
Expected: Mir keeps running.
Observed: Mir crashes:
ERROR: /home/dan/
Dynamic exception type: boost::
std::exception:
Related branches
- Kevin DuBois (community): Approve on 2016-11-04
- Andreas Pokorny (community): Approve on 2016-11-03
- Mir CI Bot: Approve (continuous-integration) on 2016-11-02
-
Diff: 202 lines (+66/-30)5 files modifiedsrc/platforms/mesa/server/kms/display_buffer.cpp (+20/-12)
src/platforms/mesa/server/kms/kms_page_flipper.cpp (+6/-0)
src/platforms/mesa/server/kms/real_kms_output.cpp (+9/-6)
tests/unit-tests/platforms/mesa/kms/test_display.cpp (+27/-8)
tests/unit-tests/platforms/mesa/kms/test_real_kms_output.cpp (+4/-4)
| Daniel van Vugt (vanvugt) wrote : | #1 |
| Alan Griffiths (alan-griffiths) wrote : | #2 |
I don't know if it is connected but (since late yesterday - I didn't try it earlier) I've been seeing that error on Wily when starting a server: No need to turn off a monitor.
It also happens with 0.14 - so possibly not a Mir change?
| Daniel van Vugt (vanvugt) wrote : | #3 |
Might be the new i915 kernel behaviour, but regardless I've always feared this would happen one day. We shouldn't treat it as fatal. Just ignore and carry on.
| Alan Griffiths (alan-griffiths) wrote : | #4 |
A bit more information:
I typically start a server with "--test-client <whatever>" and that seems to be what provokes the problem I see. If I start the server, then VT switch to start a client everything works. (Even if I switch a monitor off or on - so I can't confirm the above test case.)
This is with both trunk and 0.14 - so I agree in suspecting a change to kernel behaviour. While "carry on" seems plausible I think we ought to report that a problem occurred and not just ignore it.
No problems on vivid with either scenario or codebase.
| Alan Griffiths (alan-griffiths) wrote : | #5 |
OK filed my scenario as lp:1489806 - probably the same root cause, but keeping separate until we can confirm that.
| Alan Griffiths (alan-griffiths) wrote : | #6 |
looking at our schedule_
for (auto& output : outputs)
{
if (output-
}
...if there are no outputs we don't set page_flips_pending - and that leads immediately to a fatal error.
That isn't the problem in my similar scenario, but might be the problem here (but I can't reproduce).
| Changed in mir: | |
| assignee: | nobody → Daniel van Vugt (vanvugt) |
| status: | New → In Progress |
| milestone: | none → 0.16.0 |
| Daniel van Vugt (vanvugt) wrote : | #7 |
That's a good observation but apparently benign. The class in question never gets instantiated if there are zero outputs.
| Daniel van Vugt (vanvugt) wrote : | #8 |
On second thoughts, this is quite messy. We've got more code that needs fixing than I expected. Another day...
| Changed in mir: | |
| assignee: | Daniel van Vugt (vanvugt) → nobody |
| status: | In Progress → Triaged |
| milestone: | 0.16.0 → none |
| summary: |
- Mir crashes if you turn the monitor off + Mir mesa-kms driver crashes if you turn the monitor off |
| summary: |
- Mir mesa-kms driver crashes if you turn the monitor off + Mir mesa-kms driver crashes ("Failed to schedule page flip") if you turn + the monitor off |
| tags: | added: unity8-desktop |
| Changed in canonical-devices-system-image: | |
| importance: | Undecided → High |
| Daniel van Vugt (vanvugt) wrote : | #9 |
I'm struggling to reproduce this now, but it has been over 14 months. Regardless, the offending code has been removed in lp:~vanvugt/mir/fix-1584894.
| Changed in mir: | |
| assignee: | nobody → Daniel van Vugt (vanvugt) |
| milestone: | none → 0.25.0 |
| status: | Triaged → In Progress |
| status: | In Progress → Incomplete |
| milestone: | 0.25.0 → none |
| Changed in canonical-devices-system-image: | |
| status: | New → Incomplete |
| Changed in mir: | |
| assignee: | Daniel van Vugt (vanvugt) → nobody |
| Mir CI Bot (mir-ci-bot) wrote : | #10 |
Fix committed into lp:mir at revision None, scheduled for release in mir, milestone 0.25.0
| Changed in mir: | |
| status: | Incomplete → Fix Committed |
| Changed in mir: | |
| status: | Fix Committed → Incomplete |
| Launchpad Janitor (janitor) wrote : | #11 |
[Expired for Mir because there has been no activity for 60 days.]
| Changed in mir: | |
| status: | Incomplete → Expired |
| no longer affects: | canonical-devices-system-image |

I always suspected "Failed to schedule page flip" was a soft error. It should not be treated as fatal.