Unity8/Mir server crashes when given an invalid keymap

Bug #1557634 reported by Michael Terry
28
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Canonical System Image
Fix Released
Critical
Stephen M. Webb
Mir
Won't Fix
Critical
Andreas Pokorny
mir (Ubuntu)
Won't Fix
Critical
Andreas Pokorny
qtmir (Ubuntu)
Fix Released
Critical
Andreas Pokorny

Bug Description

https://errors.ubuntu.com/problem/4b8d65fc943d9604a00af4439b24bf85ddc6d1a7

I foolishly tested unity8's keymap switching with the keymap "zh" (I should have used "cn").

But I noticed that libmirclient crashed when I switched to "zh". While this isn't a supported use case, we shouldn't crash.

Here's a non-debugful stack trace:

#0 0xb61379a6 in ?? () from /lib/arm-linux-gnueabihf/libc.so.6
(gdb) bt
#0 0xb61379a6 in ?? () from /lib/arm-linux-gnueabihf/libc.so.6
#1 0xb614562e in raise () from /lib/arm-linux-gnueabihf/libc.so.6
#2 0xb6146332 in abort () from /lib/arm-linux-gnueabihf/libc.so.6
#3 0xb6283120 in __gnu_cxx::__verbose_terminate_handler() ()
   from /usr/lib/arm-linux-gnueabihf/libstdc++.so.6
#4 0xb6281950 in ?? () from /usr/lib/arm-linux-gnueabihf/libstdc++.so.6
#5 0xb62819a6 in std::terminate() ()
   from /usr/lib/arm-linux-gnueabihf/libstdc++.so.6
#6 0xb6281bc6 in __cxa_throw ()
   from /usr/lib/arm-linux-gnueabihf/libstdc++.so.6
#7 0xb3d726ec in ?? () from /usr/lib/arm-linux-gnueabihf/libmirclient.so.9
#8 0xb3d857f2 in mir::events::make_event(mir::IntWrapper<mir::frontend::detail::SessionsSurfaceIdTag, int> const&, long long, std::string const&, std::string const&, std::string const&, std::string const&) ()
   from /usr/lib/arm-linux-gnueabihf/libmirclient.so.9
#9 0xb3e3e5e2 in ?? () from /usr/lib/arm-linux-gnueabihf/libmirserver.so.38
#10 0xb3e24d1e in ?? () from /usr/lib/arm-linux-gnueabihf/libmirserver.so.38
#11 0xb3e2aeb0 in ?? () from /usr/lib/arm-linux-gnueabihf/libmirserver.so.38
#12 0xb3e26870 in ?? () from /usr/lib/arm-linux-gnueabihf/libmirserver.so.38
#13 0xaa6476ce in qtmir::MirSurface::setKeymap(QString const&, QString const&)

Related branches

summary: - Crashes when given an invalid keymap
+ Mir crashes when given an invalid keymap
Revision history for this message
Daniel van Vugt (vanvugt) wrote : Re: Mir server crashes when given an invalid keymap

See also bug 1627942

Changed in mir:
milestone: none → 1.0.0
importance: Undecided → Critical
Changed in mir (Ubuntu):
importance: Undecided → Critical
Changed in mir:
status: New → Confirmed
Changed in mir (Ubuntu):
status: New → Confirmed
summary: - Mir crashes when given an invalid keymap
+ Mir server crashes when given an invalid keymap
tags: added: input unity8-desktop
Changed in canonical-devices-system-image:
importance: Undecided → Critical
status: New → Confirmed
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Turns out this is the #4 most common crasher of Unity8 this month:
https://errors.ubuntu.com/problem/4b8d65fc943d9604a00af4439b24bf85ddc6d1a7

description: updated
kevin gunn (kgunn72)
Changed in canonical-devices-system-image:
milestone: none → u8c-1
assignee: nobody → Stephen M. Webb (bregma)
Changed in mir:
assignee: nobody → Andreas Pokorny (andreas-pokorny)
Changed in mir (Ubuntu):
assignee: nobody → Andreas Pokorny (andreas-pokorny)
summary: - Mir server crashes when given an invalid keymap
+ Unity8/Mir server crashes when given an invalid keymap
information type: Public → Public Security
information type: Public Security → Public
Revision history for this message
Andreas Pokorny (andreas-pokorny) wrote :

I have added qtmir - because I think qtmir could make wiser decisions on how to handle the error than the mir surface or key mapper.

Changed in mir:
status: Confirmed → In Progress
Changed in canonical-devices-system-image:
status: Confirmed → In Progress
Changed in mir:
milestone: 1.0.0 → none
status: In Progress → Confirmed
Changed in qtmir (Ubuntu):
assignee: nobody → Andreas Pokorny (andreas-pokorny)
status: New → In Progress
importance: Undecided → Critical
Changed in canonical-devices-system-image:
milestone: u8c-1 → u8c-z
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package qtmir - 0.5.1+17.04.20170328-0ubuntu1

---------------
qtmir (0.5.1+17.04.20170328-0ubuntu1) zesty; urgency=medium

  [ Alan Griffiths ]
  * MirAL will be correcting another spelling error shortly. Avoid an
    FTBFS when that happens.
  * Compatibility with lp:mir and lp:~alan-griffiths/miral/1.3

  [ Albert Astals Cid ]
  * Remove empty property and move invokable
  * Run ApplicationManager::authorizeSession in the calling thread (LP:
    #1525285)

  [ Andreas Pokorny ]
  * Report and consume exception that may occur on constructing a keymap
    (LP: #1557634)

  [ Daniel d'Andrada ]
  * Ensure the window that got a key down also gets the corresponding
    key up (LP: #1671072)

  [ Gerry Boland ]
  * Don't let a child window go offscreen because its parent moved
  * Add env var equivalent to desktop_file_hint

  [ Lukáš Tinkl ]
  * Raise (activate) windows when an app focus is requested (LP:
    #1672337)

 -- Michał Sawicz <email address hidden> Tue, 28 Mar 2017 17:14:50 +0000

Changed in qtmir (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Andreas Pokorny (andreas-pokorny) wrote :

no change needed in mir

Changed in mir:
status: Confirmed → Won't Fix
Stephen M. Webb (bregma)
Changed in mir (Ubuntu):
status: Confirmed → Won't Fix
Changed in canonical-devices-system-image:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.