Bug 1570924 - No fr_FR.utf8 locale after upgrade makes gnome-terminal impossible to launch
Summary: No fr_FR.utf8 locale after upgrade makes gnome-terminal impossible to launch
Keywords:
Status: CLOSED DUPLICATE of bug 1574222
Alias: None
Product: Fedora
Classification: Fedora
Component: glibc
Version: 28
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Carlos O'Donell
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-04-23 18:15 UTC by Yann Droneaud
Modified: 2018-07-26 11:27 UTC (History)
19 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-04-29 12:17:28 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
typescript from dnf system-upgrade to upgrade Fedora 27 to Fedora 28 (296.00 KB, text/plain)
2018-04-26 10:32 UTC, Yann Droneaud
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1471916 0 high CLOSED Cannot start gnome-terminal when no locale is set 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 1565718 0 unspecified CLOSED After upgrading to F28, my Czech locale is gone 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 1573712 0 unspecified CLOSED Gnome-terminal doesn't start in F28 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 1574222 0 unspecified CLOSED dnf system upgrade forgot langpacks-de 2021-02-22 00:41:40 UTC

Internal Links: 1565718

Description Yann Droneaud 2018-04-23 18:15:57 UTC
After upgrading from Fedora 27 to Fedora 28 with dnf system-upgrade (with --allowerasing to workaround #1553646), I wasn't able to launch Gnome Terminal from Gnome Shell.

Hopefully xterm could be launched, so I could have a look at the error messages reported by gnome-terminal:

> $ gnome-terminal
> # Locale not supported by C library.
>         Using the fallback 'C' locale.
> # Error constructing proxy for org.gnome.Terminal:/org/gnome/Terminal/Factory0: Error calling StartServiceByName for org.gnome.Terminal: Timeout was reached

My current locale is not supported after upgrading to Fedora 28:

> $ locale
> locale: Cannot set LC_ALL to default locale: No such file or directory
> LANG=fr_FR.utf8
> LC_CTYPE="fr_FR.utf8"
> LC_NUMERIC="fr_FR.utf8"
> LC_TIME="fr_FR.utf8"
> LC_COLLATE="fr_FR.utf8"
> LC_MONETARY="fr_FR.utf8"
> LC_MESSAGES="fr_FR.utf8"
> LC_PAPER="fr_FR.utf8"
> LC_NAME="fr_FR.utf8"
> LC_ADDRESS="fr_FR.utf8"
> LC_TELEPHONE="fr_FR.utf8"
> LC_MEASUREMENT="fr_FR.utf8"
> LC_IDENTIFICATION="fr_FR.utf8"
> LC_ALL=

> $ perl -v
> perl: warning: Setting locale failed.
> perl: warning: Please check that your locale settings:
>         LANGUAGE = (unset),
>         LC_ALL = (unset),
>         LANG = "fr_FR.utf8"
>     are supported and installed on your system.
> perl: warning: Falling back to the standard locale ("C").


After manually installing glibc-langpack-fr, gnome-terminal can be launched as expected.

Comment 1 Yann Droneaud 2018-04-24 08:37:51 UTC
I've found related information in Fedora 24 release notes:

https://docs-old.fedoraproject.org/en-US/Fedora/24/html/Release_Notes/sect-Release_Notes-Changes_for_Developers.html#sect-Development-Tools-glibc_langpaks

> glibc language subpackages
> glibc provides localized strings, totalling over 100MB on disk in the locale archive at /usr/lib/locale/locale-archive. Fedora now provides glibc translations for each locale in a separate package, reducing unnecessary disk usage. Use the glibc-all-langpacks package to provide all locales, or install the glibc-langpack-language code package for a given language code.

Since I've upgraded from Fedora 24 to F25 to F26 to F27 to F28, I should have encounter this missing glibc-langpack-fr issue earlier.

Comment 2 Carlos O'Donell 2018-04-25 16:26:44 UTC
(In reply to Yann Droneaud from comment #1)
> I've found related information in Fedora 24 release notes:
> 
> https://docs-old.fedoraproject.org/en-US/Fedora/24/html/Release_Notes/sect-
> Release_Notes-Changes_for_Developers.html#sect-Development-Tools-
> glibc_langpaks
> 
> > glibc language subpackages
> > glibc provides localized strings, totalling over 100MB on disk in the locale archive at /usr/lib/locale/locale-archive. Fedora now provides glibc translations for each locale in a separate package, reducing unnecessary disk usage. Use the glibc-all-langpacks package to provide all locales, or install the glibc-langpack-language code package for a given language code.
> 
> Since I've upgraded from Fedora 24 to F25 to F26 to F27 to F28, I should
> have encounter this missing glibc-langpack-fr issue earlier.

I would really like to have known your *exact* installed packages when the failure occurred. The reason is probably that DNF with --allowerasing managed to remove your glibc langpacks or downgrade them to the minimal language pack e.g. C/POSIX/C.UTF-8.

This downgrade should not have stopped you from launching gnome-terminal, please file a bug against gnome-terminal, they should fall back to try C.UTF-8 before failing. I think there was a bug fixed in this area last year.

Other than that I have no recommendations.

What does 'rpm -qa | grep glibc' show?

Comment 3 Florian Weimer 2018-04-25 16:35:35 UTC
The output of:

sudo grep glibc /var/log/dnf.rpm.log* 

could be relevant as well.  We need to try to replicate what was installed before and figure out why DNF carried out the update the way it did.

Comment 4 Yann Droneaud 2018-04-26 10:32:23 UTC
Created attachment 1427123 [details]
typescript from dnf system-upgrade to upgrade Fedora 27 to Fedora 28

(In reply to Carlos O'Donell from comment #2)
> 
> I would really like to have known your *exact* installed packages when the
> failure occurred. The reason is probably that DNF with --allowerasing
> managed to remove your glibc langpacks or downgrade them to the minimal
> language pack e.g. C/POSIX/C.UTF-8.
>

Please find the 'typescript' that record dnf system-upgrade download --releasever=28 --allowerasing output for my upgrade from Fedora 27 to Fedora 28.

> What does 'rpm -qa | grep glibc' show?

I have the following (now):

glibc-debuginfo-common-2.27-8.fc28.x86_64
glibc-2.27-8.fc28.i686
glibc-langpack-en-2.27-8.fc28.x86_64
glibc-headers-2.27-8.fc28.x86_64
glibc-langpack-fr-2.27-8.fc28.x86_64
glibc-common-2.27-8.fc28.x86_64
glibc-devel-2.27-8.fc28.x86_64
glibc-static-2.27-8.fc28.x86_64
glibc-debuginfo-2.27-8.fc28.x86_64
glibc-2.27-8.fc28.x86_64

Comment 5 Florian Weimer 2018-04-26 13:11:24 UTC
Do you know if you had a /usr/lib/locale/fr_FR/LC_TELEPHONE file before you started the upgrade?

I suspect that you might have files lying around from a previously aborted upgrade, so that the RPM database entry for glibc-langpack-fr are missing.  We added alternative month names to glibc, so the old files are no longer compatible, and they were not replaced during the upgrade because of the missing package database entry for glibc-langpack-fr.

Comment 6 Yann Droneaud 2018-04-26 19:24:11 UTC
(In reply to Florian Weimer from comment #5)
> Do you know if you had a /usr/lib/locale/fr_FR/LC_TELEPHONE file before you
> started the upgrade?
>

Unfortunately, I don't have the backup for the full filesystem :(

But I have a copy of the RPM database when the system was running Fedora 26:

glibc-2.25-13.fc26.i686
glibc-debuginfo-common-2.25-13.fc26.x86_64
glibc-common-2.25-13.fc26.x86_64
glibc-langpack-en-2.25-13.fc26.x86_64
glibc-devel-2.25-13.fc26.x86_64
glibc-2.25-13.fc26.x86_64
glibc-debuginfo-2.25-13.fc26.x86_64
glibc-static-2.25-13.fc26.x86_64
glibc-headers-2.25-13.fc26.x86_64

As you can see, glibc-langpack-fr was not present on my Fedora 26 installation.
And this is unbelievable because I'm using the fr_FR.UTF-8 locale from day one, and I haven't noticed any issue of the lack of glibc-langpack-fr.

Comment 7 Carlos O'Donell 2018-04-26 19:37:11 UTC
(In reply to Yann Droneaud from comment #6)
> (In reply to Florian Weimer from comment #5)
> > Do you know if you had a /usr/lib/locale/fr_FR/LC_TELEPHONE file before you
> > started the upgrade?
> >
> 
> Unfortunately, I don't have the backup for the full filesystem :(
> 
> But I have a copy of the RPM database when the system was running Fedora 26:
> 
> glibc-2.25-13.fc26.i686
> glibc-debuginfo-common-2.25-13.fc26.x86_64
> glibc-common-2.25-13.fc26.x86_64
> glibc-langpack-en-2.25-13.fc26.x86_64
> glibc-devel-2.25-13.fc26.x86_64
> glibc-2.25-13.fc26.x86_64
> glibc-debuginfo-2.25-13.fc26.x86_64
> glibc-static-2.25-13.fc26.x86_64
> glibc-headers-2.25-13.fc26.x86_64
> 
> As you can see, glibc-langpack-fr was not present on my Fedora 26
> installation.
> And this is unbelievable because I'm using the fr_FR.UTF-8 locale from day
> one, and I haven't noticed any issue of the lack of glibc-langpack-fr.

That is odd. Perhaps you had a left-over /usr/lib/locale/locale-archive which contained an archive copy of fr_FR.UTF-8.

It's very odd to tell exactly what went wrong here. Thank you for the bug report, but for now I don't know if we'll ever know what really happened, but the report helps us count how many of these show up and to see a pattern in the reports.

Should we mark this CLOSED/INSUFFICIENT_DATA?

Comment 8 Yann Droneaud 2018-04-27 09:21:01 UTC
(In reply to Carlos O'Donell from comment #7)

> It's very odd to tell exactly what went wrong here. Thank you for the bug
> report, but for now I don't know if we'll ever know what really happened,
> but the report helps us count how many of these show up and to see a pattern
> in the reports.
> 
> Should we mark this CLOSED/INSUFFICIENT_DATA?

I think so.

Comment 9 Florian Weimer 2018-04-29 12:17:28 UTC
(In reply to Yann Droneaud from comment #6)
> As you can see, glibc-langpack-fr was not present on my Fedora 26
> installation.
> And this is unbelievable because I'm using the fr_FR.UTF-8 locale from day
> one, and I haven't noticed any issue of the lack of glibc-langpack-fr.

The only explanation I have is that the RPM database and the disk contents does not match, and the locale files (either the locale archive or the broken-out files for fr_FR) are not known to RPM.

This worked just fine until we changed the locale format for the alternative month names, at which point glibc stopped using the locale files (all of them).  The inconsistency could have been introduced much earlier than that.

Comment 10 rmatts 2018-05-01 21:16:27 UTC
I just upgraded from f27 to f28, and I also had this problem. In my case I had to install the glibc-langpack-pt.x86_64 2.27-8.fc28 package in order to be able to launch gnome-terminal and also to get rid of several error messages related to the missing package ("Failed to set locale, defaulting to C" when running dnf, for example).

Comment 11 Yann Droneaud 2018-05-02 13:02:36 UTC
Same issue in #1573712

Comment 12 Tobias Jungel 2018-05-03 18:25:47 UTC
#metoo and I can confirm that I had an orphan /usr/lib/locale/locale-archive. Had to manually reinstall the according langpack. I just wonder when that one went missing. At least I don't see the removal in the logs.

Comment 13 Christian Ciach 2018-05-03 20:41:03 UTC
Just another #metoo. Happened to me and my colleagues after updating from Fedora 27 to 28. I too have the file /usr/lib/locale/locale-archive with a modified-date of 2016-06-07.

Manually installing glibc-langpack-de did the trick for me, too.

Comment 14 Zbigniew Luszpinski 2018-05-05 20:09:47 UTC
#metoo Happened after upgrade from F27 to F28. In F27 no errors. After upgrade to F28 got errors on login, su and with every command issued:
locale: Cannot set LC_ALL to default locale: No such file or directory
Failed to set locale, defaulting to C
-bash: warning: setlocale: LC_TIME: cannot change locale (pl_PL.UTF-8)

I have this file:
-rw-r--r--. 1 root root 107M 2016-06-07  /usr/lib/locale/locale-archive

Solution:
dnf install glibc-langpack-pl
to bring back Polish locale.

Comment 15 LuisFer 2018-05-06 12:06:33 UTC
Thanks to Zbigniew Luszpinski 
for spanish dnf install glibc-langpack-es

Comment 16 Herald van der Breggen 2018-05-06 13:04:28 UTC
Same problem here, needed to install glibc-langpack-nl. That fixed the locale warnings.

After the upgrade to F28 I can still not log in with a gnome session, needed to fall back to KDE Plasma. Found traces of a crashing gnome-shell. Still not sure how to fix that. Worst upgrade experience of the last few years...

Comment 17 Herald van der Breggen 2018-05-06 13:14:59 UTC
(In reply to Herald van der Breggen from comment #16)
> After the upgrade to F28 I can still not log in with a gnome session, needed
> to fall back to KDE Plasma. Found traces of a crashing gnome-shell. 

See https://bugzilla.redhat.com/show_bug.cgi?id=1573683#c21

Comment 18 Yann Droneaud 2018-05-06 14:55:18 UTC
May be this bug could be reopened, and added to the Common Fedora 28 bugs ?
https://fedoraproject.org/wiki/Common_F28_bugs

Comment 19 Florian Weimer 2018-05-06 15:23:25 UTC
(In reply to Yann Droneaud from comment #18)
> May be this bug could be reopened, and added to the Common Fedora 28 bugs ?
> https://fedoraproject.org/wiki/Common_F28_bugs

It's not the result of a glibc bug, it's a DNF/RPM issue, where the RPM database went out of sync years ago with the disk contents.  It's not really something we can fix on the glibc side.

Comment 20 Germano Massullo 2018-05-07 14:31:23 UTC
I had the same problem after F27->F28 upgrade.
I solved by installing langpacks-en langpacks-it which triggered installation of dependencies
drascula-it 
glibc-langpack-it
man-pages-it
tesseract-langpack-ita 
hunspell-en

Comment 21 Germano Massullo 2018-05-07 14:35:58 UTC
(In reply to Germano Massullo from comment #20)
> I had the same problem after F27->F28 upgrade.
> [...]

I meant that I had the same "locale" problem. My system is Fedora KDE Plasma

Comment 22 Carlos O'Donell 2018-05-10 14:22:14 UTC

*** This bug has been marked as a duplicate of bug 1574222 ***


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