RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1124387 - virt-manager traceback when wrong LC_CTYPE is set.
Summary: virt-manager traceback when wrong LC_CTYPE is set.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: virt-manager
Version: 6.6
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Giuseppe Scrivano
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-07-29 11:57 UTC by Robin Hack
Modified: 2015-03-05 09:25 UTC (History)
8 users (show)

Fixed In Version: virt-manager-0.9.0-28.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-10-14 06:26:56 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:1447 0 normal SHIPPED_LIVE virt-manager bug fix and enhancement update 2014-10-14 01:05:46 UTC

Description Robin Hack 2014-07-29 11:57:41 UTC
Description of problem:

Version-Release number of selected component (if applicable):
virt-manager-0.9.0-26.el6.x86_64

How reproducible:
always

Steps to Reproduce:
1) # export LC_CTYPE="X"
2) # virt-manager 

Actual results:
Traceback (most recent call last):
  File "/usr/share/virt-manager/virt-manager.py", line 400, in <module>
    main()
  File "/usr/share/virt-manager/virt-manager.py", line 253, in main
    cli.setup_i18n(gettext_app, gettext_dir)
  File "/usr/share/virt-manager/virtManager/cli.py", line 90, in setup_i18n
    locale.setlocale(locale.LC_ALL, '')
  File "/usr/lib64/python2.6/locale.py", line 513, in setlocale
    return _setlocale(category, locale)
locale.Error: unsupported locale setting


Expected results:
No traceback and something nice like on my fedora 20.
(process:11607): Gtk-WARNING **: Locale not supported by C library.
	Using the fallback 'C' locale.


Additional info:
I found this because I was connected from MacOS X

Comment 2 Giuseppe Scrivano 2014-07-29 12:24:49 UTC
that happens only if you pass --debug, right?  Any GTK+ application that I've tested raises this Gtk-WARNING, so it is expected behavior.

What is the value of LC_CTYPE set by the MacOS X terminal?

Comment 3 Robin Hack 2014-07-30 12:08:16 UTC
(In reply to Giuseppe Scrivano from comment #2)
> that happens only if you pass --debug, right?  Any GTK+ application that
> I've tested raises this Gtk-WARNING, so it is expected behavior.
> 
> What is the value of LC_CTYPE set by the MacOS X terminal?

Hi. It's UTF-8.

I see this when I'm connected to rhel server via ssh:

declare -x LC_CTYPE="UTF-8"

Comment 4 Robin Hack 2014-07-30 12:10:19 UTC
(In reply to Giuseppe Scrivano from comment #2)
> that happens only if you pass --debug, right?
No. I just ran virt-manager on commmand line.

> Any GTK+ application that
> I've tested raises this Gtk-WARNING, so it is expected behavior.
I know. This message is fine. I expected something like this. Not traceback at all :).

Comment 5 Giuseppe Scrivano 2014-07-30 19:03:53 UTC
ah, I've tested it with the upstream version and it works as expected (only the GTK+ warning message and no traceback).

The fix seems to be here:

commit 9c23dfa992851ef5b9e9b9da84a0d22e5b4c34c5
Author: Cole Robinson <crobinso>
Date:   Sun Jan 29 16:03:45 2012 -0500

    cli: Skip gettext setup if setting locale fails
    
    Can happen if user provides a busted locale

and it is trivial enough that we can consider it for the next 6.x release.

Comment 6 Robin Hack 2014-07-31 06:18:22 UTC
> and it is trivial enough that we can consider it for the next 6.x release.

When the patch exists and is trivial and we (QA) have time to test it why we (DEVEL+QA) are not able push this to rhel 6.6? I'm just asking.

Comment 7 Giuseppe Scrivano 2014-07-31 14:15:36 UTC
ok, moved back to 6.6 and backport here:

http://post-office.corp.redhat.com/archives/rhvirt-patches/2014-July/msg01391.html

Comment 8 Cui Lei 2014-08-06 09:33:15 UTC
I can reproduce this issue with:
virt-manager-0.9.0-26.el6.x86_64

1.
1) # export LC_CTYPE="X"
2) # virt-manager 
Traceback (most recent call last):
  File "/usr/share/virt-manager/virt-manager.py", line 400, in <module>
    main()
  File "/usr/share/virt-manager/virt-manager.py", line 253, in main
    cli.setup_i18n(gettext_app, gettext_dir)
  File "/usr/share/virt-manager/virtManager/cli.py", line 90, in setup_i18n
    locale.setlocale(locale.LC_ALL, '')
  File "/usr/lib64/python2.6/locale.py", line 513, in setlocale
    return _setlocale(category, locale)
locale.Error: unsupported locale setting

2.
1) # export LC_CTYPE="UTF-8"
2) # virt-manager 
Traceback (most recent call last):
  File "/usr/share/virt-manager/virt-manager.py", line 400, in <module>
    main()
  File "/usr/share/virt-manager/virt-manager.py", line 253, in main
    cli.setup_i18n(gettext_app, gettext_dir)
  File "/usr/share/virt-manager/virtManager/cli.py", line 90, in setup_i18n
    locale.setlocale(locale.LC_ALL, '')
  File "/usr/lib64/python2.6/locale.py", line 513, in setlocale
    return _setlocale(category, locale)
locale.Error: unsupported locale setting

Comment 10 tingting zheng 2014-08-12 02:46:18 UTC
I can reproduce this bug with:
virt-manager-0.9.0-26.el6.x86_64

Tested with:
virt-manager-0.9.0-28.el6.x86_64

Steps:
# export LC_CTYPE="X"
# echo $LC_CTYPE
X
# virt-manager

(virt-manager:22734): Gtk-WARNING **: Locale not supported by C library.
	Using the fallback 'C' locale.


# export LC_CTYPE="UTF-8"
# echo $LC_CTYPE
UTF-8
# virt-manager

(virt-manager:22762): Gtk-WARNING **: Locale not supported by C library.
	Using the fallback 'C' locale.

Refer to the above comments,no traceback and friendly info shows,so move the bug to VERIFIED.

Comment 11 errata-xmlrpc 2014-10-14 06:26:56 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2014-1447.html


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