Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1158848 - Unable to write to /dev/console and /dev/ttyS0 on s390x
Summary: Unable to write to /dev/console and /dev/ttyS0 on s390x
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 21
Hardware: s390x
OS: Linux
high
high
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: AcceptedFreezeException
Depends On:
Blocks: ZedoraTracker F21FinalFreezeException
TreeView+ depends on / blocked
 
Reported: 2014-10-30 11:21 UTC by Jan Stodola
Modified: 2018-05-22 21:46 UTC (History)
13 users (show)

Fixed In Version: kernel-3.17.4-200.fc20
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-11-25 22:36:57 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
lsinitrd (152.78 KB, text/plain)
2014-11-06 17:21 UTC, Jan Stodola
no flags Details

Description Jan Stodola 2014-10-30 11:21:03 UTC
Description of problem:
Attempts to write to /dev/console or /dev/ttyS0 fail with errors. Kernel is 3.17.1-302.fc21.s390x:

[root@rtt7 ~]# echo 123 > /dev/console
-bash: /dev/console: No such device
[root@rtt7 ~]# ls -l /dev/console
crw-------. 1 root root 5, 1 Oct 30 06:47 /dev/console

[root@rtt7 ~]# echo 123 > /dev/ttyS0
-bash: echo: write error: Input/output error
[root@rtt7 ~]# ls -l /dev/ttyS0
crw-rw----. 1 root dialout 4, 64 Oct 30 07:10 /dev/ttyS0


There is also a warning message when booting:
[root@rtt7 ~]# dmesg | grep console
[    0.073773] console [ttyS0] enabled
[    0.354101] Warning: unable to open an initial console.


Not able to reproduce with 3.16.3-302.fc21.s390x:
[root@rtt7 ~]# dmesg | grep console
[    0.064029] console [ttyS0] enabled
[root@rtt7 ~]# ls -l /dev/console
crw-------. 1 root root 5, 1 Oct 30 06:46 /dev/console
[root@rtt7 ~]# echo 123 > /dev/console
[root@rtt7 ~]# echo 123 > /dev/ttyS0
[root@rtt7 ~]# uname -r
3.16.3-302.fc21.s390x
[root@rtt7 ~]#


Version-Release number of selected component (if applicable):
3.17.1-302.fc21.s390x

How reproducible:
always on s390x

Steps to Reproduce:
1. echo 123 > /dev/console
2. echo 123 > /dev/ttyS0

Actual results:
Unable to write to /dev/console and /dev/ttyS0

Expected results:
[root@rtt7 ~]# echo 123 > /dev/console
[root@rtt7 ~]# echo 123 > /dev/ttyS0
[root@rtt7 ~]#

Additional info:
I couldn't reproduce this issue on x86_64 in KVM:
[root@localhost ~]# echo 1 > /dev/console 
[root@localhost ~]# echo 2 > /dev/ttyS0
[root@localhost ~]# uname -r
3.17.1-302.fc21.x86_64
[root@localhost ~]#

Because of this issue, some messages are not printed on console (login prompt, important messages during installation)

Comment 1 Jan Stodola 2014-10-31 08:49:29 UTC
Reproduced with kernel-3.18.0-0.rc2.git2.1.fc21.s390x.
Also reproduced with disabled SELinux.

strace reports:
[root@rtt7 ~]# strace echo 123 > /dev/console 
-bash: /dev/console: No such device

[root@rtt7 ~]# strace echo 123 > /dev/ttyS0 
execve("/usr/bin/echo", ["echo", "123"], [/* 22 vars */]) = 0
brk(0)                                  = 0x84f2d000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x3fffd182000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x3fffd180000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=37188, ...}) = 0
mmap(NULL, 37188, PROT_READ, MAP_PRIVATE, 3, 0) = 0x3fffd176000
close(3)                                = 0
open("/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\2\1\0\0\0\0\0\0\0\0\0\0\3\0\26\0\0\0\1\0\0\0\0\0\2&\300"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=2082888, ...}) = 0                                                                       
mmap(NULL, 1816736, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x3fffcfba000                                        
mmap(0x3fffd16c000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b1000) = 0x3fffd16c000               
mmap(0x3fffd172000, 14496, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x3fffd172000                     
close(3)                                = 0                                                                                      
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x3fffcfb9000                                         
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x3fffcfb8000                                         
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x3fffcfb7000                                         
mprotect(0x3fffd16c000, 16384, PROT_READ) = 0                                                                                    
mprotect(0x80008000, 4096, PROT_READ)   = 0                                                                                      
mprotect(0x3fffd1ab000, 4096, PROT_READ) = 0                                                                                     
munmap(0x3fffd176000, 37188)            = 0                                                                                      
brk(0)                                  = 0x84f2d000                                                                           
brk(0x84f4e000)                         = 0x84f4e000
brk(0)                                  = 0x84f4e000
open("/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=106374736, ...}) = 0
mmap(NULL, 106374736, PROT_READ, MAP_PRIVATE, 3, 0) = 0x3fff6a44000
close(3)                                = 0
fstat(1, {st_mode=S_IFCHR|0660, st_rdev=makedev(4, 64), ...}) = 0
ioctl(1, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, 0x3ffffb45fe4) = -1 EIO (Input/output error)
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x3fffd17f000
write(1, "123\n", 4)                    = -1 EIO (Input/output error)
close(1)                                = 0
munmap(0x3fffd17f000, 4096)             = 0
open("/usr/share/locale/locale.alias", O_RDONLY|O_CLOEXEC) = 1
fstat(1, {st_mode=S_IFREG|0644, st_size=2492, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x3fffd17f000
read(1, "# Locale name alias data base.\n#"..., 4096) = 2492
read(1, "", 4096)                       = 0
close(1)                                = 0
munmap(0x3fffd17f000, 4096)             = 0
open("/usr/share/locale/en_US.UTF-8/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_US.utf8/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_US/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en.UTF-8/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en.utf8/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
write(2, "echo: ", 6echo: )                   = 6
write(2, "write error", 11write error)             = 11
open("/usr/share/locale/en_US.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_US.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_US/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
write(2, ": Input/output error", 20: Input/output error)    = 20
write(2, "\n", 1
)                       = 1
exit_group(1)                           = ?
+++ exited with 1 +++
[root@rtt7 ~]#

Comment 2 Dan Horák 2014-10-31 09:04:19 UTC
systemd/udev version is systemd-216-5.fc21

Comment 3 Gonzalo Muelas Serrano 2014-10-31 09:14:44 UTC
I assume this is Linux under z/VM. Can you confirm it, please?

Comment 4 Gonzalo Muelas Serrano 2014-10-31 09:52:15 UTC
fyi- with Linux under z/VM

I can also reproduce it with:
F20 (systemd-208-22.fc20) and updating to:
kernel-3.17.1-302.fc21.s390x.rpm
kernel-core-3.17.1-302.fc21.s390x.rpm
kernel-modules-3.17.1-302.fc21.s390x.rpm
dracut-038-30.git20140903.fc21.s390x.rpm


while with kernel-3.16.6-203.fc20 seems to work fine.

Comment 5 Jan Stodola 2014-10-31 10:00:54 UTC
Yes, tested under z/VM.

Comment 6 Hendrik Brueckner 2014-11-06 15:25:57 UTC
(In reply to Jan Stodola from comment #0)
> Description of problem:
> Attempts to write to /dev/console or /dev/ttyS0 fail with errors. Kernel is
> 3.17.1-302.fc21.s390x:
> 
> [root@rtt7 ~]# echo 123 > /dev/console
> -bash: /dev/console: No such device
> [root@rtt7 ~]# ls -l /dev/console
> crw-------. 1 root root 5, 1 Oct 30 06:47 /dev/console
> 
> [root@rtt7 ~]# echo 123 > /dev/ttyS0
> -bash: echo: write error: Input/output error
> [root@rtt7 ~]# ls -l /dev/ttyS0
> crw-rw----. 1 root dialout 4, 64 Oct 30 07:10 /dev/ttyS0
> 
> 
> There is also a warning message when booting:
> [root@rtt7 ~]# dmesg | grep console
> [    0.073773] console [ttyS0] enabled
> [    0.354101] Warning: unable to open an initial console.

Could you check whether the ramdisk contains the /dev/console device node. Right before the kernel starts the init process, it tries to open the /dev/console device. Later in the boot process udev takes control of /dev and dynamically mounts it and, perhaps, ensures that /dev/console is created.

So please check the ramdisk has a /dev/console device node.

Thanks.

Comment 7 Jan Stodola 2014-11-06 17:21:19 UTC
Created attachment 954557 [details]
lsinitrd

Yes, dev/console is present in the initramfs:

[root@rtt7 ~]# uname -r
3.17.1-302.fc21.s390x
[root@rtt7 ~]# rpm -q dracut
dracut-038-30.git20140903.fc21.s390x
[root@rtt7 ~]# lsinitrd /boot/initramfs-3.17.1-302.fc21.s390x.img | grep console$
crw-r--r--   1 root     root       5,   1 Nov  6 11:32 dev/console
[root@rtt7 ~]#

Whole output from lsintrd is attached.

Comment 8 Dan Horák 2014-11-19 12:39:57 UTC
Hi IBM, any news here? It effectively blocks progress on F-21 when you can't see large parts of the output.

Comment 9 Martin Schwidefsky 2014-11-19 17:01:26 UTC
serial8250_init is stealing the device node 4/64. The init function of the 3215 driver comes after serial8250 and gets a -EBUSY on tty_register_driver.

Why is serial8250 compiled-in for s390x?

Comment 10 Dan Horák 2014-11-19 17:16:29 UTC
(In reply to Martin Schwidefsky from comment #9)
> serial8250_init is stealing the device node 4/64. The init function of the
> 3215 driver comes after serial8250 and gets a -EBUSY on tty_register_driver.
> 
> Why is serial8250 compiled-in for s390x?

Thanks for looking. It's inherited from the generic Fedora config - http://pkgs.fedoraproject.org/cgit/kernel.git/tree/config-generic#n2349 - shouldn't the kernel config mechanism somehow reject the configuration where both the serial8250 and 3215 drivers are selected?

I'll rebuild the kernel with serial8250 disabled and let you know.

Comment 11 Dan Horák 2014-11-19 18:12:51 UTC
yes, with this change the console works again

diff --git a/config-s390x b/config-s390x
index f947234..78ba8e9 100644
--- a/config-s390x
+++ b/config-s390x
@@ -234,6 +234,7 @@ CONFIG_HOTPLUG_PCI_S390=y
 # CONFIG_HID is not set
 # CONFIG_MTD is not set
 
+# CONFIG_SERIAL_8250 is not set
 # CONFIG_PARPORT is not set
 # CONFIG_UWB is not set
 # CONFIG_MMC is not set

Comment 12 Josh Boyer 2014-11-19 18:26:29 UTC
I've disabled it on s390x for F20-rawhide.  Thanks all.

Comment 13 Fedora Blocker Bugs Application 2014-11-19 18:32:23 UTC
Proposed as a Freeze Exception for 21-final by Fedora user sharkcz using the blocker tracking app because:

 Because the PC style serial port wins over the s390 native 3215 driver, there is no login available or other output on the console.

Comment 14 Fedora Update System 2014-11-22 20:28:26 UTC
kernel-3.17.4-300.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/kernel-3.17.4-300.fc21

Comment 15 Fedora Update System 2014-11-24 14:22:31 UTC
kernel-3.17.4-200.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/kernel-3.17.4-200.fc20

Comment 16 Adam Williamson 2014-11-24 18:28:57 UTC
Discussed at 2014-11-24 freeze exception review meeting: http://meetbot.fedoraproject.org/fedora-blocker-review/2014-11-24/f21-blocker-review.2014-11-24-17.01.log.txt . Accepted as a freeze exception issue: major/showstopper bugs for secondary arches can be freeze exception issues so that those arches are not stuck until the primary arch release is complete and freeze lifted, per https://fedoraproject.org/wiki/QA:SOP_freeze_exception_bug_process#Freeze_exception_bug_principles .

Comment 17 Fedora Update System 2014-11-24 20:59:34 UTC
Package kernel-3.17.4-300.fc21:
* should fix your issue,
* was pushed to the Fedora 21 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing kernel-3.17.4-300.fc21'
as soon as you are able to, then reboot.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-15668/kernel-3.17.4-300.fc21
then log in and leave karma (feedback).

Comment 18 Fedora Update System 2014-11-25 22:36:57 UTC
kernel-3.17.4-300.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 19 Fedora Update System 2014-12-01 19:05:43 UTC
kernel-3.17.4-200.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.