Mir

Mir server dies on VT switch, if running as non-root

Bug #1169034 reported by Daniel van Vugt on 2013-04-15
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mir
Fix Released
Medium
Alexandros Frantzis

Bug Description

When I switch away from Mir using Alt+Fn, mir dies:

$ bin/mir
ERROR: /home/dan/bzr/mir/trunk/src/server/graphics/gbm/gbm_display_helpers.cpp(115): Throw in function void mir::graphics::gbm::helpers::DRMHelper::drop_master() const
Dynamic exception type: boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<std::runtime_error> >
std::exception::what: Failed to drop DRM master
[boost::errinfo_errno_*] = -1, "Unknown error -1"

Tags: vt Edit Tag help
Alexandros Frantzis (afrantzis) wrote :

We need to run mir with root priveleges for switching to work (drm{Set,Drop}Master require it).

Daniel van Vugt (vanvugt) wrote :

Oh, cool. It does work as root. Unfortunately that means /tmp/mir_socket is only writable by root. So clients have to run as root too. But that's a different bug.

Changed in mir:
importance: High → Medium
summary: - Mir server dies on VT switch
+ Mir server dies on VT switch, if running as non-root
Alan Griffiths (alan-griffiths) wrote :

Regardless, this behaviour and error message could be a lot clearer.

tags: added: bt
tags: added: vt
removed: bt
Alexandros Frantzis (afrantzis) wrote :

One option is to abort VT switching if we fail to properly pause the display server (e.g. we don't have root permissions). From the user's perspective it will seem as if VT switching is not working at all, but we can report the failure through our reporting mechanism to help with debugging. I think this is a reasonable way to allow non-root users to use the display server safely.

Alan Griffiths (alan-griffiths) wrote :

Agreed.

A failure to VT switch should be just that - a diagnostic report, not a crash.

And the diagnostic report should give a clue about the cause of failure.

Changed in mir:
assignee: nobody → Alexandros Frantzis (afrantzis)
status: New → In Progress
Alexandros Frantzis (afrantzis) wrote :

Fixed in lp:mir revision 610 (as described in comment #4).

Changed in mir:
status: In Progress → Fix Committed
Changed in mir:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers