Groovy kernel (5.8.0-1004-aws) creates broken /dev/console on i3.metal instances
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-images |
Fix Released
|
Undecided
|
Unassigned | ||
cloud-init |
Fix Released
|
Undecided
|
Paride Legovini | ||
linux-aws (Ubuntu) |
Fix Released
|
Undecided
|
Andrea Righi |
Bug Description
[Impact]
Starting with kernel 5.8 the default nr_uarts has been changed from 4 to 2 for amd64, but this seems to affect i3.metal instances in AWS, because ttyS0 is now remapped to ttyS4 and this is breaking tools like cloud-init (and probably something else).
[Test case]
# echo > /dev/console
bash: echo: write error: Input/output error
[Fix]
Setting nr_uarts=4 by default (via CONFIG_
[Regression potential]
Minimal. Restores the old behavior used in 5.4 (that shouldn't have changed in the first place).
[Original bug report]
Hi,
When running Groovy daily images on i3.metal instances a broken /dev/console is created. The char device appears to be writable but writing to it causes an Input/output error. This is breaking cloud-init, as it tries to log to /dev/console, and is likely to break other programs.
On Focal:
root@ip-
crw------- 1 root root 5, 1 Sep 21 16:07 /dev/console
root@ip-
root@ip-
On Groovy:
root@ip-
crw--w---- 1 root tty 5, 1 Sep 21 16:03 /dev/console
root@ip-
bash: echo: write error: Input/output error
The Groovy kernel log has a
[ 3.561696] fbcon: Taking over console
line in it, which is not present in the Focal kernel log (5.4.0-1024-aws). Perhaps fbcon should be prevented from taking over console?
summary: |
- Groovy kernel (5.8.0-1004-aws) created broken /dev/console on i3.metal + Groovy kernel (5.8.0-1004-aws) creates broken /dev/console on i3.metal instances |
Changed in linux-aws (Ubuntu): | |
assignee: | nobody → Andrea Righi (arighi) |
description: | updated |
Changed in linux-aws (Ubuntu): | |
status: | New → Fix Committed |
Changed in cloud-init: | |
status: | Triaged → Fix Released |
Changed in cloud-images: | |
status: | New → Fix Committed |
Changed in cloud-images: | |
status: | Fix Committed → Fix Released |
Adding some details about this issue. It looks like the real problem is the serial driver, in fact with a 5.4 kernel we can see the following in dmesg:
[ 4.991325] 0000:16:00.0: ttyS0 at MMIO 0xc5a00000 (irq = 85, base_baud = 115200) is a 16550A
With the 5.8 kernel we don't see any message at all about ttyS0, meaning that the serial isn't properly recognized.
A temporary workaround could be to remove console=ttyS0 from the kernel boot parameters, this would probably make cloud-init happy, but this is not obviously the right solution.
I'll investigate more to find the exact commit that introduced this regression.
Thanks Paride for helping me out to reproduce and test this problem!