Bug 1022707

Summary: No disk encryption password prompt on initrd
Product: [openSUSE] openSUSE Tumbleweed Reporter: Thiago Macieira <thiago>
Component: BasesystemAssignee: E-mail List <bnc-team-screening>
Status: RESOLVED DUPLICATE QA Contact: E-mail List <qa-bugs>
Severity: Critical    
Priority: P5 - None CC: kresten, robby.engelmann
Version: Current   
Target Milestone: ---   
Hardware: x86-64   
OS: Linux   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Thiago Macieira 2017-01-31 02:24:21 UTC
With initrd image created by dracut 20.1 (installed today), on boot, the password prompt for decrypting is not visible on a normal boot. This makes booting impossible. This happens for kernel 4.9.6 (installed today) as well as 4.9.4 that was previously working. So the problem appears to be the initrd image. I do not have the old images anymore, as they're overwritten without backup after the new kernel is installed.

This is with a regular plymouth boot. I'm not sure how to turn the plymouth boot off and see the regular boot messages.

With "single" at the end of the kernel command-line, the prompt does appear and I can boot into my system.
Comment 1 Thiago Macieira 2017-01-31 02:40:05 UTC
FYI, also updated today (same transaction): systemd from 228 to 232.
Comment 2 Thiago Macieira 2017-01-31 02:53:38 UTC
Found this in the syslog:

systemd[1]: plymouth-start.service: Main process exited, code=killed, status=11/SEGV
systemd[1]: Failed to start Show Plymouth Boot Screen.
systemd[1]: plymouth-start.service: Unit entered failed state.
systemd[1]: plymouth-start.service: Failed with result 'signal'.
systemd[1]: Started Dispatch Password Requests to Console Directory Watch.

Note: this is the "single" boot.
Comment 3 Thiago Macieira 2017-01-31 03:23:22 UTC
coredumpctl captured the core dump. Note that libply4 and libply-splash-core4 were updated today too.

(gdb) bt
#0  ply_hashtable_string_hash (element=0x0) at ply-hashtable.c:73
#1  0x00007f2ef513ea3a in ply_hashtable_lookup_index (hashtable=hashtable@entry=0x9863c0, key=0x0) at ply-hashtable.c:202
#2  0x00007f2ef513eda9 in ply_hashtable_lookup (hashtable=0x9863c0, key=<optimized out>) at ply-hashtable.c:237
#3  0x00007f2ef4f23158 in create_devices_for_terminal_and_renderer_type (manager=0x986750, device_path=0x0, 
    terminal=0x986be0, renderer_type=PLY_RENDERER_TYPE_AUTO) at ply-device-manager.c:713
#4  0x00007f2ef4f24e71 in create_fallback_devices (manager=<optimized out>) at ply-device-manager.c:831
#5  ply_device_manager_watch_devices (manager=<optimized out>, device_timeout=6.9089972418387644e-310, 
    keyboard_added_handler=<optimized out>, keyboard_removed_handler=<optimized out>, 
    pixel_display_added_handler=<optimized out>, pixel_display_removed_handler=<optimized out>, 
    text_display_added_handler=<optimized out>, text_display_removed_handler=0x40ad10 <on_text_display_removed>, 
    data=0x7ffdfa450c60) at ply-device-manager.c:867
#6  0x00000000004055e1 in load_devices (flags=(unknown: 9986848), state=0x7ffdfa450cf8) at main.c:1111
#7  main (argc=<optimized out>, argv=<optimized out>) at main.c:2349

(gdb) f 3
#3  0x00007f2ef4f23158 in create_devices_for_terminal_and_renderer_type (manager=0x986750, device_path=0x0, 
    terminal=0x986be0, renderer_type=PLY_RENDERER_TYPE_AUTO) at ply-device-manager.c:713
713                             old_renderer = ply_hashtable_lookup (manager->renderers,
(gdb) l
712                     if (renderer != NULL) {
713                             old_renderer = ply_hashtable_lookup (manager->renderers,
714                                                                  (void *) ply_renderer_get_device_name (renderer));
(gdb) l ply_renderer_get_device_name
100     const char *
101     ply_renderer_get_device_name (ply_renderer_t *renderer)
102     {
103             return renderer->device_name;
104     }
(gdb) p *renderer
$7 = {loop = 0x0, module_handle = 0x986d10, plugin_interface = 0x7f2ef2f3a280 <plugin_interface>, backend = 0x9871d0, 
  type = PLY_RENDERER_TYPE_AUTO, device_name = 0x0, terminal = 0x986be0, input_source_is_open = 0, is_mapped = 0, 
  is_active = 1}
(gdb) p *renderer->backend
$10 = {loop = 0x97f150, terminal = 0x986be0, device_fd = 7, device_name = 0x987250 "/dev/dri/card0", resources = 0x98bd00, 
  input_source = {backend = 0x0, terminal_input_watch = 0x0, key_buffer = 0x987290, handler = 0x0, user_data = 0x0}, 
  heads = 0x987270, heads_by_connector_id = 0x0, output_buffers = 0x9872b0, dither_red = 0, dither_green = 0, 
  dither_blue = 0, is_active = 0, requires_explicit_flushing = 1}

renderer must have been created at:

701                     renderer = ply_renderer_new (renderer_type, device_path, terminal);

Which copies device_path to renderer->device_name. Since that was NULL, the device_name continues to be NULL.

And this looks intentional:
(gdb) f 4
#4  0x00007f2ef4f24e71 in create_fallback_devices (manager=<optimized out>) at ply-device-manager.c:831
831             create_devices_for_terminal_and_renderer_type (manager,
(gdb) l
828     static void
829     create_fallback_devices (ply_device_manager_t *manager)
830     {
831             create_devices_for_terminal_and_renderer_type (manager,
832                                                            NULL,
833                                                            manager->local_console_terminal,
834                                                            PLY_RENDERER_TYPE_AUTO);
835     }

So this looks like a real bug in libply.

Another note:

(gdb) up
#5  ply_device_manager_watch_devices (manager=<optimized out>, device_timeout=6.9089972418387644e-310, 
    keyboard_added_handler=<optimized out>, keyboard_removed_handler=<optimized out>, 
    pixel_display_added_handler=<optimized out>, pixel_display_removed_handler=<optimized out>, 
    text_display_added_handler=<optimized out>, text_display_removed_handler=0x40ad10 <on_text_display_removed>, 
    data=0x7ffdfa450c60) at ply-device-manager.c:867
867                     create_fallback_devices (manager);
(gdb) l
865             if ((manager->flags & PLY_DEVICE_MANAGER_FLAGS_IGNORE_UDEV)) {
866                     ply_trace ("udev support disabled, creating fallback devices");
867                     create_fallback_devices (manager);
868                     return;
869             }

Why is udev support disabled? Is it maybe because it's too early with initramfs?
Comment 4 Thiago Macieira 2017-01-31 03:25:55 UTC
> Why is udev support disabled? Is it maybe because it's too early with initramfs?

Ah, found it:

main has:
2339            if (!plymouth_should_show_default_splash (&state)) {
2340                    /* don't bother listening for udev events if we're forcing details */
2341                    device_manager_flags |= PLY_DEVICE_MANAGER_FLAGS_IGNORE_UDEV;

and
881     static bool
882     plymouth_should_show_default_splash (state_t *state)
883     {
884             ply_trace ("checking if plymouth should show default splash");
885
886             const char const *strings[] = {
887                     "single", "1", "s", "S", "-S", NULL
888             };
889             int i;
890
891             if (state->should_force_details)
892                     return false;
893
894             for (i = 0; strings[i] != NULL; i++) {
895                     if (command_line_has_argument (state->kernel_command_line, strings[i])) {
896                             ply_trace ("no default splash because kernel command line has option \"%s\"", strings[i]);
897                             return false;
898                     }
899             }

This boot did have "single".

So the crash is a red herring for the original problem, but it may have helped me.
Comment 5 Robby Engelmann 2017-01-31 14:47:44 UTC
I think this is duplicate of previous reported one: https://bugzilla.novell.com/show_bug.cgi?id=1020283

if not, please change back...

*** This bug has been marked as a duplicate of bug 1020283 ***