Bug 1477308 - Installing new nss-softokn-freebl without updating nspr on a RHEL 7.3.0 system results in rpm and yum being non-functional
Installing new nss-softokn-freebl without updating nspr on a RHEL 7.3.0 syste...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: nss-softokn (Show other bugs)
7.4
Unspecified Unspecified
urgent Severity urgent
: rc
: ---
Assigned To: Daiki Ueno
Hubert Kario
: PrioBumpGSS, Regression, ZStream
: 1476031 (view as bug list)
Depends On:
Blocks: 1420851 1477588 1515890
  Show dependency treegraph
 
Reported: 2017-08-01 14:05 EDT by Kyle Walker
Modified: 2018-05-16 16:19 EDT (History)
22 users (show)

See Also:
Fixed In Version: nss-softokn-3.34.0-0.2.beta1.el7
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1477588 (view as bug list)
Environment:
Last Closed: 2018-04-10 05:44:43 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 3134931 None None None 2017-08-01 14:39 EDT
Red Hat Product Errata RHEA-2018:0679 None None None 2018-04-10 05:46 EDT

  None (edit)
Description Kyle Walker 2017-08-01 14:05:29 EDT
Description of problem:
 The nss-softokn packaging does not have a requirement for a matching nspr package. As a result, the installation of the glibc.i686 package pulls in nss-softokn-freebl, but not the additionally required nspr version.


Version-Release number of selected component (if applicable):
 nss-softokn-freebl-3.28.3-6.el7

How reproducible:
 Easily

Steps to Reproduce:
1. Install a RHEL 7.3 system
2. yum install glibc.i686
3. rpm -qa

Actual results:
 # rpm -qa
 error: Failed to initialize NSS library

Expected results:
 # rpm -qa
 <Return RPM database contents>

Additional info:
 Once the issue has been seen, the yum and rpm utilities are functionally broken. Manually loading the updated nspr library via LD_PRELOAD seems to resolve the condition temporarily, and can be used to update the nspr package manually.
Comment 3 Kyle Walker 2017-08-01 14:18:37 EDT
Issue also presents itself as:

# yum repolist
error: Failed to initialize NSS library
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:

   cannot import name ts

Please install a package which provides this module, or
verify that the module is installed correctly.

It's possible that the above module doesn't match the
current version of Python, which is:
2.7.5 (default, Aug  2 2016, 04:20:16) 
[GCC 4.8.5 20150623 (Red Hat 4.8.5-4)]

If you cannot solve this problem yourself, please go to 
the yum faq at:
  http://yum.baseurl.org/wiki/Faq
  

- Kyle Walker
Comment 7 Stefan Dordevic 2017-08-02 06:33:55 EDT
So this is workaround for broken system.

1. Use wget, or any other way to get the needed nspr package from the repository.
   
   needed package: nspr-4.13.1-1.0.el7_3

2. get the nspr libraries out from rpm

   rpm2cpio nspr-4.13.1-1.0.el7_3.x86_64.rpm |cpio -imdv

3. copy them to /usr/lib64/
 
   cp usr/lib64/* /usr/lib64/

This should solve the problem. Use the proper rpm for architecture of your system.
And make sure you are hitting the right paths also.
Comment 9 Hubert Kario 2017-08-02 08:07:41 EDT
The issue will happen only on systems that are updating nss-softokn-freebl alone and do not have https://rhn.redhat.com/errata/RHEA-2017-0460.html (nspr-4.13.1-1.0.el7_3) installed.
Comment 12 karan singh 2017-09-04 12:07:18 EDT
Guys, i am hitting the same problem on RHEL 7.2 and the solution mentioned above does not fix it.

Any hints


[root@mon-node1 tmp]# rpm2cpio nspr-4.13.1-1.0.el7_3.i686.rpm | cpio -imdv
error: Failed to initialize NSS library
./usr/lib/libnspr4.so
./usr/lib/libplc4.so
./usr/lib/libplds4.so
555 blocks
[root@mon-node1 tmp]# cp usr/lib/* /usr/lib64/
cp: overwrite ‘/usr/lib64/libnspr4.so’? y
cp: overwrite ‘/usr/lib64/libplc4.so’? y
cp: overwrite ‘/usr/lib64/libplds4.so’? y
[root@mon-node1 tmp]#
[root@mon-node1 tmp]#
[root@mon-node1 tmp]# yum repolist
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:

   libplc4.so: wrong ELF class: ELFCLASS32

Please install a package which provides this module, or
verify that the module is installed correctly.

It's possible that the above module doesn't match the
current version of Python, which is:
2.7.5 (default, Oct 11 2015, 17:47:16)
[GCC 4.8.3 20140911 (Red Hat 4.8.3-9)]

If you cannot solve this problem yourself, please go to
the yum faq at:
  http://yum.baseurl.org/wiki/Faq


[root@mon-node1 tmp]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.2 (Maipo)
[root@mon-node1 tmp]# uname -a
Linux mon-node1 3.10.0-327.el7.x86_64 #1 SMP Thu Oct 29 17:29:29 EDT 2015 x86_64 x86_64 x86_64 GNU/Linux
[root@mon-node1 tmp]#
Comment 13 Stanislav Zidek 2017-09-05 06:01:30 EDT
Just a guess - i686 vs. x86_64 architecture? Did you try with x86_64 rpm?
Comment 14 karan singh 2017-09-05 06:28:29 EDT
No, I have not, Could you help me with the correct package download link.
Comment 16 karan singh 2017-09-05 06:58:41 EDT
@Stanislav Zidek 

Thanks a lot, x86_64 rpm worked as expected.
Comment 17 dave 2017-09-06 13:03:17 EDT
We had a similar issue with a new 7.1 host. Initially the PRELOAD did not work. In order to work around this issue, we repulled the latest katello cert and installed that with --force with the LD_PRELOAD=./... 

hope this helps.

Thanks,
Dave
Comment 18 Andreas Karis 2017-09-07 10:54:23 EDT
*** Bug 1476031 has been marked as a duplicate of this bug. ***
Comment 33 errata-xmlrpc 2018-04-10 05:44:43 EDT
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/RHEA-2018:0679

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