Bug 1312688 - "libvirtd: initialization failed" if there is no english langpack
Summary: "libvirtd: initialization failed" if there is no english langpack
Alias: None
Product: Fedora
Classification: Fedora
Component: libvirt
Version: rawhide
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Libvirt Maintainers
QA Contact: Fedora Extras Quality Assurance
Depends On:
Blocks: TRACKER-bugs-affecting-libguestfs
TreeView+ depends on / blocked
Reported: 2016-02-28 23:06 UTC by Richard W.M. Jones
Modified: 2016-03-17 10:16 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2016-03-16 23:40:10 UTC
Type: Bug

Attachments (Terms of Use)

Description Richard W.M. Jones 2016-02-28 23:06:34 UTC
Description of problem:

In Rawhide, glibc doesn't install the English locale by default.
This stops libvirtd from starting up:

$ sudo libvirtd --help
libvirtd: initialization failed

but after installing glibc-langpack-en, it works:

$ sudo libvirtd --help

  libvirtd [options]

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

(although this is arm 64 bit, I think this would affect any arch)

How reproducible:

100% probably?

Steps to Reproduce:

Upgrade libvirt from F23 -> F24.

Comment 1 Daniel Berrangé 2016-02-29 13:53:07 UTC
That error message comes from daemon/libvirtd.c in this code:

    if (setlocale(LC_ALL, "") == NULL ||
        bindtextdomain(PACKAGE, LOCALEDIR) == NULL ||
        textdomain(PACKAGE) == NULL ||
        virInitialize() < 0) {
        fprintf(stderr, _("%s: initialization failed\n"), argv[0]);

Presumably one of those 3 locale related functions is now failing, but I wonder why the would fail ?

Comment 2 Richard W.M. Jones 2016-02-29 15:24:22 UTC
Started a thread upstream to discuss what to do:


Comment 3 Richard W.M. Jones 2016-02-29 15:25:23 UTC
setlocale fails, the others are successful.

Comment 4 Cole Robinson 2016-03-16 23:38:12 UTC
Rich, wasn't this get fixed on the fedora glibc side? any idea if we still need libvirt patching?

Comment 5 Cole Robinson 2016-03-16 23:40:10 UTC
I see Jan's comment on libvirt-list about this Fedora upgrade bug: https://bugzilla.redhat.com/show_bug.cgi?id=1312103

Maybe there was a packaging issue too which prevented any locale from being available. I'll close this bug, but anyone reopen if we still need to patch libvirt

Comment 6 Richard W.M. Jones 2016-03-17 10:16:35 UTC
Yes this is fixed in glibc.  Probably best to continue this
on the mailing list (see comment 2).

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