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 on 2018-09-25
120
This bug affects 28 people
Affects Status Importance Assigned to Milestone
plymouth (Ubuntu)
High
Mathieu Trudel-Lapierre
Cosmic
High
Mathieu Trudel-Lapierre

Bug 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: Crash
DistroRelease: 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: 11
SourcePackage: 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

Steve Taylor (supergrid) 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

Changed in plymouth (Ubuntu):
importance: Undecided → Medium
tags: removed: need-amd64-retrace

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

Martin Wimpress (flexiondotorg) wrote :

Ugh, ignore the above. Wrong issue. Sorry.

tags: added: id-5bad7286befb7a37e6f5072a

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

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

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
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
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()

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.

Gert van de Kraats (gkraats) wrote :

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

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)

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?

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

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

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

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.

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()

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

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.

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

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

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.

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

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;
}

Sebastien Bacher (seb128) wrote :

bug #1802993 seems the same issue

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)

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

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.

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.

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.

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.

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

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.

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?

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.

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.

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?

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?
>

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)

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)
>

To post a comment you must log in.