[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#795490: console-setup-udeb: race condition in keyboard detection



Package: console-setup-udeb
Version: 1.123

With current Jessie, when preseeding Country/Language/Locale but (intentionally) *not* keymap, d-i's first interaction with the user should be to ask for a keymap selection. However, in this situation, since there was no earlier "pause" (from user interaction), the script console-setup-udeb.postinst is run very early, while buses (like USB) are still being scanned.

As a result, there is a race condition: depending on the hardware, /sys/bus/usb/devices/*:* is (resp. is not) fully populated at the time the function "keyboard_present" is called. I have both of these kinds of hardware, an USB keyboard, and just spent 2 days figuring out the difference:

 - when it is, the keyboard is detected, and the user is then asked to select a keymap as intended;

- when it is not, no keyboard is detected, and the preseeded install proceeds with the default (US), and the install proceeds all the way to the end ... with a wrong keymap (and associated reduced list of install locales).

A very quick workaround is to insert a "sleep 5" at the beginning of console-setup-udeb.postinst .
But I assume package maintainers could do better, explicitly syncing with the end of the bus scanning operation.

This might look like a corner case, but I can imagine anybody in the business of bootable stick remastering / preseed might be randomly hit, and at least letting people know about the mechanism could save man-years of useless sweat.

Best,

-Alex

_________________________________________________________________________________________________________________________

Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc
pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler
a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration,
Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci.

This message and its attachments may contain confidential or privileged information that may be protected by law;
they should not be distributed, used or copied without authorisation.
If you have received this email in error, please notify the sender and delete this message and its attachments.
As emails may be altered, Orange is not liable for messages that have been modified, changed or falsified.
Thank you.


Reply to: