Mir

[regression] Black screen: Mir hangs and then crashes on startup/login due to reading from /dev/random

Bug #1536662 reported by Josh Arenson on 2016-01-21
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Mir
Fix Released
Critical
Daniel van Vugt
0.19
Won't Fix
Critical
Unassigned
0.20
Won't Fix
Critical
Unassigned
0.21
Won't Fix
Critical
Unassigned
Unity System Compositor
Critical
Brandon Schaefer
mir (Ubuntu)
Critical
Unassigned
unity-system-compositor (Ubuntu)
Undecided
Unassigned

Bug Description

cookie_factory attempts to read data from /dev/random at boot, and blocks until it has enough random data or timesout after 30 seconds.

How I can reproduce
1. Run the Unity8 greeter as a mir server
2. Reboot

Expected behavior: Greeter is displayed as mir && USC run happily
Actual behavior: Mir throws an exception after 30 seconds

Work-around:
Before logging in, move the mouse around lots, for at least 20 seconds. And after logging in, while you're looking at a black screen, move the mouse around furiously. This will populate the kernel entropy pool sufficiently to avoid the hang and crash.

Related branches

Changed in mir:
assignee: nobody → Brandon Schaefer (brandontschaefer)
importance: Undecided → High
status: New → In Progress

Seems to have come from r2943 (?)

------------------------------------------------------------
revno: 2943 [merge]
author: Brandon Schaefer <email address hidden>, Alan Griffiths <email address hidden>
committer: Tarmac
branch nick: development-branch
timestamp: Thu 2015-09-17 23:46:51 +0000
message:
  server: Added a CookieFactory which generates macs for keyboard/motions events.

  library: CookieFactory creates macs based on timestamp info.

  Approved by Brandon Schaefer, Andreas Pokorny, Alexandros Frantzis, Kevin DuBois, PS Jenkins bot, Alan Griffiths, Chris Halse Rogers.
------------------------------------------------------------

So that means the bug has been around since Mir 0.17 at least.

Changed in mir:
milestone: none → 0.19.0
summary: - Mir blocks at system boot due to lack of entropy
+ [regression] Mir blocks at system boot due to lack of entropy
tags: added: regression
summary: - [regression] Mir blocks at system boot due to lack of entropy
+ [regression] Mir blocks at system boot due to reading from /dev/random
Changed in mir:
milestone: 0.19.0 → 0.20.0
milestone: 0.20.0 → 0.19.0
Changed in unity-system-compositor:
status: New → In Progress
Changed in mir:
status: In Progress → Confirmed
importance: High → Low
Changed in unity-system-compositor:
importance: Undecided → High
Changed in mir:
importance: Low → Medium
Changed in unity-system-compositor:
assignee: nobody → Brandon Schaefer (brandontschaefer)
Changed in unity-system-compositor:
milestone: none → 0.3.1
Changed in unity-system-compositor:
milestone: 0.3.1 → 0.4.0

Fix committed into lp:unity-system-compositor at revision 270, scheduled for release in unity-system-compositor, milestone 0.4.0

Changed in unity-system-compositor:
status: In Progress → Fix Committed
Changed in unity-system-compositor:
status: Fix Committed → In Progress
milestone: 0.4.0 → 0.4.1
Changed in mir:
milestone: 0.19.0 → 0.20.0
Changed in mir:
importance: Medium → High
Daniel van Vugt (vanvugt) wrote :

See similar related bug 1541188.

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in mir (Ubuntu):
status: New → Confirmed
Changed in unity-system-compositor:
status: In Progress → Fix Committed
summary: - [regression] Mir blocks at system boot due to reading from /dev/random
+ [regression] Mir hangs and then crashes at system boot due to reading
+ from /dev/random
Changed in mir:
importance: High → Critical
Changed in unity-system-compositor:
importance: High → Critical
description: updated
description: updated
summary: - [regression] Mir hangs and then crashes at system boot due to reading
- from /dev/random
+ [regression] Mir hangs and then crashes due to reading from /dev/random
Changed in unity-system-compositor:
status: Fix Committed → In Progress
Changed in mir:
status: Confirmed → In Progress

qtmir server plugin will time out waiting for mir thread to start after 10 seconds; should we increase this to match?

Daniel van Vugt (vanvugt) wrote :

I would say don't change anything right now.

10 seconds is better, and feels less like a system-wide freeze than 30 seconds does. However if we reduce the Mir timeout to 10 seconds right now we'll just get an increased volume of crash reports.

So... don't change anything. Wait until we fix this without needing such delays.

Changed in unity-system-compositor:
milestone: 0.4.1 → 0.4.2
summary: - [regression] Mir hangs and then crashes due to reading from /dev/random
+ [regression] Mir hangs and then crashes on login due to reading from
+ /dev/random
summary: - [regression] Mir hangs and then crashes on login due to reading from
- /dev/random
+ [regression] Black screen: Mir hangs and then crashes on login due to
+ reading from /dev/random
Changed in unity-system-compositor:
status: In Progress → Fix Committed
Changed in mir:
status: In Progress → Triaged
Changed in mir:
milestone: 0.20.0 → 0.21.0

Dropped importance. Not everyone feels this is a release blocker.

Changed in mir:
importance: Critical → High
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package unity-system-compositor - 0.4.2+16.04.20160211.2-0ubuntu1

---------------
unity-system-compositor (0.4.2+16.04.20160211.2-0ubuntu1) xenial; urgency=medium

  [ CI Train Bot ]
  * No-change rebuild.

unity-system-compositor (0.4.2+16.04.20160211-0ubuntu1) xenial; urgency=medium

  * Orient the spinner according to the native orientation of the device.
    (LP: #1543495)
  * Implement a stub cookie authority (LP: #1536662)

 -- Alexandros Frantzis <email address hidden> Thu, 11 Feb 2016 12:22:48 +0000

Changed in unity-system-compositor (Ubuntu):
status: New → Fix Released
Changed in mir:
milestone: 0.21.0 → none
summary: - [regression] Black screen: Mir hangs and then crashes on login due to
- reading from /dev/random
+ [regression] Black screen: Mir hangs and then crashes on startup/login
+ due to reading from /dev/random
Changed in mir (Ubuntu):
importance: Undecided → High
status: Confirmed → Triaged
Changed in mir:
assignee: Brandon Schaefer (brandontschaefer) → Daniel van Vugt (vanvugt)
milestone: none → 0.21.0
status: Triaged → In Progress
Mir CI Bot (mir-ci-bot) wrote :

Fix committed into lp:mir at revision None, scheduled for release in mir, milestone 0.21.0

Changed in mir:
status: In Progress → Fix Committed
Changed in mir:
status: Fix Committed → In Progress
Changed in mir:
importance: High → Critical
Changed in mir (Ubuntu):
importance: High → Critical
Mir CI Bot (mir-ci-bot) on 2016-03-15
Changed in mir:
status: In Progress → Fix Committed
Changed in mir:
status: Fix Committed → In Progress
Changed in mir:
milestone: 0.21.0 → 0.22.0
Mir CI Bot (mir-ci-bot) wrote :

Fix committed into lp:mir at revision None, scheduled for release in mir, milestone 0.22.0

Changed in mir:
status: In Progress → Fix Committed
tags: added: black-screen
Changed in mir:
status: Fix Committed → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mir - 0.22.1+16.04.20160516.2-0ubuntu2

---------------
mir (0.22.1+16.04.20160516.2-0ubuntu2) yakkety; urgency=medium

  [ Dimitri John Ledkov ]
  * Fix FTBFS error: call of overloaded ‘abs(float)’ is ambiguous, by
    including cmath c++ header.

 -- Łukasz 'sil2100' Zemczak <email address hidden> Thu, 19 May 2016 21:58:43 +0200

Changed in mir (Ubuntu):
status: Triaged → Fix Released
Stephen M. Webb (bregma) on 2017-03-28
Changed in unity-system-compositor:
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