Thanks, this strace shows that src/getfd.c:getfd_keymap() is unable to
find any VTs not in raw mode:

int
getfd_keymap(void) {
        int fd, bestfd = -1;
        char ttyname[sizeof("/dev/ttyNN")] = "/dev/tty";
        int i;

#define CHECK_FD_KEYMAP do { \
        if (is_a_console(fd)) { \
                long mode = kbmode(fd); \
                if (mode == K_UNICODE) { \
                        if (bestfd != -1) \
                                close(bestfd); \
                        return fd; \
                } else if (mode == K_XLATE && bestfd == -1) \
                        bestfd = fd; \
                else \
                        close(fd); \
        } else \
                close(fd); \
} while (0)

[...]

        for (i = 1; i <= 12; ++i) {
                snprintf(ttyname + sizeof("/dev/tty") - 1, 3, "%d", i);
                if ((fd = open_a_console(ttyname)) >= 0)
                        CHECK_FD_KEYMAP;
        }

        fprintf(stderr,
                _("Couldn't get a file descriptor referring to the console\n"));

        /* total failure */
        exit(1);
}

is_a_console() checks KDGKBTYPE, kbmode() checks KDGKBMODE.

Could you please compile and run the attached program as root on the
affected system, and post the results?

In the course of investigating, I've discovered locally that ioctl(fd,
KDGKBMODE), despite taking an unsigned long * as an argument, doesn't
fully clear the address here on xenial x86_64.  So if this program
returns sensible results on your system, we may be looking at a memory
initialization bug.

** Attachment added: "check-kbd-mode.c"
   
https://bugs.launchpad.net/ubuntu/+source/console-setup/+bug/1621824/+attachment/4744461/+files/check-kbd-mode.c

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to console-setup in Ubuntu.
https://bugs.launchpad.net/bugs/1621824

Title:
  MFG:Garrison - Ubuntu 16.04.1 dmesg error "systemd[1]: Failed to start
  Set console keymap."

Status in console-setup package in Ubuntu:
  Confirmed

Bug description:
  == Comment: #1 - Application Cdeadmin <> - 2016-08-23 15:05:14 ==
  ==== State: Open by: knodelk on 23 August 2016 14:00:43 ====

  Seeing the following error message in the Ubuntu dmesg log following
  IPL to Ubuntu on system with Ubuntu 16.04.1 installed:

  # dmesg -T --level=alert,crit,err
  [Tue Aug 23 09:20:12 2016] systemd[1]: Failed to start Set console keymap.

  This appears to be something that can be ignored so manufacturing will
  be ignoring this message until directed otherwise.

  ==> all systemd related messages: 
  # dmesg -T | grep systemd
  [Tue Aug 23 09:20:12 2016] systemd[1]: systemd 229 running in system mode. 
(+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP 
+GCRYPT +GNUTLS +ACL +XZ -LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN)
  [Tue Aug 23 09:20:12 2016] systemd[1]: Detected architecture ppc64-le.
  [Tue Aug 23 09:20:12 2016] systemd[1]: Set hostname to <rcx2d406>.
  [Tue Aug 23 09:20:12 2016] systemd[1]: Listening on Device-mapper event 
daemon FIFOs.
  [Tue Aug 23 09:20:12 2016] systemd[1]: Started Forward Password Requests to 
Wall Directory Watch.
  [Tue Aug 23 09:20:12 2016] systemd[1]: Listening on /dev/initctl 
Compatibility Named Pipe.
  [Tue Aug 23 09:20:12 2016] systemd[1]: Reached target Encrypted Volumes.
  [Tue Aug 23 09:20:12 2016] systemd[1]: Listening on Syslog Socket.
  [Tue Aug 23 09:20:12 2016] systemd[1]: Listening on Journal Socket.
  [Tue Aug 23 09:20:12 2016] systemd[1]: Listening on Journal Socket (/dev/log).
  [Tue Aug 23 09:20:12 2016] systemd[1]: Reached target User and Group Name 
Lookups.
  [Tue Aug 23 09:20:12 2016] systemd[1]: Listening on fsck to fsckd 
communication Socket.
  [Tue Aug 23 09:20:12 2016] systemd[1]: Listening on udev Control Socket.
  [Tue Aug 23 09:20:12 2016] systemd[1]: Listening on LVM2 metadata daemon 
socket.
  [Tue Aug 23 09:20:12 2016] systemd[1]: Listening on LVM2 poll daemon socket.
  [Tue Aug 23 09:20:12 2016] systemd[1]: Created slice User and Session Slice.
  [Tue Aug 23 09:20:12 2016] systemd[1]: Listening on udev Kernel Socket.
  [Tue Aug 23 09:20:12 2016] systemd[1]: Created slice System Slice.
  [Tue Aug 23 09:20:12 2016] systemd[1]: Mounting POSIX Message Queue File 
System...
  [Tue Aug 23 09:20:12 2016] systemd[1]: Reached target Slices.
  [Tue Aug 23 09:20:12 2016] systemd[1]: Starting Create list of required 
static device nodes for the current kernel...
  [Tue Aug 23 09:20:12 2016] systemd[1]: Starting Nameserver information 
manager...
  [Tue Aug 23 09:20:12 2016] systemd[1]: Starting Monitoring of LVM2 mirrors, 
snapshots etc. using dmeventd or progress polling...
  [Tue Aug 23 09:20:12 2016] systemd[1]: Mounting RPC Pipe File System...
  [Tue Aug 23 09:20:12 2016] systemd[1]: Created slice 
system-serial\x2dgetty.slice.
  [Tue Aug 23 09:20:12 2016] systemd[1]: Started Read required files in advance.
  [Tue Aug 23 09:20:12 2016] systemd[1]: Starting Load Kernel Modules...
  [Tue Aug 23 09:20:12 2016] systemd[1]: Mounting Debug File System...
  [Tue Aug 23 09:20:12 2016] systemd[1]: Listening on Journal Audit Socket.
  [Tue Aug 23 09:20:12 2016] systemd[1]: Starting Journal Service...
  [Tue Aug 23 09:20:12 2016] systemd[1]: Mounting Huge Pages File System...
  [Tue Aug 23 09:20:12 2016] systemd[1]: Set up automount Arbitrary Executable 
File Formats File System Automount Point.
  [Tue Aug 23 09:20:12 2016] systemd[1]: Starting Uncomplicated firewall...
  [Tue Aug 23 09:20:12 2016] systemd[1]: Starting Set console keymap...
  [Tue Aug 23 09:20:12 2016] systemd[1]: Mounted Debug File System.
  [Tue Aug 23 09:20:12 2016] systemd[1]: Mounted POSIX Message Queue File 
System.
  [Tue Aug 23 09:20:12 2016] systemd[1]: Mounted Huge Pages File System.
  [Tue Aug 23 09:20:12 2016] systemd[1]: Started Create list of required static 
device nodes for the current kernel.
  [Tue Aug 23 09:20:12 2016] systemd[1]: Started Nameserver information manager.
  [Tue Aug 23 09:20:12 2016] systemd[1]: Started Uncomplicated firewall.
  [Tue Aug 23 09:20:12 2016] systemd[1]: keyboard-setup.service: Main process 
exited, code=exited, status=1/FAILURE
  [Tue Aug 23 09:20:12 2016] systemd[1]: Failed to start Set console keymap.
  [Tue Aug 23 09:20:12 2016] systemd[1]: keyboard-setup.service: Unit entered 
failed state.
  [Tue Aug 23 09:20:12 2016] systemd[1]: keyboard-setup.service: Failed with 
result 'exit-code'.
  [Tue Aug 23 09:20:12 2016] systemd[1]: Mounted RPC Pipe File System.
  [Tue Aug 23 09:20:12 2016] systemd[1]: Started Load Kernel Modules.
  [Tue Aug 23 09:20:12 2016] systemd[1]: Mounting Configuration File System...
  [Tue Aug 23 09:20:12 2016] systemd[1]: Starting Apply Kernel Variables...
  [Tue Aug 23 09:20:12 2016] systemd[1]: Mounting FUSE Control File System...
  [Tue Aug 23 09:20:12 2016] systemd[1]: Started LVM2 metadata daemon.
  [Tue Aug 23 09:20:12 2016] systemd[1]: Starting Create Static Device Nodes in 
/dev...
  [Tue Aug 23 09:20:12 2016] systemd[1]: Mounted FUSE Control File System.
  [Tue Aug 23 09:20:12 2016] systemd[1]: Mounted Configuration File System.
  [Tue Aug 23 09:20:12 2016] systemd[1]: Started Apply Kernel Variables.
  [Tue Aug 23 09:20:12 2016] systemd[1]: Started Create Static Device Nodes in 
/dev.
  [Tue Aug 23 09:20:12 2016] systemd[1]: Starting udev Kernel Device Manager...
  [Tue Aug 23 09:20:12 2016] systemd[1]: Started Journal Service.
  [Tue Aug 23 09:20:12 2016] systemd-journald[7090]: Received request to flush 
runtime journal from PID 1

  ===> OS LEVEL   
         ver 1.5.4.3 - OS, HTX, Firmware and Machine details

                             OS: GNU/Linux
                     OS Version: Ubuntu 16.04.1 LTS \n \l
                 Kernel Version: 4.4.0-31-generic
          
  ===> attaching the full dmesg output 
  = Comment: #2 - Application Cdeadmin <> - 2016-08-23 15:05:17 ==

  == Comment: #5 - Application Cdeadmin <> - 2016-08-25 12:15:34 ==
  ==== State: MoreInfo by: knodelk on 25 August 2016 11:10:22 ====

  Here is the requested command output:

  # systemctl status -l console-setup.service                                   
  
  * console-setup.service - Set console font and keymap                         
  
     Loaded: loaded (/lib/systemd/system/console-setup.service; static; vendor 
pre
                                                                                
  
     Active: active (exited) since Thu 2016-08-25 10:51:24 CDT; 5h 12min ago    
  
       Docs: man:loadkeys(1)                                                    
  
    Process: 8017 ExecStart=/bin/setupcon --save (code=exited, 
status=0/SUCCESS)  
   Main PID: 8017 (code=exited, status=0/SUCCESS)                               
  
      Tasks: 0                                                                  
  
     Memory: 0B                                                                 
  
        CPU: 0                                                                  
  
     CGroup: /system.slice/console-setup.service                                
  
                                                                                
  
  Aug 25 10:51:23 rcx2e517 systemd[1]: Starting Set console font and keymap...  
  
  Aug 25 10:51:24 rcx2e517 systemd[1]: Started Set console font and keymap.     
  
  lines 1-13/13 (END)

  and /var/log/kern.log is attached
  ==== State: MoreInfo by: byrneadw on 05 September 2016 16:47:10 ====

  We collected the data again. kern.log doesn't have any logs that
  related to the dmesg error

  The error can be recreated by doing a cold boot, it won't recreate
  with a reboot.

  
  == Comment: #13 - Application Cdeadmin <> - 2016-09-08 09:05:40 ==
  ==== State: Open by: byrneadw on 08 September 2016 07:56:07 ====

  This is the default keyboard layout.

  root@rcx2d407:~# cat /etc/default/keyboard
  # KEYBOARD CONFIGURATION FILE

  # Consult the keyboard(5) manual page.

  XKBMODEL="pc105"
  XKBLAYOUT="us"
  XKBVARIANT=""
  XKBOPTIONS=""

  BACKSPACE="guess"
  root@rcx2d407:~#

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/console-setup/+bug/1621824/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to