Bug 104204 - crash (SIGSEGV) on reboot
Summary: crash (SIGSEGV) on reboot
Status: RESOLVED FIXED
Alias: None
Product: plymouth
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Ray Strode [halfline]
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-12-11 02:13 UTC by Paul Wise
Modified: 2017-12-11 23:27 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
gdb backtrace of the crash (7.53 KB, text/plain)
2017-12-11 02:13 UTC, Paul Wise
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Wise 2017-12-11 02:13:06 UTC
Created attachment 136073 [details]
gdb backtrace of the crash

I get a reproducible crash on reboot in plymouth 0.9.3-1 running on Debian buster. If the below gdb backtrace and the attached full gdb backtrace isn't useful, please let me know what extra information to include. The core file will be automatically deleted in one week, but I can reproduce this issue with a reboot or keep the core file around for longer.

Core was generated by `@sbin/plymouthd --mode=shutdown --attach-to-session'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  strlen () at ../sysdeps/x86_64/strlen.S:106
106	../sysdeps/x86_64/strlen.S: No such file or directory.
#0  0x00007f917f290f46 in strlen () at ../sysdeps/x86_64/strlen.S:106
#1  0x00007f917f290c6e in __GI___strdup (s=0x0) at strdup.c:41
#2  0x00007f917f5c0fb0 in ply_renderer_load_plugin (module_path=0x7f917f5c52b8 "/usr/lib/x86_64-linux-gnu/plymouth/renderers/x11.so", renderer=0x562aa6b81a60) at ply-renderer.c:160
#3  0x00007f917f5c0fb0 in ply_renderer_open_plugin (plugin_path=0x7f917f5c52b8 "/usr/lib/x86_64-linux-gnu/plymouth/renderers/x11.so", renderer=0x562aa6b81a60) at ply-renderer.c:238
#4  0x00007f917f5c0fb0 in ply_renderer_open (renderer=renderer@entry=0x562aa6b81a60) at ply-renderer.c:281
#5  0x00007f917f5b8b82 in create_devices_for_terminal_and_renderer_type (manager=0x562aa6b80440, device_path=0x0, terminal=0x562aa6b804e0, renderer_type=PLY_RENDERER_TYPE_AUTO) at ply-device-manager.c:683
#6  0x0000562aa622653b in load_devices (flags=PLY_DEVICE_MANAGER_FLAGS_IGNORE_UDEV, state=0x7ffc246e3a50) at main.c:1130
#7  0x0000562aa622653b in main (argc=3, argv=0x7ffc246e4c38) at main.c:2368
Comment 1 Paul Wise 2017-12-11 02:14:25 UTC
PS: there is another backtrace in the Debian bug report for this:

https://bugs.debian.org/878115
Comment 2 Ray Strode [halfline] 2017-12-11 15:38:32 UTC
so the line in question is:

                renderer->device_name = strdup (renderer->plugin_interface->get_device_name (renderer->backend));

get_device_name is implemented as:

        return gdk_display_get_name (gdk_display_get_default ());

This suggests that gdk_display_get_name () is returning NULL.  On some level, it makes sense that it returns NULL, since this is the x11 renderer and we don't have an X server during reboots.  (this renderer is really only for development, not for production use).  It clearly worked at some point in the past though. probably a GTK+ change broke it.

Anyway fix is easy, just move the gtk_init_check call to create_backend, so we fail earlier.

Workaround is to uninstall whatever package provides the x11 plugin (plymouth-dev ?)
Comment 4 Paul Wise 2017-12-11 23:27:33 UTC
Thanks for the analysis and fix!

FYI: on Debian the X11 plugin is provided by the plymouth-x11 package.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.