plymouthd crashed with SIGSEGV in /sbin/plymouthd:11 in ply_renderer_set_handler_for_input_source -> ply_keyboard_stop_watching_for_renderer_input -> ply_keyboard_stop_watching_for_input -> ply_device_manager_deactivate_keyboards -> on_deactivate

Bug #1794292 reported by Steve Taylor
136
This bug affects 30 people
Affects Status Importance Assigned to Milestone
plymouth (Ubuntu)
Fix Released
High
Mathieu Trudel-Lapierre
Bionic
Fix Released
Medium
Unassigned
Cosmic
Fix Released
High
Brian Murray

Bug Description

[Impact]
plymouth has been crashing a whole bunch and notifying users about it.

[Test Case]
We don't have a specific test case but luckily :-( there are thousands of crashes in the Error Tracker about this issue. Subsequently, it should be enough to verify that the new version of plymouth doesn't appear in the following bucket:

https://errors.ubuntu.com/problem/6aa06f1bc51946c787a01d38e58bc76114555334

[Regression Potential]
The fix has to do with keyboard handling so a possible regression would be the inability to unlock your disks.

Original Description
--------------------
A green Xubuntu splash screen with a spinning circle normally appears on boot up.

Now just a blank black screen shows until the login box appears. On logging in, the desktop appears as normal but an error message pops up offering to report a bug to developers.

Description: Ubuntu Cosmic Cuttlefish (development branch)
Release: 18.10

All packages up-to-date as of 25 September 2018 14:00 BST

Errors Tracker: https://errors.ubuntu.com/problem/6aa06f1bc51946c787a01d38e58bc76114555334

ProblemType: CrashDistroRelease: Ubuntu 18.10
Package: plymouth 0.9.3-1ubuntu8
ProcVersionSignature: Ubuntu 4.18.0-7.8-generic 4.18.5
Uname: Linux 4.18.0-7-generic x86_64
ApportVersion: 2.20.10-0ubuntu11
Architecture: amd64
CrashCounter: 1
Date: Tue Sep 25 13:47:47 2018
DefaultPlymouth: /usr/share/plymouth/themes/xubuntu-logo/xubuntu-logo.plymouth
ExecutablePath: /sbin/plymouthd
MachineType: Acer Veriton N280G
ProcCmdLine: BOOT_IMAGE=/boot/vmlinuz-4.18.0-7-generic root=UUID=ff708f10-3fbc-4fa2-b7a5-93f0dd61eb21 ro splash quiet vt.handoff=1
ProcCmdline: @sbin/plymouthd --mode=boot --pid-file=/run/plymouth/pid --attach-to-session
ProcEnviron:
 LANG=en_GB.UTF-8
 PATH=(custom, no user)
ProcFB: 0 inteldrmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-4.18.0-7-generic root=UUID=ff708f10-3fbc-4fa2-b7a5-93f0dd61eb21 ro splash quiet vt.handoff=1
SegvAnalysis:
 Segfault happened at: 0x7f05452a07f9 <ply_renderer_set_handler_for_input_source+25>: mov 0x78(%rax),%rax
 PC (0x7f05452a07f9) ok
 source "0x78(%rax)" (0x00000078) not located in a known VMA region (needed readable region)!
 destination "%rax" ok
SegvReason: reading NULL VMA
Signal: 11SourcePackage: plymouth
StacktraceTop:
 ply_renderer_set_handler_for_input_source () from /lib/x86_64-linux-gnu/libply-splash-core.so.4
 ply_keyboard_stop_watching_for_input () from /lib/x86_64-linux-gnu/libply-splash-core.so.4
 ply_device_manager_deactivate_keyboards () from /lib/x86_64-linux-gnu/libply-splash-core.so.4
 ?? ()
 ?? ()
TextPlymouth: /usr/share/plymouth/themes/xubuntu-text/xubuntu-text.plymouth
Title: plymouthd crashed with SIGSEGV in ply_renderer_set_handler_for_input_source()
UpgradeStatus: Upgraded to cosmic on 2018-08-21 (34 days ago)
UserGroups:

dmi.bios.date: 01/15/2011
dmi.bios.vendor: Acer
dmi.bios.version: P01-A3
dmi.board.asset.tag: To Be Filled By O.E.M.
dmi.board.name: TPDS03
dmi.board.vendor: Acer
dmi.board.version: To be filled by O.E.M.
dmi.chassis.type: 3
dmi.chassis.vendor: Acer
dmi.chassis.version: To Be Filled By O.E.M.
dmi.modalias: dmi:bvnAcer:bvrP01-A3:bd01/15/2011:svnAcer:pnVeritonN280G:pvrToBeFilledByO.E.M.:rvnAcer:rnTPDS03:rvrTobefilledbyO.E.M.:cvnAcer:ct3:cvrToBeFilledByO.E.M.:
dmi.product.family: Acer Desktop
dmi.product.name: Veriton N280G
dmi.product.sku: To Be Filled By O.E.M.
dmi.product.version: To Be Filled By O.E.M.
dmi.sys.vendor: Acer

Revision history for this message
Steve Taylor (supergrid) wrote :
Revision history for this message
Apport retracing service (apport) wrote :

StacktraceTop:
 ply_renderer_set_handler_for_input_source (renderer=<optimized out>, input_source=0x5599642cc930, handler=0x0, user_data=0x0) at ply-renderer.c:406
 ply_keyboard_stop_watching_for_renderer_input (keyboard=0x5599642d5590) at ply-keyboard.c:406
 ply_keyboard_stop_watching_for_input (keyboard=keyboard@entry=0x5599642d5590) at ply-keyboard.c:406
 ply_device_manager_deactivate_keyboards (manager=0x5599642c5a10) at ply-device-manager.c:976
 on_quit (state=0x7ffd7332c130, retain_splash=<optimized out>, quit_trigger=0x5599642cb750) at main.c:1435

Revision history for this message
Apport retracing service (apport) wrote : Stacktrace.txt
Revision history for this message
Apport retracing service (apport) wrote : StacktraceSource.txt
Revision history for this message
Apport retracing service (apport) wrote : ThreadStacktrace.txt
Changed in plymouth (Ubuntu):
importance: Undecided → Medium
tags: removed: need-amd64-retrace
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote : Re: plymouthd crashed with SIGSEGV in ply_renderer_set_handler_for_input_source()

Confirmed on Ubuntu Desktop Cosmic 20180925.1

information type: Private → Public
Changed in plymouth (Ubuntu):
importance: Medium → High
status: New → Confirmed
summary: - plymouthd crashed with SIGSEGV in
- ply_renderer_set_handler_for_input_source()
+ plymouthd crashed with SIGSEGV in /sbin/plymouthd:11 in
+ ply_renderer_set_handler_for_input_source ->
+ ply_keyboard_stop_watching_for_renderer_input ->
+ ply_keyboard_stop_watching_for_input ->
+ ply_device_manager_deactivate_keyboards -> on_deactivate
description: updated
Revision history for this message
Ubuntu QA Website (ubuntuqa) wrote :

This bug has been reported on the Ubuntu ISO testing tracker.

A list of all reports related to this bug can be found here:
http://iso.qa.ubuntu.com/qatracker/reports/bugs/1794292

tags: added: iso-testing
Revision history for this message
Martin Wimpress  (flexiondotorg) wrote :

This is fixed in Ubuntu MATE 18.10 via mate-screensaver 1.20.2-1 which we will SRU to 18.04.

Revision history for this message
Martin Wimpress  (flexiondotorg) wrote :

Ugh, ignore the above. Wrong issue. Sorry.

tags: added: id-5bad7286befb7a37e6f5072a
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Is this a crash that people are able to easily reproduce? I can't figure out how to get that crash here, but I have a patch likely to fix the issue (and the patch is necessary anyway).

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :
Download full text (5.1 KiB)

The patch should be fine, in fact I was debugging it and it looks like that the renderers where disactivated before than the renderer keyboards, thus the crash.

This was some gdb debugging, in case it might be useful in future:

(gdb) bt
#0 0x00007ff2a56137f9 in ply_renderer_set_handler_for_input_source (renderer=<optimized out>,
    input_source=0x5625cf38ced0, handler=0x0, user_data=0x0) at ply-renderer.c:406
#1 0x00007ff2a560d5ac in ply_keyboard_stop_watching_for_renderer_input (keyboard=0x5625cf38dad0)
    at ply-keyboard.c:406
#2 ply_keyboard_stop_watching_for_input (keyboard=keyboard@entry=0x5625cf38dad0) at ply-keyboard.c:406
#3 0x00007ff2a560cb3b in ply_device_manager_deactivate_keyboards (manager=0x5625cf37ef70)
    at ply-device-manager.c:976
#4 0x00005625ce989d77 in on_quit (state=0x7fff330f1d40, retain_splash=<optimized out>,
    quit_trigger=0x5625cf4e9200) at main.c:1435
#5 0x00005625ce984dcc in ply_boot_connection_on_request (connection=0x5625cf4ee080)
    at ply-boot-server.c:529
#6 0x00007ff2a5624f26 in ply_event_loop_handle_met_status_for_source (status=<optimized out>,
    source=0x5625cf3fda90, loop=0x5625cf3793a0) at ply-event-loop.c:1034
#7 ply_event_loop_process_pending_events (loop=0x5625cf3793a0) at ply-event-loop.c:1279
#8 0x00007ff2a56253c0 in ply_event_loop_run (loop=0x5625cf3793a0) at ply-event-loop.c:1310
#9 0x00005625ce982565 in main (argc=<optimized out>, argv=0x7fff330f2f38) at main.c:2398
(gdb)
#0 0x00007ff2a56137f9 in ply_renderer_set_handler_for_input_source (renderer=<optimized out>,
    input_source=0x5625cf38ced0, handler=0x0, user_data=0x0) at ply-renderer.c:406
#1 0x00007ff2a560d5ac in ply_keyboard_stop_watching_for_renderer_input (keyboard=0x5625cf38dad0)
    at ply-keyboard.c:406
#2 ply_keyboard_stop_watching_for_input (keyboard=keyboard@entry=0x5625cf38dad0) at ply-keyboard.c:406
#3 0x00007ff2a560cb3b in ply_device_manager_deactivate_keyboards (manager=0x5625cf37ef70)
    at ply-device-manager.c:976
#4 0x00005625ce989d77 in on_quit (state=0x7fff330f1d40, retain_splash=<optimized out>,
    quit_trigger=0x5625cf4e9200) at main.c:1435
#5 0x00005625ce984dcc in ply_boot_connection_on_request (connection=0x5625cf4ee080)
    at ply-boot-server.c:529
#6 0x00007ff2a5624f26 in ply_event_loop_handle_met_status_for_source (status=<optimized out>,
    source=0x5625cf3fda90, loop=0x5625cf3793a0) at ply-event-loop.c:1034
#7 ply_event_loop_process_pending_events (loop=0x5625cf3793a0) at ply-event-loop.c:1279
#8 0x00007ff2a56253c0 in ply_event_loop_run (loop=0x5625cf3793a0) at ply-event-loop.c:1310
#9 0x00005625ce982565 in main (argc=<optimized out>, argv=0x7fff330f2f38) at main.c:2398
(gdb) f 1
#1 0x00007ff2a560d5ac in ply_keyboard_stop_watching_for_renderer_input (keyboard=0x5625cf38dad0)
    at ply-keyboard.c:406
406 ply-keyboard.c: No such file or directory.
(gdb) print keyboard
$4 = (ply_keyboard_t *) 0x5625cf38dad0
(gdb) print *keyboard
$5 = {loop = 0x5625cf3793a0, provider_type = PLY_KEYBOARD_PROVIDER_TYPE_RENDERER, provider = {
    if_renderer = 0x5625cf38fdf0, if_terminal = 0x5625cf38fdf0}, line_buffer = 0x5625cf38ed40,
  keyboard_input_handler_list = 0x5625cf38fd70, backspace_...

Read more...

Revision history for this message
Sebastien Bacher (seb128) wrote :

looks like the patch being refered to has been uploaded in https://launchpad.net/ubuntu/+source/plymouth/0.9.3-1ubuntu9 which is still in cosmic-proposed

Changed in plymouth (Ubuntu Cosmic):
status: Confirmed → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package plymouth - 0.9.3-1ubuntu9

---------------
plymouth (0.9.3-1ubuntu9) cosmic; urgency=medium

  * debian/patches/git_move_renderer_deactivate_778e0fb7.patch: move the
    ply_device_manager_deactivate_renderers() calls into hide_splash(). This
    makes sure it is run in all three of the likely code-paths to deactivating
    plymouth's splash, and ensures objects are in the right state when
    deactivating on close. (LP: #1794292)

 -- Mathieu Trudel-Lapierre <email address hidden> Mon, 01 Oct 2018 11:46:00 -0400

Changed in plymouth (Ubuntu Cosmic):
status: Fix Committed → Fix Released
Revision history for this message
Gert van de Kraats (gkraats) wrote :

Unfortunately the fix does not solve the problem and still crashes.

ProblemType: Crash
Architecture: i386
Date: Thu Oct 4 16:54:33 2018
DistroRelease: Ubuntu 18.10
ExecutablePath: /sbin/plymouthd
ExecutableTimestamp: 1538408760

MachineType: Dell Inc. Latitude D620
Package: plymouth 0.9.3-1ubuntu9
PackageArchitecture: i386

SegvAnalysis:
 Segfault happened at: 0xb7f279f9 <ply_renderer_set_handler_for_input_source+41>: mov 0x3c(%edx),%eax
 PC (0xb7f279f9) ok
 source "0x3c(%edx)" (0x0000003d) not located in a known VMA region (needed readable region)!
 destination "%eax" ok
SegvReason: reading NULL VMA
SourcePackage: plymouth
Stacktrace:
 #0 0xb7f279f9 in ply_renderer_set_handler_for_input_source () at /lib/i386-linux-gnu/libply-splash-core.so.4
 #1 0xb7f209a9 in ply_keyboard_stop_watching_for_input () at /lib/i386-linux-gnu/libply-splash-core.so.4
 #2 0xb7f1fe70 in ply_device_manager_deactivate_keyboards () at /lib/i386-linux-gnu/libply-splash-core.so.4
 #3 0x00428c02 in ()
 #4 0x00421cf3 in _start ()
StacktraceAddressSignature: /sbin/plymouthd:11:/lib/i386-linux-gnu/libply-splash-core.so.4.0.0+a9f9:/lib/i386-linux-gnu/libply-splash-core.so.4.0.0+39a9:/lib/i386-linux-gnu/libply-splash-core.so.4.0.0+2e70:/sbin/plymouthd+ac02:/sbin/plymouthd+3cf3
StacktraceTop:
 ply_renderer_set_handler_for_input_source () at /lib/i386-linux-gnu/libply-splash-core.so.4
 ply_keyboard_stop_watching_for_input () at /lib/i386-linux-gnu/libply-splash-core.so.4
 ply_device_manager_deactivate_keyboards () at /lib/i386-linux-gnu/libply-splash-core.so.4
 ()
 _start ()
Tags: cosmic
TextPlymouth: /usr/share/plymouth/themes/ubuntu-text/ubuntu-text.plymouth
ThreadStacktrace:
 .
 Thread 1 (Thread 0xb7bdaf00 (LWP 334)):
 #0 0xb7f279f9 in ply_renderer_set_handler_for_input_source () at /lib/i386-linux-gnu/libply-splash-core.so.4
 #1 0xb7f209a9 in ply_keyboard_stop_watching_for_input () at /lib/i386-linux-gnu/libply-splash-core.so.4
 #2 0xb7f1fe70 in ply_device_manager_deactivate_keyboards () at /lib/i386-linux-gnu/libply-splash-core.so.4
 #3 0x00428c02 in ()
 #4 0x00421cf3 in _start ()
Title: plymouthd crashed with SIGSEGV in ply_renderer_set_handler_for_input_source()

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Yeah, I feared that might be the case. This is the problem when the bug isn't so easy to reproduce.

There's a couple of things I want to try; let's proceed now with a package in a PPA before we randomly upload stuff to the archive -- there's definitely some cleanup code that could be added to plymouth, but that doesn't mean it's actually going to fix the problem.

Revision history for this message
Gert van de Kraats (gkraats) wrote :

At my laptop it happens at (almost) every start.
FYI I attach a symbolic trace

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

Reopening per comment #14

Changed in plymouth (Ubuntu Cosmic):
status: Fix Released → Triaged
status: Triaged → Confirmed
Changed in plymouth (Ubuntu Cosmic):
assignee: nobody → Mathieu Trudel-Lapierre (cyphermox)
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

I uploaded a test package to my ppa:

sudo add-apt-repository ppa:cyphermox/ppa

@Gert, would you mind giving it a try, see if this works for you, assuming that you can reproduce this bug easily?

Revision history for this message
Gert van de Kraats (gkraats) wrote :
Download full text (5.1 KiB)

Unfortunately again it crashes, logging on with gdm3, both with and without wayland.

The crash seems to be at the same place.
Syslog:
Oct 16 16:04:13 Gert2 systemd[1]: plymouth-start.service: Main process exited, code=dumped, status=11/SEGV
Oct 16 16:04:13 Gert2 gdm3[710]: error: unexpectedly disconnected from boot status daemon
Oct 16 16:04:13 Gert2 systemd[1]: plymouth-start.service: Failed with result 'core-dump'.
Oct 16 16:04:14 Gert2 systemd[1]: Started Hold until boot process finishes up.
Oct 16 16:04:14 Gert2 systemd[1]: Starting Set console scheme...
Oct 16 16:04:14 Gert2 systemd-networkd[392]: wlan0: Gained IPv6LL
Oct 16 16:04:14 Gert2 systemd-timesyncd[393]: Network configuration changed, trying to establish connection.
Oct 16 16:04:14 Gert2 dhclient[795]: DHCPACK of 192.168.178.20 from 192.168.178.1
Oct 16 16:04:14 Gert2 NetworkManager[529]: <info> [1539698654.3397] dhcp4 (wlan0): address 192.168.178.20
Oct 16 16:04:14 Gert2 NetworkManager[529]: <info> [1539698654.3398] dhcp4 (wlan0): plen 24 (255.255.255.0)
Oct 16 16:04:14 Gert2 avahi-daemon[525]: Joining mDNS multicast group on interface wlan0.IPv4 with address 192.168.178.20.
Oct 16 16:04:14 Gert2 NetworkManager[529]: <info> [1539698654.3398] dhcp4 (wlan0): gateway 192.168.178.1
Oct 16 16:04:14 Gert2 NetworkManager[529]: <info> [1539698654.3398] dhcp4 (wlan0): lease time 3600
Oct 16 16:04:14 Gert2 NetworkManager[529]: <info> [1539698654.3399] dhcp4 (wlan0): nameserver '89.101.251.228'
Oct 16 16:04:14 Gert2 avahi-daemon[525]: New relevant interface wlan0.IPv4 for mDNS.
Oct 16 16:04:14 Gert2 NetworkManager[529]: <info> [1539698654.3399] dhcp4 (wlan0): nameserver '89.101.251.229'
Oct 16 16:04:14 Gert2 avahi-daemon[525]: Registering new address record for 192.168.178.20 on wlan0.IPv4.
Oct 16 16:04:14 Gert2 NetworkManager[529]: <info> [1539698654.3399] dhcp4 (wlan0): domain name 'dynamic.ziggo.nl'
Oct 16 16:04:14 Gert2 NetworkManager[529]: <info> [1539698654.3400] dhcp4 (wlan0): state changed unknown -> bound
Oct 16 16:04:14 Gert2 systemd-timesyncd[393]: Network configuration changed, trying to establish connection.
Oct 16 16:04:14 Gert2 NetworkManager[529]: <info> [1539698654.3537] device (wlan0): state change: ip-config -> ip-check (reason 'none', sys-iface-state: 'managed')
Oct 16 16:04:14 Gert2 NetworkManager[529]: <info> [1539698654.3640] device (wlan0): state change: ip-check -> secondaries (reason 'none', sys-iface-state: 'managed')
Oct 16 16:04:14 Gert2 NetworkManager[529]: <info> [1539698654.3663] device (wlan0): state change: secondaries -> activated (reason 'none', sys-iface-state: 'managed')
Oct 16 16:04:14 Gert2 NetworkManager[529]: <info> [1539698654.3690] manager: NetworkManager state is now CONNECTED_LOCAL
Oct 16 16:04:14 Gert2 systemd[1]: Started Set console scheme.

Syslog, if plymouth not crashes:
Oct 16 15:54:10 Gert2 systemd[1]: Received SIGRTMIN+21 from PID 353 (plymouthd).
Oct 16 15:54:10 Gert2 systemd[1]: Started Hold until boot process finishes up.
Oct 16 15:54:10 Gert2 systemd[1]: Starting Set console scheme...
Oct 16 15:54:10 Gert2 systemd[1]: Started Set console scheme.

ProblemType: Crash
Architecture: i386
Date: Tue Oct 16 16...

Read more...

Revision history for this message
Gert van de Kraats (gkraats) wrote :

Proposing next improved code

At src/libply-splash-core/ply-device-manager.c

1) at
create_devices_for_subsystem (ply_device_manager_t *manager,
                              const char *subsystem)
change
    found_device = create_devices_for_udev_device (manager, device);
into
    found_device = found_device || create_devices_for_udev_device (manager, device);

2) at
create_devices_for_terminal_and_renderer_type (ply_device_manager_t *manager,
                                               const char *device_path,
                                               ply_terminal_t *terminal,
                                               ply_renderer_type_t renderer_type)
change
   return;
into
   return false;

Notes at 1);
As can be seen at the downloaded grub-trace, the graphical splash with keyboard is activated on 2 screens,
before the device-timeout (which is set to 10.0).
After the device-timeout routine create_devices_from_udev will call create_devices_for_subsystem (manager, SUBSYSTEM_DRM).
This routine should return true if any drm-device is found. Because of the wrong code it returns only true
if the last device is coorect.
As can be seen at the downloaded grub-trace the last device /dev/dri/renderD128 is not usable.
This causes at the trace-message: create_devices_from_udev:Creating non-graphical devices, since there's no suitable graphics hardware.
This causes the second unwanted call to create_devices_for_terminal_and_renderer_type for non-graphical /dev/tty1, also listening to keyboard.

Notes at 2)
This is the solution for a compiler warning. It is just wrong coding, do not know if it will ever harm.

Remark:
For some reason at my PC the drm-devices are comimg up very slow at 18.10 (22 sec) compared to 18.04 (3 sec).
To avoid the ugly text splash I had to enlarge DeviceTimeout from default 5 to 10. This does not slow down startuptime.
cat /etc/plymouth/plymouthd.conf
# Administrator customizations go in this file
[Daemon]
Theme=solar
ShowDelay=0
DeviceTimeout=10

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

@Gert,

I've made some changes to your suggestion (we don't want to circumvent creating more DRM devices than the first successful one, I think) and it looks like the "right value" according to upstream for the compiler warning is to return false.

Please try the new package on my ppa (ppa:cyphermox/ppa).

I'm unable to reproduce these crashes, so we do need to rely on you to test this...

Revision history for this message
Gert van de Kraats (gkraats) wrote :

Problem not solved.

I think I got 4 problems:

1)
I think the second ppa (*mtrudel2*) has exacly same contents as the first one.
At least the binaries and shared loadlibraries have the same time stamp (15 october).
So this will not contain the last version.

2)
I have the idea the shared loadlibs are not overwritten at the install.

3)
The file /etc/plymouth/plymouthd.cfg, containing local settings was overwritten.
I do not know if this is caused by "apt-get install" or by "make install" on localcode.
According to contents of this file, this should not occur.

4)
My proposed fix solves a bug, but probably not the problem.
To verify updating of the loadlibs I did "make install" with my own local code including an extra tracing message.
This crashed again with the usual stacktrace.
I include the plymouth trace plymouth-debug_GK91.log.
After the 5 seconds device timeout (caused by the missing setting to 10 seconds at /etc/plymouth/plymouthd.cfg)
the frame buffer device /dev/fb0 is activated, because drm still not initialized.
Also keyboard is activated for fb0.
Later on the is en event: got remove event for device fb0,
causing "ply_renderer_free:Unloading renderer backend plugin".
At the end the keyboards are deactivated including the one for fb0,
which is pointing to a non-existing backend.
So I think also the keyboard should be removed (if present)
if a device is removed.
This should avoid the crash. but I doubt the splash will be displayed correctly.
At my slow PC the problem is always reproducable by setting the timeout to 1.

Revision history for this message
Dmitry Melnyk (d264) wrote :

I have the same issue on my newly installed Ubuntu Cosmic(18.10) (laptop ASUS K55VM)

plymouthd crashed with SIGSEGV in ply_renderer_set_handler_for_input_source()

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Actually, according to the backtraces the issue isn't with renderer->backend; we're not even reaching that point. It's still a potential issue though.

Same ppa as before: ppa:cyphermox/ppa

I have uploaded a new plymouth there, which should mitigate the crash exactly as reported in the description and in the crashfile from Dmitry:

https://launchpad.net/~cyphermox/+archive/ubuntu/ppa/+sourcepub/9559392/+listing-archive-extra

Please try this package, let me know whether that still crashes (and please include debug logs for plymouth, that helps a lot with the crash file).

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

For context:

It looks like the issue is really with the call to "set_handler_for_input_source()" on a plugin. renderer->plugin_interface is null, so dereferencing that fails:

https://paste.ubuntu.com/p/tmcVcvgGXw/

All in all, much easier to comprehend when I think of looking at the disassembly, or even at SegvAnalysis which has been in the bug for a while... and easier when you understand the ABI better.

Revision history for this message
Brian Murray (brian-murray) wrote :

The latest version of plymouth in your PPA resolves the issue for me.

bdmurray@lantern:~$ ls /var/crash/
bdmurray@lantern:~$ apt-cache policy plymouth
plymouth:
  Installed: 0.9.3-1ubuntu11~mtrudel4
  Candidate: 0.9.3-1ubuntu11~mtrudel4
  Version table:
 *** 0.9.3-1ubuntu11~mtrudel4 500
        500 http://ppa.launchpad.net/cyphermox/ppa/ubuntu cosmic/main amd64 Packages
        100 /var/lib/dpkg/status
     0.9.3-1ubuntu10 500
        500 http://192.168.10.7/ubuntu cosmic/main amd64 Packages
bdmurray@lantern:~$ uptime
 13:10:12 up 4 min, 2 users, load average: 1.85, 1.75, 0.80

Revision history for this message
Gert van de Kraats (gkraats) wrote :

I think, I still get old stuff from 15-10

gert@Gert2:/var/cache/apt/archives$ dpkg -c libplymouth4_0.9.3-1ubuntu11~mtrudel4_i386.deb
drwxr-xr-x root/root 0 2018-10-15 16:36 ./
drwxr-xr-x root/root 0 2018-10-15 16:36 ./lib/
drwxr-xr-x root/root 0 2018-10-15 16:36 ./lib/i386-linux-gnu/
-rw-r--r-- root/root 26056 2018-10-15 16:36 ./lib/i386-linux-gnu/libply-boot-client.so.4.0.0
-rw-r--r-- root/root 112424 2018-10-15 16:36 ./lib/i386-linux-gnu/libply-splash-core.so.4.0.0
-rw-r--r-- root/root 46684 2018-10-15 16:36 ./lib/i386-linux-gnu/libply-splash-graphics.so.4.0.0
-rw-r--r-- root/root 108160 2018-10-15 16:36 ./lib/i386-linux-gnu/libply.so.4.0.0
drwxr-xr-x root/root 0 2018-10-15 16:36 ./usr/
drwxr-xr-x root/root 0 2018-10-15 16:36 ./usr/share/
drwxr-xr-x root/root 0 2018-10-15 16:36 ./usr/share/doc/
drwxr-xr-x root/root 0 2018-10-15 16:36 ./usr/share/doc/libplymouth4/
-rw-r--r-- root/root 13853 2018-10-15 16:36 ./usr/share/doc/libplymouth4/changelog.Debian.gz
-rw-r--r-- root/root 2523 2018-01-17 14:37 ./usr/share/doc/libplymouth4/copyright
drwxr-xr-x root/root 0 2018-10-15 16:36 ./usr/share/lintian/
drwxr-xr-x root/root 0 2018-10-15 16:36 ./usr/share/lintian/overrides/
-rw-r--r-- root/root 48 2018-01-17 14:37 ./usr/share/lintian/overrides/libplymouth4
lrwxrwxrwx root/root 0 2018-10-15 16:36 ./lib/i386-linux-gnu/libply-boot-client.so.4 -> libply-boot-client.so.4.0.0
lrwxrwxrwx root/root 0 2018-10-15 16:36 ./lib/i386-linux-gnu/libply-splash-core.so.4 -> libply-splash-core.so.4.0.0
lrwxrwxrwx root/root 0 2018-10-15 16:36 ./lib/i386-linux-gnu/libply-splash-graphics.so.4 -> libply-splash-graphics.so.4.0.0
lrwxrwxrwx root/root 0 2018-10-15 16:36 ./lib/i386-linux-gnu/libply.so.4 -> libply.so.4.0.0
gert@Gert2:/var/cache/apt/archives$ apt-cache policy plymouth
plymouth:
  Installed: 0.9.3-1ubuntu11~mtrudel4
  Candidate: 0.9.3-1ubuntu11~mtrudel4
  Version table:
 *** 0.9.3-1ubuntu11~mtrudel4 500
        500 http://ppa.launchpad.net/cyphermox/ppa/ubuntu cosmic/main i386 Packages
        100 /var/lib/dpkg/status
     0.9.3-1ubuntu10 500
        500 http://nl.archive.ubuntu.com/ubuntu cosmic/main i386 Packages

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

But does it fix the crash for you? You shouldn't worry about the dates on the files, those are in part caused by the changelog entry when building the package.

Revision history for this message
Dmitry Melnyk (d264) wrote :

The latest version of plymouth in your PPA DOESN'T resolves the issue for me.
After upgrading plymouth from ppa:cyphermox/ppa nothing changed

plymouth:
  Installed: 0.9.3-1ubuntu11~mtrudel4
  Candidate: 0.9.3-1ubuntu11~mtrudel4
  Version table:
 *** 0.9.3-1ubuntu11~mtrudel4 500
        500 http://ppa.launchpad.net/cyphermox/ppa/ubuntu cosmic/main amd64 Packages
        100 /var/lib/dpkg/status
     0.9.3-1ubuntu10 500
        500 http://us.archive.ubuntu.com/ubuntu cosmic/main amd64 Packages

Revision history for this message
Gert van de Kraats (gkraats) wrote :

Same problem as described before.
To force I use timeout 1 and theme fade-in. But same problem also occurred at my PC with the default timeout 5, as was on the trace.
I will upload the crashdump (which by default was ignored by apport).
Routine ply_renderer_free does a hard free of renderer. So renderer cannot be referenced later at deactivation of keyboard, because the memory might be overwritten.
I wrote a routine which shlould be called before ply_renderer_free:
void
ply_device_manager_deactivate_keyboard (ply_device_manager_t *manager,
                            ply_renderer_t *renderer)
{
        ply_list_node_t *node;

        node = ply_list_get_first_node (manager->keyboards);
        while (node != NULL) {
                ply_keyboard_t *keyboard;
                ply_list_node_t *next_node;

                keyboard = ply_list_node_get_data (node);
                next_node = ply_list_get_next_node (manager->keyboards, node);
                if (ply_keyboard_get_renderer (keyboard) == renderer) {
                        ply_trace ("deactivating keyboard");
                        ply_keyboard_stop_watching_for_input (keyboard);
                        ply_list_remove_node (manager->keyboards, node);
                        break;
                }
                node = next_node;
        }

}

At ply-keyboard.c:
c
ply_renderer_t *
ply_keyboard_get_renderer (ply_keyboard_t *keyboard)
{
        assert (keyboard != NULL);
        return keyboard->provider.if_renderer->renderer;
}

Revision history for this message
Sebastien Bacher (seb128) wrote :

bug #1802993 seems the same issue

Revision history for this message
Sebastien Bacher (seb128) wrote :

I've reported https://gitlab.freedesktop.org/plymouth/plymouth/issues/70 upstream about the new assert (but it looks a similar issue)

Revision history for this message
Sebastien Bacher (seb128) wrote :

@Gert, you seem to understand a bit what's going on/have an idea about the problem, it would be useful if you can comment on the upstream report with your findings

Revision history for this message
Gert van de Kraats (gkraats) wrote :

I do not have access to upstream and also have no idea what to add there.

I have the impression the root cause of the plymouth crash is a configuration problem.
I compared Ubuntu 18.04, upgraded from 16.04, with the fresh install of 18.10.

At 18.10 file /usr/share/initramfs-tools/conf-hooks.d/cryptsetup is missing, which contains at 18.04 :

# and for systems using plymouth instead, use the new option
FRAMEBUFFER=y

File /usr/share/initramfs-tools/hooks/framebuffer only loads kernel-module i915 and firmware for Intel-graphics-card
into initramfs if FRAMEBUFFER=y.

THerefore at 18.10 i915 is not loaded into initramfs.
At 18.04 with i915 loaded, drm is initialized within 3 seconds kernel elapsed time, so before plymouth needs it.
At 18.10 drm takes 20 seconds, so after plymouth needs it.
By default plymouth waits max. 5 sec. for drm and then will use device fb0 with vesa.
Later at initialization of drm this device fb0 with vesa will give a remove event.
Plymouth does not handle this situation properly, because it refers memory of a renderer, which is already freed.

I see no reason why this module i915 no longer is loaded at initramfs.
Startup time is almost the same. The splash-screen can be shown earlier if present in initramfs.
I think it simply is a bug in ubuntu or upstream.

Revision history for this message
Gert van de Kraats (gkraats) wrote :

The patch I described before solves the problem, but for some reason plymouth does not attach the second renderer to the keyboard. Therefore switching to text-mode by pressing escape-key does not work.
To make this work variable manager->local_console_managed must be set to false.
This causes text-displays to be initialized twice for a terminal.
So also code is added to avoid this.
The complete patch including 2 smaller corrections described before is available at attached patchGK.txt.

Note: default theme spinner is ugly and only a small time (partially) visible.
Theme ubuntu-logo is very slow and causes regularly gdm-aborts, because drmMaster is not disabled soon enough by plymouth.

Theme fade-in is a better default.

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

I can't get behind sponsoring that patch as-is. It seems to me like this is patching around symptoms of an underlying issue rather than fixing the real problem. I haven't been able to open your apport crash file yet due to it being for i386, and I'm not set up to test that.

Let's start by making sure what exactly is the crash you're seeing, and have your suggested patch to deactivate keyboards reviewed by the upstream developers. In the meantime I've uploaded the patches to the things that were most obviously wrong, to disco.

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

I spent a couple of hours looking at the disassembly for your crash file, and I think one of the patches I applied, moving keyboard->is_active = false earlier when removing input watches, should improve the situation a lot. Otherwise, my next question mark is relevant to the code optimization. Might be worth trying a rebuild of plymouth with -O0 to see if it helps any.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package plymouth - 0.9.3-1ubuntu11

---------------
plymouth (0.9.3-1ubuntu11) disco; urgency=medium

  * Workaround a plugin being already deactivated when we try to remove input
    watchers for keyboards in DRM mode. Also guard against races at removing
    input watches and new device detection at startup. (LP: #1794292)
    - debian/patches/fix_unrefd_plugin_interface.patch
    - debian/patches/remember_found_devices.patch
    - debian/patches/keyboard_deactivation.patch

 -- Mathieu Trudel-Lapierre <email address hidden> Mon, 19 Nov 2018 12:16:23 -0500

Changed in plymouth (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

OK; upstream got to an idea similar to your patch. I'm away from my usual desk right now and apparently missing some credentials to log back in to gitlab, but I will update current PRs on gitlab to propose a fix similar to your patch: iterating through keyboards to remove them when freeing renderer/plugin.

Postponing SRUing what I uploaded to disco until we have patched blessed by upstream.

There are additional fixes to themes in the upstream git tree, I'll do a quick check at the same time if there are things we can safely cherry-pick.

Revision history for this message
Sebastien Bacher (seb128) wrote :

@Gert, so upstream confirmed the issue and your comments make sense.

Now looking a bit around, we should still have FRAMEBUFFER=y in the configuration, but that file moved to cryptsetup-initramfs ... do you have that deb installed?

Revision history for this message
Gert van de Kraats (gkraats) wrote :

No.
I have cryptsetup and crypsetup-bin, not cryptsetup-initramfs.

For checking a fix for gnome-wayland I did a fresh install of 32-bits 18.10 from a "mini" (because no image available for 32-bits).
Apparently this does not automatically install cryptsetup-initramfs.
It is rather strange, correct working of plymouth is dependent of this package.

Revision history for this message
Gert van de Kraats (gkraats) wrote :

Sorry, previous information wrong.
At upgraded 18.04 I have cryptsetup and crypsetup-bin, not cryptsetup-initramfs.
At fresh 18.10 I have no package from cryptsetup.

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Gert, could you provide us with an email address so we can correctly attribute the changes to you, given that you contributed the major part of the patches that will go in plymouth?

Revision history for this message
Gert van de Kraats (gkraats) wrote : Re: [Bug 1794292] Re: plymouthd crashed with SIGSEGV in /sbin/plymouthd:11 in ply_renderer_set_handler_for_input_source -> ply_keyboard_stop_watching_for_renderer_input -> ply_keyboard_stop_watching_for_input -> ply_device_manager_deactivate_keyboards -> on_deactivate

Hello Mathieu,

I hope you can see the sender mail-address.

Thanks for your cooperation.

It is nice to be able to contribute a little bit to Ubuntu/Linux.

Gert

On 12/4/18 8:43 PM, Mathieu Trudel-Lapierre wrote:
> Gert, could you provide us with an email address so we can correctly
> attribute the changes to you, given that you contributed the major part
> of the patches that will go in plymouth?
>

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Sorry, we don't see it there. The emails are re-jiggled by Launchpad.

If you prefer, you can send it to me directly (cyphermox AT ubuntu.com), or decline to provide one (since it would show up in the commit logs for plymouth)

Revision history for this message
Gert van de Kraats (gkraats) wrote :

Mathieu,

I have to decline. I do not think the Ubuntu-world is waiting for my
newbie Mail-address.

Gert

On 12/6/18 5:25 PM, Mathieu Trudel-Lapierre wrote:
> Sorry, we don't see it there. The emails are re-jiggled by Launchpad.
>
> If you prefer, you can send it to me directly (cyphermox AT ubuntu.com),
> or decline to provide one (since it would show up in the commit logs for
> plymouth)
>

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :
Changed in plymouth (Ubuntu Cosmic):
status: Confirmed → Fix Released
Changed in plymouth (Ubuntu Cosmic):
status: Fix Released → In Progress
Changed in plymouth (Ubuntu Cosmic):
assignee: Mathieu Trudel-Lapierre (cyphermox) → Brian Murray (brian-murray)
Changed in plymouth (Ubuntu Bionic):
status: New → Triaged
importance: Undecided → Medium
description: updated
Revision history for this message
Timo Aaltonen (tjaalton) wrote : Please test proposed package

Hello Steve, or anyone else affected,

Accepted plymouth into cosmic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/plymouth/0.9.3-1ubuntu10.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-cosmic to verification-done-cosmic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-cosmic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in plymouth (Ubuntu Cosmic):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-cosmic
Revision history for this message
Kevin Torkelson Sjo (ktorkelson) wrote :

Hello!

I've been having these crashes on two laptops nearly every reboot. I installed plymouth 0.9.3-1ubuntu10.1 from the -proposed repository on a fairly recently installed version 18.10 (cosmic) which contains no other proposed updates. So far, after rebooting many times, I'm happy to report that I am not seeing the error.

Thanks to everyone who has been looking into this.

Kevin

tags: added: verification-done-cosmic
removed: verification-needed-cosmic
Revision history for this message
Gert van de Kraats (gkraats) wrote :

Installed packages plymouth and libplymouth4 from cosmic-proposed.
e.g: Get:1 http://archive.ubuntu.com/ubuntu cosmic-proposed/main i386 plymouth i386 0.9.3-1ubuntu10.1
To test the fix I verified plymouth and drm-modules are not present at initramfs.
This causes intel drm to be initiated after startup of plymouth and previously caused the problem.
Verified at plymouth:debug log, that fb driver first was loaded and later replaced by drm-driver.
Problem was solved now!

Remark: the default delivered initramfs hook /usr/share/initramfs-tools/hooks/plymouth still contains the line:
OPTION=FRAMEBUFFER
At my PC the variable FRAMEBUFFER is not set by any file at /usr/share/initramfs-tools/conf-hooks.d, causing plymouth and drm-files not loaded at initramfs. This gives an annoying late appearing of the plymouth-screen at startup.

Revision history for this message
Steve Taylor (supergrid) wrote :

I've installed plymouth 0.9.3-1ubuntu10.1 from the cosmic-proposed repository and I now have the Xubuntu boot splash screen back and no longer experience a crash after logging in.

Thanks to everyone involved in fixing this.

Steve

Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Did anyone test this package on a system with disk encryption enabled? I would like to make sure that users can still unlock their disks on system boot before this goes to -updates, especially that it might be a bit hard for them to actually unbrick their systems afterwards.

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

Hello Steve, or anyone else affected,

Accepted plymouth into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/plymouth/0.9.3-1ubuntu7.18.04.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in plymouth (Ubuntu Bionic):
status: Triaged → Fix Committed
tags: added: verification-needed-bionic
Revision history for this message
Mauricio Faria de Oliveira (mfo) wrote :

Hello,

Could anyone confirm if they experience this problem on Bionic too,
and if they would be able to test the package in bionic-proposed ?

Thanks!

tags: added: verification-done-bionic
removed: verification-needed-bionic
Revision history for this message
Gert van de Kraats (gkraats) wrote :

To reproduce the problem at bionic I had to uninstall the cryptsetup-package and use DeviceTimeout 1 at /etc/plymouth/plymouthd.cfg.
After installing plymouth:i386 0.9.3-1ubuntu7.18.04.2, the problem disappeared.
Problem solved.

Revision history for this message
Mauricio Faria de Oliveira (mfo) wrote :

Hi Gert,

Thank you very much!

In parallel, I've been working on a synthetic test-case
with a virtual machine, and fortunately just found one!

I'll post the details shortly, but I can also confirm
that bionic-proposed resolves the problem.

cheers,
Mauricio

Revision history for this message
Mauricio Faria de Oliveira (mfo) wrote :
Download full text (3.3 KiB)

Test Case
=========

For example, this Bionic Server VM:

 $ uvt-simplestreams-libvirt sync release=bionic arch=amd64
 $ uvt-kvm create --memory 2048 --cpu 2 --disk 8 bionic-lp1794292 release=bionic arch=amd64

 $ uvt-kvm ssh bionic-lp1794292

It has a virtual Cirrus VGA adapter:

 $ lspci | grep VGA
 00:02.0 VGA compatible controller: Cirrus Logic GD 5446

Install its DRM module, which should not load by default:

 $ sudo apt-get -y install linux-modules-extra-$(uname -r)
 $ echo 'blacklist cirrus' | sudo tee /etc/modprobe.d/blacklist-cirrus.conf

Update GRUB to use the default console (remove 'console=' options)

 $ sudo vim /etc/default/grub /etc/default/grub.d/*
 $ sudo update-grub
 $ sudo reboot

 $ cat /proc/cmdline
 BOOT_IMAGE=/boot/vmlinuz-4.15.0-47-generic root=UUID=d7976e5d-71dc-4f7e-82d6-a2c292e0975e ro quiet splash vt.handoff=1

Upon boot, only the FB device is availble, not DRI/DRM:

 $ ls -l /dev/fb0
 crw-rw---- 1 root video 29, 0 Apr 10 22:43 /dev/fb0

 $ ls -l /dev/dri
 ls: cannot access '/dev/dri': No such file or directory

The modules exist but are not loaded:

 $ lspci -s 00:02.0 -k
 00:02.0 VGA compatible controller: Cirrus Logic GD 5446
  Subsystem: Red Hat, Inc. QEMU Virtual Machine
  Kernel modules: cirrusfb, cirrus

 $ lsmod | grep cirrus
 $

This is the test case. Essentially:

 1) start plymouthd
 2) wait the default device timeout (5 seconds), so it detects '/dev/fb0'
 3) show splash, so it activates keyboard
 4) load module, so it detects '/dev/dri/card0'
 5) deactivate, so it deactivates keyboard and segfaults (or not)

  Give it a little time between each command to process events.

 sudo plymouthd --no-daemon --debug --kernel-command-line=splash &
 sleep 10
 sudo plymouth --show-splash
 sleep 10
 sudo modprobe cirrus
 sleep 10
 sudo plymouth deactivate
 <segfaults in a few seconds>

  With the same stack trace:

 #0 0x00007fdf0ef68f09 in ply_renderer_set_handler_for_input_source (renderer=<optimized out>, input_source=0x5636eaefc2a0, handler=0x0, user_data=0x0) at ply-renderer.c:406
 #1 0x00007fdf0ef62cbf in ply_keyboard_stop_watching_for_renderer_input (keyboard=0x5636eaefc6a0) at ply-keyboard.c:319
 #2 ply_keyboard_stop_watching_for_input (keyboard=keyboard@entry=0x5636eaefc6a0) at ply-keyboard.c:406
 #3 0x00007fdf0ef6221b in ply_device_manager_deactivate_keyboards (manager=0x5636eaeff6d0) at ply-device-manager.c:976
 #4 0x00005636e92d3ec3 in on_deactivate (state=0x7fff1c458390, deactivate_trigger=<optimized out>) at main.c:1361
 #5 0x00005636e92cdb9b in ply_boot_connection_on_request (connection=0x5636eaf12360) at ply-boot-server.c:504
 #6 0x00007fdf0f177fbe in ply_event_loop_handle_met_status_for_source (status=<optimized out>, source=0x5636eaf11970, loop=0x5636eaefa3a0) at ply-event-loop.c:1034
 #7 ply_event_loop_process_pending_events (loop=loop@entry=0x5636eaefa3a0) at ply-event-loop.c:1279
 #8 0x00007fdf0f178480 in ply_event_loop_run (loop=0x5636eaefa3a0) at ply-event-loop.c:1310
 #9 0x00005636e92cb514 in main (argc=4, argv=0x7fff1c459588) at main.c:2398

The version in -proposed does not have these lines in the module load step.

 [ply-device-manager.c:345] ...

Read more...

Revision history for this message
Mauricio Faria de Oliveira (mfo) wrote :
Download full text (14.0 KiB)

bionic-updates
--------------

 $ dpkg -s plymouth | grep ^Version:
 Version: 0.9.3-1ubuntu7.18.04.1

 $ sudo plymouthd --no-daemon --debug --kernel-command-line=splash &
 [1] 1092
 $ [main.c:2063] initialize_environment:initializing minimal work environment
 [main.c:2077] initialize_environment:checking if '/dev/tty1' exists
 [main.c:1925] check_verbosity:checking if tracing should be enabled
 [main.c:1990] check_verbosity:tracing shouldn't be enabled!
 [main.c:2009] check_logging:checking if console messages should be redirected and logged
 [main.c:2018] check_logging:logging will be enabled!
 [main.c:2090] initialize_environment:source built on Sep 11 2018
 [main.c:2101] initialize_environment:Making sure /run/plymouth exists
 [ply-utils.c:728] ply_create_directory:directory '/run/plymouth' already exists
 [main.c:2105] initialize_environment:initialized minimal work environment
 [main.c:769] get_cache_file_for_mode:returning cache file '/var/lib/plymouth//boot-duration'
 [main.c:322] load_settings:Trying to load /etc/plymouth//plymouthd.conf
 [ply-key-file.c:83] ply_key_file_open_file:Failed to open key file /etc/plymouth//plymouthd.conf: No such file or directory
 [main.c:498] find_system_default_splash:failed to load /etc/plymouth//plymouthd.conf
 [main.c:322] load_settings:Trying to load /run/plymouth/plymouthd.defaults
 [ply-key-file.c:83] ply_key_file_open_file:Failed to open key file /run/plymouth/plymouthd.defaults: No such file or directory
 [main.c:512] find_distribution_default_splash:failed to load /run/plymouth/plymouthd.defaults, trying /usr/share/plymouth//
 [main.c:322] load_settings:Trying to load /usr/share/plymouth//plymouthd.defaults
 [ply-key-file.c:83] ply_key_file_open_file:Failed to open key file /usr/share/plymouth//plymouthd.defaults: No such file or directory
 [main.c:514] find_distribution_default_splash:failed to load /usr/share/plymouth//plymouthd.defaults
 [main.c:926] plymouth_should_show_default_splash:checking if plymouth should show default splash
 [main.c:954] plymouth_should_show_default_splash:using default splash because kernel command line has option "splash"
 [ply-device-manager.c:766] create_devices_from_terminals:checking for consoles
 [ply-device-manager.c:544] add_consoles_from_file:opening /sys/class/tty/console/active
 [ply-device-manager.c:552] add_consoles_from_file:reading file
 [ply-device-manager.c:590] add_consoles_from_file:console /dev/tty1 found!
 [ply-device-manager.c:378] watch_for_udev_events:watching for udev graphics device add and remove events
 [ply-device-manager....

Revision history for this message
Mauricio Faria de Oliveira (mfo) wrote :
Download full text (13.9 KiB)

bionic-proposed:
---------------

$ dpkg -s plymouth | grep ^Version:
Version: 0.9.3-1ubuntu7.18.04.2

 $ sudo plymouthd --no-daemon --debug --kernel-command-line=splash &
 [1] 1055
 $ [main.c:2066] initialize_environment:initializing minimal work environment
 [main.c:2080] initialize_environment:checking if '/dev/tty1' exists
 [main.c:1928] check_verbosity:checking if tracing should be enabled
 [main.c:1993] check_verbosity:tracing shouldn't be enabled!
 [main.c:2012] check_logging:checking if console messages should be redirected and logged
 [main.c:2021] check_logging:logging will be enabled!
 [main.c:2093] initialize_environment:source built on Apr 4 2019
 [main.c:2104] initialize_environment:Making sure /run/plymouth exists
 [ply-utils.c:728] ply_create_directory:directory '/run/plymouth' already exists
 [main.c:2108] initialize_environment:initialized minimal work environment
 [main.c:769] get_cache_file_for_mode:returning cache file '/var/lib/plymouth//boot-duration'
 [main.c:322] load_settings:Trying to load /etc/plymouth//plymouthd.conf
 [ply-key-file.c:83] ply_key_file_open_file:Failed to open key file /etc/plymouth//plymouthd.conf: No such file or directory
 [main.c:498] find_system_default_splash:failed to load /etc/plymouth//plymouthd.conf
 [main.c:322] load_settings:Trying to load /run/plymouth/plymouthd.defaults
 [ply-key-file.c:83] ply_key_file_open_file:Failed to open key file /run/plymouth/plymouthd.defaults: No such file or directory
 [main.c:512] find_distribution_default_splash:failed to load /run/plymouth/plymouthd.defaults, trying /usr/share/plymouth//
 [main.c:322] load_settings:Trying to load /usr/share/plymouth//plymouthd.defaults
 [ply-key-file.c:83] ply_key_file_open_file:Failed to open key file /usr/share/plymouth//plymouthd.defaults: No such file or directory
 [main.c:514] find_distribution_default_splash:failed to load /usr/share/plymouth//plymouthd.defaults
 [main.c:926] plymouth_should_show_default_splash:checking if plymouth should show default splash
 [main.c:954] plymouth_should_show_default_splash:using default splash because kernel command line has option "splash"
 [ply-device-manager.c:814] create_devices_from_terminals:checking for consoles
 [ply-device-manager.c:592] add_consoles_from_file:opening /sys/class/tty/console/active
 [ply-device-manager.c:600] add_consoles_from_file:reading file
 [ply-device-manager.c:638] add_consoles_from_file:console /dev/tty1 found!
 [ply-device-manager.c:414] watch_for_udev_events:watching for udev graphics device add and remove events
 [ply-device-manage...

Revision history for this message
Mauricio Faria de Oliveira (mfo) wrote :

Correction:

This is the right order for these steps:
(otherwise just run 'sudo update-initramfs -u' to get the initramfs's modprobe.d dir updated)

"""
Install its DRM module, which should not load by default:

 $ echo 'blacklist cirrus' | sudo tee /etc/modprobe.d/blacklist-cirrus.conf
 $ sudo apt-get -y install linux-modules-extra-$(uname -r)
"""

Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Regarding this SRU, my question in commend #53 still remains unanswered - did anyone test the -proposed packages with a system that has disk encryption? Since there is regression potential in unlocking disks (which would be a very serious regression if that happened) I would prefer not to release this without making sure we won't accidentally brick any systems.

Revision history for this message
Mauricio Faria de Oliveira (mfo) wrote :

Hi Łukasz,

Ok, I'll test that soon.

cheers,
Mauricio

Revision history for this message
Mauricio Faria de Oliveira (mfo) wrote :
Download full text (11.1 KiB)

Hi Łukasz,

I've tested the bionic/cosmic-proposed packages with disk encryption.

Both the updates/proposed packages still show the password prompt,
and read it correctly, and move forward to the login screen.
  * One caveat here, read on to the Cosmic's details.

I could reproduce the problem with plymouth in the initramfs with
Gert's tip of using 'DeviceTimeout 1' in /etc/plymouth/plymouthd.conf,
and forcing initramfs-tools hooks _not_ to copy gpu/drm modules.

All that in VMs with Bionic/Cosmic desktop installed from the ISO,
with disk encryption enabled in the installer.

e.g.,

    $ virt-install --name plymouth-lp1794292-<bionic|cosmic> \
      --vcpus 2 --memory 4096 --disk size=16 \
      --network bridge=virbr0,model=virtio \
      --graphics vnc,port=5911,listen=0.0.0.0 \
      --cdrom ~/Downloads/ubuntu-<18.04.2|18.10>-desktop-amd64.iso

crypt disk setup:

    $ lsblk --ascii /dev/vda
    NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
    vda 252:0 0 16G 0 disk
    |-vda1 252:1 0 731M 0 part /boot
    |-vda2 252:2 0 1K 0 part
    `-vda5 252:5 0 15.3G 0 part
      `-vda5_crypt 253:0 0 15.3G 0 crypt
        |-ubuntu--vg-root 253:1 0 14.3G 0 lvm /
        `-ubuntu--vg-swap_1 253:2 0 976M 0 lvm [SWAP]

    $ sudo dmsetup table
    vda5_crypt: 0 32047104 crypt aes-xts-plain64 <...zeroes...> 0 252:5 4096 1 allow_discards
    ubuntu--vg-swap_1: 0 1998848 linear 253:0 30025728
    ubuntu--vg-root: 0 30023680 linear 253:0 2048

initramfs setup (see commented lines with leading '#copy...')

    $ cat /etc/plymouth/plymouthd.conf
    DeviceTimeout 1

    $ sudo grep -r -e 'copy_modules.*gpu' -e 'copy_modules.*drm' /usr/share/initramfs-tools/
    /usr/share/initramfs-tools/hooks/framebuffer:#copy_modules_dir kernel/drivers/gpu
    /usr/share/initramfs-tools/hooks/plymouth:#copy_modules_dir kernel/drivers/gpu/drm mga r128 savage sis tdfx via

And plymouth debugging enabled in kernel cmdline to check logs:

    $ cat /proc/cmdline
    BOOT_IMAGE=/vmlinuz-4.18.0-15-generic root=/dev/mapper/ubuntu--vg-root ro quiet splash plymouth.debug=file:/run/plymouth.log vt.handoff=1

bionic-updates:
---

    plymouth asks for encryption password, reads it,
    goes on filling up to 3 progress-dots and freezes.

    login screen didn't come up.

    logged in via ssh, and checked plymouth logs,
    it stopped in 'deactivating keyboards' as before.

    $ dpkg -s plymouth | grep ^Version:
    Version: 0.9.3-1ubuntu7.18.04.1

    $ sudo tail /run/plymouth.log
    [ply-boot-server.c:436] ply_boot_connection_on_request:got update request
    [main.c:218] on_update:updating status to 'snapd.seeded.service'
    [ply-event-loop.c:1060] ply_event_loop_handle_disconnect_for_source:calling disconnected_handler 0x5641e79dad20 for fd 15
    [ply-event-loop.c:1064] ply_event_loop_handle_disconnect_for_source:done calling disconnected_handler 0x5641e79dad20 for fd 15
    [ply-event-loop.c:1144] ply_event_loop_free_destinations_for_source:freeing destination (1, 0x5641e79d...

Revision history for this message
Mauricio Faria de Oliveira (mfo) wrote :

Hi Łukasz,

Just following up if you're OK with the results of the testing you asked.

I realize you might be busy with the Disco release, so no worries if we catch up on this next week.

Thanks,
Mauricio

Revision history for this message
Dan Streetman (ddstreet) wrote :

note on autopkgtest regression; the only failing test is systemd (i386) which appears to be a result of bug 1824237, e.g. from the failing autopkgtest:

Apr 10 18:53:08 autopkgtest lxd.activate[1348]: cannot locate the core or legacy core snap (current symlink missing?): No such file or directory

Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for plymouth has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package plymouth - 0.9.3-1ubuntu10.1

---------------
plymouth (0.9.3-1ubuntu10.1) cosmic; urgency=medium

  * debian/patches/git_helper_renderer.patch,
    debian/patches/git_desactivate_renderer.patch:
    - 'device-manager: free keyboards when deactivating a renderer',
      (LP: #1794292)

 -- Brian Murray <email address hidden> Wed, 20 Mar 2019 14:49:21 -0700

Changed in plymouth (Ubuntu Cosmic):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package plymouth - 0.9.3-1ubuntu7.18.04.2

---------------
plymouth (0.9.3-1ubuntu7.18.04.2) bionic; urgency=medium

  [ Mauricio Faria de Oliveira ]
  * d/p/0013-device-manager-don-t-watch-for-udev-events-when-deac_bionic.patch:
    - Don't process udev events after we've been deactivated (e.g., by gdm).
      These can cause the VT/tty to be set back to VT_AUTO mode after it's
      set to VT_PROCESS mode (by gdm), which blocks 'chvt' indefinitely on
      that VT (login screen or auto-login session in tty1). (LP: #1817738)

  [ Brian Murray ]
  * debian/patches/git_helper_renderer.patch,
    debian/patches/git_desactivate_renderer.patch:
    - 'device-manager: free keyboards when deactivating a renderer',
      (LP: #1794292)

 -- Dan Streetman <email address hidden> Thu, 04 Apr 2019 11:41:18 -0400

Changed in plymouth (Ubuntu Bionic):
status: Fix Committed → Fix Released
To post a comment you must log in.