Bug 1016158 - libvirtd dies on bindtextdomain with insufficient error
Summary: libvirtd dies on bindtextdomain with insufficient error
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libvirt
Version: unspecified
Hardware: All
OS: All
unspecified
low
Target Milestone: ---
Assignee: Libvirt Maintainers
QA Contact:
URL:
Whiteboard:
: 1026514 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-07 15:47 UTC by Andreas Fuchs
Modified: 2016-04-14 17:29 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2016-04-14 17:29:12 UTC
Embargoed:


Attachments (Terms of Use)

Description Andreas Fuchs 2013-10-07 15:47:31 UTC
If bindtextdomain failes due to non-existing localization information, libvirtd dies upon startup with a very generic error: 

LC_MESSAGES=non_LANG libvirtd
libvirtd: initialization failed

Instead, libvirtd should fall back to locale "C" or at least give some more meaningful error information.

Small patch introducing both behaviours sent to the mailinglist in parallel.

Comment 1 Eric Blake 2013-10-07 16:26:14 UTC
Mailing list thread, for reference:
https://www.redhat.com/archives/libvir-list/2013-October/msg00296.html

Comment 2 Eric Blake 2013-11-04 21:05:21 UTC
*** Bug 1026514 has been marked as a duplicate of this bug. ***

Comment 3 Cole Robinson 2016-04-12 14:01:21 UTC
I sent a more complete patch:

http://www.redhat.com/archives/libvir-list/2016-April/msg00575.html

Comment 4 Cole Robinson 2016-04-14 17:29:12 UTC
commit e7db22781071a39668276a395fb547c0dd90875d
Author: Cole Robinson <crobinso>
Date:   Tue Apr 12 18:29:52 2016 -0400

    util: Add virGettextInitialize, convert the code
    
    Take setlocale/gettext error handling pattern from tools/virsh-*
    and use it for all standalone binaries via a new shared
    virGettextInitialize routine. The virsh* pattern differed slightly
    from other callers. All users now consistently:
    
    * Ignore setlocale errors. virsh has done this forever, presumably for
      good reason. This has been partially responsible for some bug reports:
    
      https://bugzilla.redhat.com/show_bug.cgi?id=1312688
      https://bugzilla.redhat.com/show_bug.cgi?id=1026514
      https://bugzilla.redhat.com/show_bug.cgi?id=1016158
    
    * Report the failed function name
    * Report strerror


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