Unable to run programs "yum", "rhn-profile-sync", "rhn_check" - Segmentation fault (core dumped).
Environment
- Red Hat Enterprise Linux 6
Issue
- Programs "yum" , "rhn-profile-sync" and "rhn_check" fail with the error "Segmentation fault (core dumped)".
Resolution
Remove the symlink to "libz" version in "/usr/local/lib" directory and create the symlink to the correct "libz" version in "/lib64" directory.
[~] # cd /usr/local/lib
[/usr/local/lib] # ln -s /lib64/libz.so.1 libz.so.1.2.3
[/usr/local/lib] # rm libz.so
[/usr/local/lib] # rm libz.so.1
[/usr/local/lib] # ln -s libz.so.1.2.3 libz.so
[/usr/local/lib] # ln -s libz.so.1.2.3 libz.so.1
Root Cause
- There are two different "libz" libraries installed on the system. One is located in "/usr/local/lib" directory and the other one in "/lib64" directory. Programs like "yum" rely on the specific version which is installed in "/lib64" directory.
Diagnostic Steps
In sosreport, check "sos_commands/libraries/ldconfig_-p_-N_-X":
host [~/sosreport/sos_commands/libraries] # cat ldconfig_-p_-N_-X
626 libs found in cache `/etc/ld.so.cache'
libz.so.1 (libc6,x86-64) => /usr/local/lib/libz.so.1
libz.so.1 (libc6,x86-64) => /lib64/libz.so.1
libz.so (libc6,x86-64) => /usr/local/lib/libz.so
Run "strace yum update":
open("/var/cache/yum/x86_64/6Server/clone-rhel-x86_64-server-6-august-06-2013/primary.xml.gz", O_RDONLY) = 6
lseek(6, 0, SEEK_CUR) = 0
read(6, "\37\213\10\0\0\0\0\0\0\0\354\275{w\3336\3267\372\277?\5W\316Zg\3225\221L\360\316"..., 8192) = 8192
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV (core dumped) +++
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
