Mir

Mir mesa-kms driver crashes ("Failed to schedule page flip") if you turn the monitor off

Bug #1489689 reported by Daniel van Vugt on 2015-08-28
6
This bug affects 1 person
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/bzr/mir/trunk/src/common/fatal/fatal.cpp(55): Throw in function void mir::fatal_error_except(const char*, ...)
Dynamic exception type: boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<std::runtime_error> >
std::exception::what: Failed to schedule page flip

Related branches

Daniel van Vugt (vanvugt) wrote :

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

Alan Griffiths (alan-griffiths) wrote :

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 :

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 :

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 :

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 :

 looking at our schedule_page_flip() code...

    for (auto& output : outputs)
    {
        if (output->schedule_page_flip(bufobj->get_drm_fb_id()))
            page_flips_pending = true;
    }

...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 :

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 :

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 :

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 :

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 :

[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
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers