Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1698464

Summary: dnf install produces core dump for compat-locales-sap
Product: Red Hat Enterprise Linux 8 Reporter: Andrei Stepanov <astepano>
Component: compat-locales-sapAssignee: Mike FABIAN <mfabian>
Status: CLOSED ERRATA QA Contact: QE Internationalization Bugs <qe-i18n-bugs>
Severity: high Docs Contact:
Priority: unspecified    
Version: 8.0CC: bbarve, eng-i18n-bugs, kanderso, mfabian
Target Milestone: betaFlags: petersen: mirror+
Target Release: 8.1   
Hardware: All   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-11-05 20:39:34 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1702200, 1721236    
Bug Blocks:    
Attachments:
Description Flags
Core file none

Description Andrei Stepanov 2019-04-10 12:18:27 UTC
# dnf install compat-locales-sap
Last metadata expiration check: 0:17:07 ago on Wed 10 Apr 2019 07:52:47 AM EDT.
Package compat-locales-sap-1.0.10-5.el8.noarch is already installed.
Dependencies resolved.
=============================================================================
 Package                Arch       Version           Repository         Size
=============================================================================
Upgrading:
 compat-locales-sap     noarch     1.0.10-6.el8      brew-21054263     301 k

Transaction Summary
=============================================================================
Upgrade  1 Package

Total size: 301 k
Is this ok [y/N]: y
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                     1/1 
  Upgrading        : compat-locales-sap-1.0.10-6.el8.noarch              1/2 
  Cleanup          : compat-locales-sap-1.0.10-5.el8.noarch              2/2 
  Running scriptlet: compat-locales-sap-1.0.10-5.el8.noarch              2/2 
  Running scriptlet: compat-locales-sap-1.0.10-6.el8.noarch              2/2 
/var/tmp/rpm-tmp.ZMuFCU: line 3:  8635 Segmentation fault      (core dumped) /usr/sbin/build-locale-archive <------------ HERE

  Running scriptlet: compat-locales-sap-1.0.10-5.el8.noarch              2/2 
  Verifying        : compat-locales-sap-1.0.10-6.el8.noarch              1/2 
  Verifying        : compat-locales-sap-1.0.10-5.el8.noarch              2/2 

Upgraded:
  compat-locales-sap-1.0.10-6.el8.noarch                                     

Complete!



[root@rhel8-7518 ~]# coredumpctl list
TIME                            PID   UID   GID SIG COREFILE  EXE
Wed 2019-04-10 07:45:46 EDT    7760     0     0  11 present   /usr/sbin/build-locale-archive
Wed 2019-04-10 07:45:52 EDT    7823     0     0  11 present   /usr/sbin/build-locale-archive
Wed 2019-04-10 07:46:01 EDT    7999     0     0  11 present   /usr/sbin/build-locale-archive
Wed 2019-04-10 08:09:59 EDT    8635     0     0  11 present   /usr/sbin/build-locale-archive


[root@rhel8-7518 ~]# coredumpctl list
TIME                            PID   UID   GID SIG COREFILE  EXE
Wed 2019-04-10 07:45:46 EDT    7760     0     0  11 present   /usr/sbin/build-locale-archive
Wed 2019-04-10 07:45:52 EDT    7823     0     0  11 present   /usr/sbin/build-locale-archive
Wed 2019-04-10 07:46:01 EDT    7999     0     0  11 present   /usr/sbin/build-locale-archive
Wed 2019-04-10 08:09:59 EDT    8635     0     0  11 present   /usr/sbin/build-locale-archive
[root@rhel8-7518 ~]# coredumpctl gdb 8635
           PID: 8635 (build-locale-ar)
           UID: 0 (root)
           GID: 0 (root)
        Signal: 11 (SEGV)
     Timestamp: Wed 2019-04-10 08:09:59 EDT (7min ago)
  Command Line: /usr/sbin/build-locale-archive
    Executable: /usr/sbin/build-locale-archive
 Control Group: /user.slice/user-0.slice/session-25.scope
          Unit: session-25.scope
         Slice: user-0.slice
       Session: 25
     Owner UID: 0 (root)
       Boot ID: 9ef1fc1d52d34999bd93708e9c06e0b6
    Machine ID: 530812c90884460a8b782ce3f13f39fb
      Hostname: rhel8-7518
       Storage: /var/lib/systemd/coredump/core.build-locale-ar.0.9ef1fc1d52d34999bd93708e9c06e0b6.8635.1554898199000000.lz4
       Message: Process 8635 (build-locale-ar) of user 0 dumped core.
                
                Stack trace of thread 8635:
                #0  0x000000000044c445 n/a (/usr/sbin/build-locale-archive)
                #1  0x0000000000401626 n/a (/usr/sbin/build-locale-archive)
                #2  0x0000000000408a51 n/a (/usr/sbin/build-locale-archive)

GNU gdb (GDB) Red Hat Enterprise Linux 8.2-6.el8
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/sbin/build-locale-archive...Reading symbols from /usr/lib/debug/usr/sbin/build-locale-archive.debug...done.
done.

warning: core file may not match specified executable file.
[New LWP 8635]
Core was generated by `/usr/sbin/build-locale-archive'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  __strlen_avx2 () at ../sysdeps/x86_64/multiarch/strlen-avx2.S:62
62		VPCMPEQ (%rdi), %ymm0, %ymm1
(gdb) bt
#0  __strlen_avx2 () at ../sysdeps/x86_64/multiarch/strlen-avx2.S:62
#1  0x0000000000405c91 in add_locale_to_archive (ah=ah@entry=0x7fff0028a9d8, 
    name=0x7f7340a7d452 <error: Cannot access memory at address 0x7f7340a7d452>, 
    data=data@entry=0x7fff0028ab30, replace=replace@entry=false)
    at programs/locarchive.c:1182
#2  0x0000000000401626 in fill_archive (primary=0x127aac0 "en_US.utf8", list=0x7fff0028bcd0, 
    nlist=<optimized out>, install_langs_list=0x0, install_langs_count=0, 
    fname=<optimized out>, tmpl_ah=0x7fff0028a9a0)
    at /builddir/build/SOURCES/build-locale-archive.c:393
#3  main (argc=<optimized out>, argv=<optimized out>)
    at /builddir/build/SOURCES/build-locale-archive.c:849
(gdb)

Comment 1 Andrei Stepanov 2019-04-10 12:25:36 UTC
Created attachment 1554216 [details]
Core file

Core file was taken with command:

coredumpctl -o glibc.core dump /usr/sbin/build-locale-archive

Comment 2 Andrei Stepanov 2019-04-10 12:49:25 UTC
[root@rhel8-7518 ~]# rpm -qa kernel-core glibc
kernel-core-4.18.0-80.el8.x86_64
glibc-2.28-45.el8.x86_64
kernel-core-4.18.0-80.11.el8.x86_64



[root@rhel8-7518 ~]# lscpu
Architecture:        x86_64
CPU op-mode(s):      32-bit, 64-bit
Byte Order:          Little Endian
CPU(s):              2
On-line CPU(s) list: 0,1
Thread(s) per core:  1
Core(s) per socket:  1
Socket(s):           2
NUMA node(s):        1
Vendor ID:           GenuineIntel
CPU family:          6
Model:               60
Model name:          Intel Core Processor (Haswell, no TSX, IBRS)
Stepping:            1
CPU MHz:             2599.996
BogoMIPS:            5199.99
Virtualization:      VT-x
Hypervisor vendor:   KVM
Virtualization type: full
L1d cache:           32K
L1i cache:           32K
L2 cache:            4096K
L3 cache:            16384K
NUMA node0 CPU(s):   0,1
Flags:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology cpuid tsc_known_freq pni pclmulqdq vmx ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid xsaveopt arat



[root@rhel8-7518 ~]# cat /etc/yum.repos.d/mini-tps.repo 
###### BASE OS ###########
[rhel-8-base]
name=RHEL-8 BaseOS
baseurl=http://download.devel.redhat.com/rhel-8/nightly/RHEL-8/latest-RHEL-8.1.0/compose/BaseOS/x86_64/os/
enabled=1
gpgcheck=0
skip_if_unavailable=True

[rhel-8-base-source]
name=RHEL-8 BaseOS Source
baseurl=http://download.devel.redhat.com/rhel-8/nightly/RHEL-8/latest-RHEL-8.1.0/compose/BaseOS/source/tree/
enabled=1
gpgcheck=0
skip_if_unavailable=True

[rhel-8-base-debug]
name=RHEL-8 BaseOS Debug
baseurl=http://download.devel.redhat.com/rhel-8/nightly/RHEL-8/latest-RHEL-8.1.0/compose/BaseOS/x86_64/debug/tree/
enabled=1
gpgcheck=0
skip_if_unavailable=True

########### APPSTREAM ##################
[rhel-8-appstream]
name=RHEL-8 AppStream
baseurl=http://download.devel.redhat.com/rhel-8/nightly/RHEL-8/latest-RHEL-8.1.0/compose/AppStream/x86_64/os/
enabled=1
gpgcheck=0
skip_if_unavailable=True

[rhel-8-appstream-debug]
name=RHEL-8 AppStream Debug
baseurl=http://download.devel.redhat.com/rhel-8/nightly/RHEL-8/latest-RHEL-8.1.0/compose/AppStream/x86_64/debug/tree/
enabled=1
gpgcheck=0
skip_if_unavailable=True

[rhel-8-appstream-source]
name=RHEL-8 AppStream Source
baseurl=http://download.devel.redhat.com/rhel-8/nightly/RHEL-8/latest-RHEL-8.1.0/compose/AppStream/source/tree/
enabled=1
gpgcheck=0
skip_if_unavailable=True

########### CRB ##################
[rhel-8-crb]
name=RHEL-8 CRB
baseurl=http://download.devel.redhat.com/rhel-8/nightly/RHEL-8/latest-RHEL-8.1.0/compose/CRB/x86_64/os/
enabled=1
gpgcheck=0
skip_if_unavailable=True

[rhel-8-crb-debug]
name=RHEL-8 CRB Debug
baseurl=http://download.devel.redhat.com/rhel-8/nightly/RHEL-8/latest-RHEL-8.1.0/compose/CRB/x86_64/debug/tree/
enabled=1
gpgcheck=0
skip_if_unavailable=True

[rhel-8-crb-source]
name=RHEL-8 CRB Source
baseurl=http://download.devel.redhat.com/rhel-8/nightly/RHEL-8/latest-RHEL-8.1.0/compose/CRB/source/tree/
enabled=1
gpgcheck=0
skip_if_unavailable=True


############# BUILDROOT ##############

[rhel-8-buildroot]
name=RHEL-8 Buildroot
baseurl=http://download.lab.bos.redhat.com/brewroot/repos/rhel-8.1.0-build/latest/x86_64/
enabled=1
gpgcheck=0
skip_if_unavailable=True



+ brew build repo for https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=21054263

Comment 3 Mike FABIAN 2019-04-11 13:00:13 UTC
Could this be the same as https://bugzilla.redhat.com/show_bug.cgi?id=1688815
?

I.e. the problem occured because glibc-all-langpacks was not installed?

Was glibc-all-langpacks installed on the system?

Comment 4 Andrei Stepanov 2019-04-11 14:08:25 UTC
dnf remove glibc-all-langpacks 
Error: 
 Problem: The operation would result in removing the following protected packages: sudo
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)


It seems that glibc-all-langpacks is always present.

Comment 5 Jens Petersen 2019-04-12 02:27:06 UTC
(I guess you don't have any glibc-langpack-* packages installed,
and therefore dnf doesn't allow you to remove glibc-all-langpacks:
eg if you install glibc-langack-en say first then that should work.
Anyway the current build assumes that glibc-all-langpacks is installed,
so this doesn't help.)

However I don't know how to reproduce your problem with latest RHEL 8.0.
Does it only happen under RHEL 8.1?

Just checking: is the following gdb warning expected?:

> warning: core file may not match specified executable file.

Comment 6 Jens Petersen 2019-04-12 03:00:31 UTC
Okay now I got one core-dump on RHEL 8.0 x86_64 when installing the package:


Reading symbols from /usr/sbin/build-locale-archive...Reading symbols from /usr/lib/debug/usr/sbin/build-locale-archive.debug...done.
done.

warning: core file may not match specified executable file.
[New LWP 13983]
Core was generated by `/usr/sbin/build-locale-archive'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  __strlen_avx2 () at ../sysdeps/x86_64/multiarch/strlen-avx2.S:62
62		VPCMPEQ (%rdi), %ymm0, %ymm1
(gdb) bt
#0  __strlen_avx2 () at ../sysdeps/x86_64/multiarch/strlen-avx2.S:62
#1  0x0000000000405c91 in add_locale_to_archive (ah=ah@entry=0x7fff4f2bdcc8, 
    name=0x7f68276b4342 <error: Cannot access memory at address 0x7f68276b4342>, 
    data=data@entry=0x7fff4f2bde20, replace=replace@entry=false) at programs/locarchive.c:1182
#2  0x0000000000401626 in fill_archive (primary=0x7fff4f2dfe4b "ja_JP.UTF-8", list=0x7fff4f2befc0, 
    nlist=<optimized out>, install_langs_list=0x0, install_langs_count=0, fname=<optimized out>, 
    tmpl_ah=0x7fff4f2bdc90) at /builddir/build/SOURCES/build-locale-archive.c:393
#3  main (argc=<optimized out>, argv=<optimized out>) at /builddir/build/SOURCES/build-locale-archive.c:849

Comment 8 Mike FABIAN 2019-04-12 08:03:55 UTC
https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=21148194

- Remove "Requires: glibc-all-langpacks" again and drop the
  posttrans and postun scripts instead. If these scripts are removed,
  glibc-all-langpacks is not needed anymore.
  This avoids problems with /usr/sbin/build-locale-archive.

Comment 10 Jens Petersen 2019-06-20 04:52:30 UTC
*** Bug 1721236 has been marked as a duplicate of this bug. ***

Comment 11 Jens Petersen 2019-06-20 05:05:22 UTC
I think we should actually move this segfault to glibc since programs should not segfault.

Comment 14 errata-xmlrpc 2019-11-05 20:39:34 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.

https://access.redhat.com/errata/RHBA-2019:3310