Bug 8464

Summary: Parselogs error: genericx86-64 getty[1028]: can't open '/dev/tty1': Input/output error^M
Product: [Build System, Metadata & Runtime] BSPs Reporter: Cristina Agurida <cristina-danielax.agurida>
Component: bsps-runtimeAssignee: Mariano Lopez <mariano.lopez>
Status: RESOLVED FIXED QA Contact: Cristina Agurida <cristina-danielax.agurida>
Severity: normal    
Priority: Medium CC: benjamin.esquivel, georgex.l.musat, mariano.lopez, yp.kernel.watcher, yp.watcher
Version: 1.8   
Target Milestone: 2.1 M4   
Hardware: NUC   
OS: x86_64   
Whiteboard:
OS type for building Yocto: --- Type of Regression: Regression (Used to work)
Verified: Documentation change: No (bug/feature does not impact docs)

Description Cristina Agurida 2015-10-08 15:18:50 UTC
BUILD: 1.8.1: b74ea963cefffad9fbd91d4eb9b240f6a8c86cd0
ENVIRONMENT: genericx86-64 on NUC
IMAGE: core-image-lsb-sdk

STEPS TO REPRODUCE: 
  
 Parse dmesg log and all log files in /var/log for keywords like: "error" , "failed" , "cannot", "can't" etc.
Filter out the known and invalid errors or errors that appear in certain situations and need to be ignored.



EXPECTED OUTCOME: 
  
 No errors or fails should be present in logs

Actual error:

This error appears during LSB image testing on NUC in /var/log//auth.log :

Central error: Oct  1 00:10:01 genericx86-64 getty[1028]: can't open '/dev/tty1': Input/output error^M
Comment 1 Cristina Agurida 2015-10-16 09:07:06 UTC
NUC model used for this test was D54250WYK
Comment 2 Benjamin Esquivel 2015-11-09 16:39:31 UTC
Hello Cristina, thanks for filing the bug and for the description. I wanted to ask you whether this message is seen every time that the test runs or if perhaps you had checked the reproducibility (% of occurrences)
Comment 3 Mariano Lopez 2015-11-11 21:03:57 UTC
Cristina, can you please let me know step by step how to copy the image to the USB stick? I'm using jethro and copying the image with wic and I'm getting kernel panics when booting the image on a D54250WYK nuc.
Comment 4 Mariano Lopez 2015-11-17 18:20:04 UTC
I was able to reproduce the error using the fido branch, I tried again in jethro and the error was not there.

It seems the error is for pam. In both cases tty1 refers to the console default login, I logged into the device without any problem even when the error appears. Is this a critical bug that the solution has to be backported to fido?
Comment 5 Mariano Lopez 2015-11-20 22:30:55 UTC
This is a intermittent issue and it happens about 1/8 of the time. This happens at boot and I haven't never seen it after. This also affects jethro and current master. I have to investigate more on this.
Comment 6 Mariano Lopez 2015-11-27 13:43:37 UTC
After doing more test, I was able to reproduce it only with grub as the bootloader. When using syslinux I booted the devices 25 times without any error.
Comment 7 Mariano Lopez 2015-12-03 19:28:01 UTC
Today I tried to get the differences between using syslinux and grub. When I booted using syslinux, the error was there. So this happens with grub and syslinux.
Comment 8 Mariano Lopez 2015-12-11 18:17:28 UTC
Moving to 2.1 M2. I'm still not able to reproduce the error at will.
Comment 9 Mariano Lopez 2015-12-14 21:49:58 UTC
I tried to reproduce the error with "core-image-full-cmdline" using "poky-lsb" distro, but I couldn't reproduce it in 40 tries.
Comment 10 Mariano Lopez 2015-12-15 21:35:58 UTC
Today I tried to recreate the issue with core-image-lsb-sdk, the same used to open the bug. I couldn't trigger the error in 30 reboots. This time I did based on commit b3d6872bf169a13e572638e3809c50a868246616.
Comment 11 Mariano Lopez 2015-12-15 21:41:39 UTC
Checking the commits, I found f1c034be02b1e8cf13d580de0de634794f7623e8 added a couple of patches for libpam but only when using musl lib. I need to investigate more on this.
Comment 12 Mariano Lopez 2016-03-10 22:52:58 UTC
This bug is triggered when trying to run getty and the console doesn't exists yet in /dev. Commit ccb2a57ad25c98e77f81f8e3bf82e6a1da2d9cd2 adds a mechanism to verify if the console exists before trying to run getty on any tty, so getty will run when the virtual console is ready. So this solves this bug also.

I verified this running over 100 times the test using jethro and cherry-picking this particular commit.

Because this is not a critical bug (getty will be run over and over again and the console gets ready after a couple of seconds), I won't backport this commit to jethro.