Bug 699282 - kbd needs to open ttys in a loop guarding for EIO, due to BKL removal in the kernel.
Summary: kbd needs to open ttys in a loop guarding for EIO, due to BKL removal in the ...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: kbd
Version: 15
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Vitezslav Crhonek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 700971
TreeView+ depends on / blocked
 
Reported: 2011-04-24 21:25 UTC by Alexei Panov
Modified: 2012-08-07 20:06 UTC (History)
13 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 700971 (view as bug list)
Environment:
Last Closed: 2012-08-07 20:06:50 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
proposed patch (1.34 KB, patch)
2011-05-04 10:31 UTC, Vitezslav Crhonek
no flags Details | Diff

Description Alexei Panov 2011-04-24 21:25:33 UTC
Description of problem:
After system boot up, I've switched to console (Ctrl-Alt-F2), login and run mc (Midnight Commander) or another application with Russian symbols.
Russian symbols not displayed, again. Like this was in Fedora 12.

Version-Release number of selected component (if applicable):
initscripts-9.29

How reproducible:
always

Steps to Reproduce:
1. Boot system
2. switch to console
3. run application with Russian symbols, as example LANG=ru_RU.UTF-8 mc
  
Actual results:
White squares instead Russian symbols.

Expected results:
Russian symbols displayed correctly.

Additional info:
I've find workaround or patch.
If I change this line in /lib/udev/rules.d/10-console.rules:
 KERNEL=="tty0",><------>RUN+="/lib/udev/console_init %k"
like this:
 KERNEL=="tty*",><------>RUN+="/lib/udev/console_init %k"
then Russian symbols displayed correctly.

Comment 1 Arkady L. Shane 2011-04-24 21:34:08 UTC
In earlier dracut (in F14) initramfs image contained system binary /lib/udev/console_init from initscripts. Maybe it is the second way to fix this problem:

https://github.com/RussianFedora/dracut/blob/f15%2Ffixes/dracut-009-console_init.patch

Comment 2 Lennart Poettering 2011-04-27 00:30:00 UTC
systemd-vconsole should be responsible for setting that up.

Does invoking /lib/systemd/systemd-vconsole-setup manually make things work for you?

What is the content of /etc/sysconfig/i18n?

Comment 3 Alexei Panov 2011-04-27 17:59:39 UTC
Yes, after run /lib/systemd/systemd-vconsole-setup in console Russian symbols displayed correctly.

cat /etc/sysconfig/i18n
LANG="ru_RU.UTF-8"

Comment 4 Lennart Poettering 2011-04-27 22:39:26 UTC
Which systemd version is this?

Normally /lib/systemd/systemd-vconsole-setup should run at boot.

Can you do "systemctl --full | grep vconsole" after boot when the problem happened and paste the output here?

Comment 5 Alexei Panov 2011-04-28 06:31:27 UTC
# yum list installed systemd*
systemd.x86_64 25-1.fc15 @updates-testing
systemd-units.x86_64 25-1.fc15 @updates-testing

I've booted and checked what problem still persist.
# systemctl --full | grep vconsole
systemd-vconsole-setup.service loaded active exited        Setup Virtual Console

Comment 6 Michal Schmidt 2011-04-28 08:52:30 UTC
Can you boot with "rd.plymouth=0"? Do the fonts appear correctly then?

Comment 7 Alexei Panov 2011-04-28 09:05:39 UTC
Yes, with rd.plymouth=0 kernel parameter the fonts appear correctly.

Comment 8 Lennart Poettering 2011-04-28 14:54:36 UTC
Hmm, Ray, have you heard of such a problem with font loading and Plymouth colliding?

Comment 9 Lennart Poettering 2011-04-28 14:59:20 UTC
OK, my guess is that this might be related to https://bugs.launchpad.net/ubuntu/+source/linux/+bug/554172/comments/245

i.e. setfont should probably retry opening /dev/tty0 a couple of times.

Comment 10 Lennart Poettering 2011-04-28 15:06:38 UTC
Tentatively reassigning this to kbd. The EIO loop is definitely necessary in kbd. It might fix this problem. If it doesn't feel free to reassign back.

kbd maintainers, can you please beef up open_a_console() in src/getf_fd.c to loop a couple of times if you get EIO when opening the device? Since the BKL was dropped in the kernel this is unfortunately necessary in userspace to make things work race-freely, see the linked ubuntu bug.

We do a similar loop in systemd:

http://cgit.freedesktop.org/systemd/tree/src/util.c#n2326

Comment 11 Bill Nottingham 2011-04-28 16:38:23 UTC
(In reply to comment #8)
> Hmm, Ray, have you heard of such a problem with font loading and Plymouth
> colliding?

vconsole setup needs done before plymouth sets the terminal to graphics mode/the framebuffer driver is loaded, IIRC.

(font/unicode state is per-VT, but inherited from the prior existing console)

Comment 12 Lennart Poettering 2011-04-30 01:45:44 UTC
OK, will duplicate against dracut then, which apparently dropped the font loading.

Harald, please add an invocation of systemd-vconsole-setup to dracut, before you run plymouth, as discussed on IRC the other day.

Comment 13 Vitezslav Crhonek 2011-05-04 10:31:43 UTC
Created attachment 496750 [details]
proposed patch

I was not able to reproduce the problem, but I patched kbd check EIO and loop - anyone willing to test it?

SRPM and x86_64 Fedora 15 build is available here:

http://vcrhonek.fedorapeople.org/kbd/

Comment 14 Fedora End Of Life 2012-08-07 20:06:56 UTC
This message is a notice that Fedora 15 is now at end of life. Fedora
has stopped maintaining and issuing updates for Fedora 15. It is
Fedora's policy to close all bug reports from releases that are no
longer maintained. At this time, all open bugs with a Fedora 'version'
of '15' have been closed as WONTFIX.

(Please note: Our normal process is to give advanced warning of this
occurring, but we forgot to do that. A thousand apologies.)

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, feel free to reopen
this bug and simply change the 'version' to a later Fedora version.

Bug Reporter: Thank you for reporting this issue and we are sorry that
we were unable to fix it before Fedora 15 reached end of life. If you
would still like to see this bug fixed and are able to reproduce it
against a later version of Fedora, you are encouraged to click on
"Clone This Bug" (top right of this page) and open it against that
version of Fedora.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

The process we are following is described here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping


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