Bug 873762

Summary: [zh_CN] [zh_TW] installer hangs in Installation Summary when keyboard spoke clicked
Product: [Fedora] Fedora Reporter: Steve Tyler <stephent98>
Component: anacondaAssignee: Vratislav Podzimek <vpodzime>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 18CC: aalam, awilliam, g.kaviyarasu, i18n-bugs, jonathan, kparal, robatino, stephent98, vanmeeuwen+fedora
Target Milestone: ---Keywords: i18n
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: AcceptedBlocker
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-11-23 06:28:38 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 752660    

Description Steve Tyler 2012-11-06 16:28:28 UTC
Description of problem:
The installer hangs in the Installation Summary when the keyboard spoke is clicked, if the install language is:
Chinese (China)
Chinese (Taiwan)

The hang does not occur with:
Dutch
English
Japanese
Spanish

Version-Release number of selected component (if applicable):
anaconda-18.25-1

How reproducible:
Always.

Steps to Reproduce:
1. Select one of these install languages:
   Chinese (Taiwan)
   Chinese (China)
2. Click the keyboard spoke.
  
Actual results:
Hangs in the Installation Summary.
The keyboard spoke is not displayed.

Expected results:
No hang and the keyboard spoke is displayed.

Additional info:

Comment 1 Steve Tyler 2012-11-06 17:49:35 UTC
The hang does not occur with anaconda-18.24-1 on F18-Beta/TC7/Fedora-18-Beta-TC7-x86_64-Live-Desktop.iso.

Tested with:
$ qemu-kvm -m 2048 -hda f18-test-2.img -cdrom ~/xfr/fedora/F18/F18-Beta/TC7/Fedora-18-Beta-TC7-x86_64-Live-Desktop.iso -usb -vga qxl -boot menu=on -usbdevice mouse

Comment 2 Vratislav Podzimek 2012-11-07 09:54:06 UTC
How are you testing anaconda-18.25-1? I cannot reproduce this using our image with updates.img. Of course there is a common (not related to chosen language) short hang when the Installation Summary appears.

Comment 3 Steve Tyler 2012-11-07 13:41:22 UTC
I'm booting Fedora-18-Beta-TC7-x86_64-Live-Desktop.iso in a VM[1], installing koji, downloading anaconda with koji[2], and updating anaconda with yum:

Sometimes I get:
Bug 873767 - UnicodeDecodeError: 'ascii' codec can't decode byte 0xe4 in position 3: ordinal not in range(128)

[1] Command-line:
$ qemu-kvm -m 2048 -hda f18-test-2.img -cdrom ~/xfr/fedora/F18/F18-Beta/TC7/Fedora-18-Beta-TC7-x86_64-Live-Desktop.iso -usb -vga qxl -boot menu=on -usbdevice mouse

[2] anaconda builds on koji:
Information for build anaconda-18.25-1.fc18
ID	364607
http://koji.fedoraproject.org/koji/buildinfo?buildID=364607

Information for build anaconda-18.26-1.fc18
ID	364893
http://koji.fedoraproject.org/koji/buildinfo?buildID=364893

Comment 4 Steve Tyler 2012-11-07 14:27:15 UTC
The hang appears to be a long stall that ends with "An unknown error has occurred" and a UnicodeDecodeError exception.

In one test with anaconda-18.25-1.fc18, there was a 2 min, 33 sec delay after clicking the keyboard spoke until the UnicodeDecodeError exception occurred:

Bug 873767, Comment 16

A duplicate?

Comment 5 Vratislav Podzimek 2012-11-07 17:40:52 UTC
(In reply to comment #4)
> The hang appears to be a long stall that ends with "An unknown error has
> occurred" and a UnicodeDecodeError exception.
> 
> In one test with anaconda-18.25-1.fc18, there was a 2 min, 33 sec delay
> after clicking the keyboard spoke until the UnicodeDecodeError exception
> occurred:
> 
> Bug 873767, Comment 16
> 
> A duplicate?
Probably. It is definitely related. I'll try to reproduce this myself because it needs some debugging. If I cannot reproduce it, I'll send you some instuctions for debugging.

Comment 6 Vratislav Podzimek 2012-11-08 12:36:33 UTC
Fix posted to anaconda-patches list.

Comment 7 Steve Tyler 2012-11-08 13:06:12 UTC
*** Bug 873767 has been marked as a duplicate of this bug. ***

Comment 8 Steve Tyler 2012-11-08 14:39:33 UTC
[master] [PATCH] Encode unicode strings from XklWrapper (#873762)
https://lists.fedorahosted.org/pipermail/anaconda-patches/2012-November/002008.html

Thanks. That was subtle. This bug may have been introduced with the commit[1] to fix:

Bug 872791 - TypeError: Argument 1 does not allow None as a value

Could you take a look at Bug 872791, Comment 46 concerning that hypothesis?

[1] Mark strings at the top of spokes with N_; translate later with _ (#872791).
http://git.fedorahosted.org/cgit/anaconda.git/commit/?id=0d5138002d0f842cacd90562e9b3a96a20329720

Comment 9 Steve Tyler 2012-11-08 15:35:25 UTC
(In reply to comment #8)
> [master] [PATCH] Encode unicode strings from XklWrapper (#873762)
> https://lists.fedorahosted.org/pipermail/anaconda-patches/2012-November/
> 002008.html
> 
> Thanks. That was subtle. This bug may have been introduced with the
> commit[1] to fix:
...

Isn't there a way to do this more generally, so developers don't have to keep track of when foo.encode() is needed and when it is not needed?

-            self._layoutSwitchLabel.set_text(_(LAYOUT_SWITCHING_INFO) % desc)
+            self._layoutSwitchLabel.set_text(_(LAYOUT_SWITCHING_INFO) % \
+                                                 desc.encode("utf-8"))

Comment 10 Steve Tyler 2012-11-08 15:50:15 UTC
Maybe it is not such a widespread problem:

$ egrep -rc 'encode|decode' anaconda-18.27-1/pyanaconda/ | sort | grep -v ':0$'
anaconda-18.27-1/pyanaconda/__init__.py:1
anaconda-18.27-1/pyanaconda/iutil.py:1
anaconda-18.27-1/pyanaconda/keyboard.py:3
anaconda-18.27-1/pyanaconda/localization.py:1

Comment 11 Vratislav Podzimek 2012-11-09 12:12:31 UTC
(In reply to comment #8)
> [master] [PATCH] Encode unicode strings from XklWrapper (#873762)
> https://lists.fedorahosted.org/pipermail/anaconda-patches/2012-November/
> 002008.html
> 
> Thanks. That was subtle. This bug may have been introduced with the
> commit[1] to fix:
> 
> Bug 872791 - TypeError: Argument 1 does not allow None as a value
> 
> Could you take a look at Bug 872791, Comment 46 concerning that hypothesis?
> 
> [1] Mark strings at the top of spokes with N_; translate later with _
> (#872791).
> http://git.fedorahosted.org/cgit/anaconda.git/commit/
> ?id=0d5138002d0f842cacd90562e9b3a96a20329720
Done.

Comment 12 Vratislav Podzimek 2012-11-09 12:16:12 UTC
(In reply to comment #9)
> (In reply to comment #8)
> > [master] [PATCH] Encode unicode strings from XklWrapper (#873762)
> > https://lists.fedorahosted.org/pipermail/anaconda-patches/2012-November/
> > 002008.html
> > 
> > Thanks. That was subtle. This bug may have been introduced with the
> > commit[1] to fix:
> ...
> 
> Isn't there a way to do this more generally, so developers don't have to
> keep track of when foo.encode() is needed and when it is not needed?
> 
> -            self._layoutSwitchLabel.set_text(_(LAYOUT_SWITCHING_INFO) %
> desc)
> +            self._layoutSwitchLabel.set_text(_(LAYOUT_SWITCHING_INFO) % \
> +                                                 desc.encode("utf-8"))
Yeah, I was thinking about it a bit further and I've just posted a new patch to anaconda-patches. Thanks!

Comment 13 Steve Tyler 2012-11-09 13:56:20 UTC
[PATCHv2] Encode unicode strings from XklWrapper (#873762)
https://lists.fedorahosted.org/pipermail/anaconda-patches/2012-November/002028.html

Thanks. It looks like that could have some side-effects:

$ grep -rc switch_to_show_str anaconda-18.27-1/pyanaconda/ | grep -v ':0$'
anaconda-18.27-1/pyanaconda/keyboard.py:2
anaconda-18.27-1/pyanaconda/ui/gui/spokes/keyboard.py:4

Comment 14 Vratislav Podzimek 2012-11-09 14:21:44 UTC
(In reply to comment #13)
> [PATCHv2] Encode unicode strings from XklWrapper (#873762)
> https://lists.fedorahosted.org/pipermail/anaconda-patches/2012-November/
> 002028.html
> 
> Thanks. It looks like that could have some side-effects:
> 
> $ grep -rc switch_to_show_str anaconda-18.27-1/pyanaconda/ | grep -v ':0$'
> anaconda-18.27-1/pyanaconda/keyboard.py:2
These are two lines where switch_to_show_str gets populated.

> anaconda-18.27-1/pyanaconda/ui/gui/spokes/keyboard.py:4
These are lines really using the dict and I believe I've tested all these places to work with the new patch.

Comment 15 Steve Tyler 2012-11-09 19:07:22 UTC
(In reply to comment #14)
> (In reply to comment #13)
> > [PATCHv2] Encode unicode strings from XklWrapper (#873762)
> > https://lists.fedorahosted.org/pipermail/anaconda-patches/2012-November/
> > 002028.html
> > 
> > Thanks. It looks like that could have some side-effects:
> > 
> > $ grep -rc switch_to_show_str anaconda-18.27-1/pyanaconda/ | grep -v ':0$'
> > anaconda-18.27-1/pyanaconda/keyboard.py:2
> These are two lines where switch_to_show_str gets populated.
> 
> > anaconda-18.27-1/pyanaconda/ui/gui/spokes/keyboard.py:4
> These are lines really using the dict and I believe I've tested all these
> places to work with the new patch.

Thanks for checking those.

Comment 16 Steve Tyler 2012-11-09 21:07:47 UTC
Proposing as an F18 Beta Blocker:

1. Cannot be fixed with an update.

2. Per the rationale in Bug 872791, Comment 30, which implicitly amends Alpha Release Criterion 5 to apply "in the case of many non-English languages":
https://fedoraproject.org/wiki/Fedora_18_Alpha_Release_Criteria

The bug can be reproduced with zh_CN and zh_TW, both of which show 97% translation coverage in Master for anaconda at Transifex[1].

Criterion 5 could be quantitatively amended to apply to languages for which the installer translation coverage is above a certain percentage or above the median translation coverage.

[1] The translation coverage was 100% in Master until new strings were added:
https://fedora.transifex.com/projects/p/anaconda/resource/master/

Comment 17 Kamil Páral 2012-11-12 17:27:00 UTC
Discussed at 2012-11-12 QA meeting acting as a blocker review meeting. Accepted as a blocker per criterion  "The installer must be able to complete an installation using the text, graphical and VNC installation interfaces".

Comment 18 Fedora Update System 2012-11-13 01:24:11 UTC
anaconda-18.29-1.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/anaconda-18.29-1.fc18

Comment 19 Fedora Update System 2012-11-13 19:07:22 UTC
Package anaconda-18.29-1.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing anaconda-18.29-1.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-18105/anaconda-18.29-1.fc18
then log in and leave karma (feedback).

Comment 20 Kamil Páral 2012-11-16 12:17:30 UTC
I can no longer reproduce the problem with Beta TC9 (anaconda 18.29), neither on Live nor on netinst, marking as VERIFIED. Steve, please try it as well, thanks.

Comment 21 Steve Tyler 2012-11-16 15:56:38 UTC
Verifying that the keyboard spoke is displayed as expected with F18-Beta-TC9 (with anaconda 18.29). Tested with Live and DVD:

$ qemu-kvm -m 2048 -hda f18-test-1.img -cdrom ~/xfr/fedora/F18/F18-Beta/TC9/Fedora-18-Beta-TC9-x86_64-Live-Desktop.iso -usb -vga qxl -boot menu=on -usbdevice mouse

$ qemu-kvm -m 2048 -hda f18-test-1.img -cdrom ~/xfr/fedora/F18/F18-Beta/TC9/Fedora-18-Beta-TC9-x86_64-DVD.iso -usb -vga qxl -boot menu=on -usbdevice mouse

Comment 22 Adam Williamson 2012-11-23 06:28:38 UTC
18.29.2-1 is currently being pushed stable, closing.

Comment 23 Fedora Update System 2012-11-23 07:49:27 UTC
anaconda-18.29-1.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.