Bug 860278

Summary: [abrt] firewalld-0.2.7-1.fc18: locale.py:539:setlocale:Error: unsupported locale setting
Product: [Fedora] Fedora Reporter: Martin <mholec>
Component: firewalldAssignee: Thomas Woerner <twoerner>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 18CC: caf, jpopelka, stephent98, tpelka, twoerner
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:7f9e4c203e8151b57bc8cf91f12c077f05ed2b92
Fixed In Version: firewalld-0.2.9-1.fc18 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-15 12:06:05 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
File: core_backtrace none

Description Martin 2012-09-25 13:04:43 UTC
Version-Release number of selected component:
firewalld-0.2.7-1.fc18

Additional info:
libreport version: 2.0.12
abrt_version:   2.0.11
cmdline:        /usr/bin/python /usr/sbin/firewalld --nofork
kernel:         3.6.0-0.rc6.git0.2.fc18.x86_64

backtrace:
:locale.py:539:setlocale:Error: unsupported locale setting
:
:Traceback (most recent call last):
:  File "/usr/sbin/firewalld", line 32, in <module>
:    from firewall import config
:  File "/usr/lib/python2.7/site-packages/firewall/config/__init__.py", line 22, in <module>
:    locale.setlocale(locale.LC_ALL, "")
:  File "/usr/lib64/python2.7/locale.py", line 539, in setlocale
:    return _setlocale(category, locale)
:Error: unsupported locale setting
:
:Local variables in innermost frame:
:locale: ''
:category: 6

Comment 1 Martin 2012-09-25 13:04:45 UTC
Created attachment 617025 [details]
File: core_backtrace

Comment 2 Jiri Popelka 2012-09-25 13:17:00 UTC
Any idea what you were doing at the time of the crash ?
What's the output of 'locale' command ?

Comment 3 Martin 2012-09-25 18:05:23 UTC
Just firstbooted to latest Fedora 18.

locale:

    locale: Cannot set LC_CTYPE to default locale: No such file or directory
    locale: Cannot set LC_MESSAGES to default locale: No such file or directory
    locale: Cannot set LC_ALL to default locale: No such file or directory
    LANG=cs.UTF-8
    LC_CTYPE="cs.UTF-8"
    LC_NUMERIC="cs.UTF-8"
    LC_TIME="cs.UTF-8"
    LC_COLLATE="cs.UTF-8"
    LC_MONETARY="cs.UTF-8"
    LC_MESSAGES="cs.UTF-8"
    LC_PAPER="cs.UTF-8"
    LC_NAME="cs.UTF-8"
    LC_ADDRESS="cs.UTF-8"
    LC_TELEPHONE="cs.UTF-8"
    LC_MEASUREMENT="cs.UTF-8"
    LC_IDENTIFICATION="cs.UTF-8"
    LC_ALL=

Comment 4 Jiri Popelka 2012-09-26 10:05:21 UTC
cs.UTF-8 is not a correct locale, see 'locale -a | grep cs', that's probably anaconda's fault.

But firewalld shouldn't crash and should use the fallback 'C' locale.

Comment 5 Jiri Popelka 2012-09-26 10:26:50 UTC
Should be fixed upstream with this commit:
http://git.fedorahosted.org/cgit/firewalld.git/commit/?id=5c5eedeb73d79495e9cee2234db3ef8923a8ba5c

Comment 6 Steve Tyler 2012-09-29 04:50:37 UTC
After rebooting from a clean install using Fedora-18-Nightly-20120928.14-x86_64-Live-desktop.iso.

Package: firewalld-0.2.7-1.fc18
OS Release: Fedora release 18 (Spherical Cow)

Comment 7 Chuck Forsberg 2012-10-02 03:34:32 UTC
Happened upon clicking firewall applet

Package: firewall-config-0.2.8-1.fc18
OS Release: Fedora release 18 (Spherical Cow)

Comment 8 Steve Tyler 2012-10-02 04:49:12 UTC
A work-around seems to be to set the Language in "System Settings:Region & Language". After making that change you may need to reboot -- logging out and logging in again is no longer possible if there is only one user ... :-(

Verify with:
$ locale

Comment 9 Steve Tyler 2012-10-02 05:01:54 UTC
Cross-reference:
Bug 858591 - anaconda setting invalid system locale xx.UTF-8 not xx_YY.UTF-8

Comment 10 Steve Tyler 2012-10-02 18:41:37 UTC
(In reply to comment #8)
> A work-around seems to be to set the Language in "System Settings:Region &
> Language".
...

For a more complete work-around: Bug 858591, Comment 29.

Comment 11 Steve Tyler 2012-10-02 19:51:28 UTC
(In reply to comment #5)
> Should be fixed upstream with this commit:
> http://git.fedorahosted.org/cgit/firewalld.git/commit/
> ?id=5c5eedeb73d79495e9cee2234db3ef8923a8ba5c

It might be a good idea to write something to a log file. If the locale is not set or is incorrect, that could indicate a bug. And since firewalld is a security app, a locale error could indicate a hack of some sort ...