Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 589768

Summary: mkdumprd should restore ld.so.cache rather than re-generate it
Product: Red Hat Enterprise Linux 5 Reporter: Dave Maley <dmaley>
Component: kexec-toolsAssignee: Cong Wang <amwang>
Status: CLOSED ERRATA QA Contact: Chao Ye <cye>
Severity: low Docs Contact:
Priority: low    
Version: 5.5CC: cye, qcai, rkhan
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 602785 (view as bug list) Environment:
Last Closed: 2011-01-13 23:18:55 UTC Type: ---
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:    
Bug Blocks: 602785    
Attachments:
Description Flags
save/restore ld.so.cache in mkdumprd none

Description Dave Maley 2010-05-06 20:27:36 UTC
Created attachment 412159 [details]
save/restore ld.so.cache in mkdumprd

Description of problem:
When mkdumprd is run there's an ldconfig -l call to run ldd with a different cache, and then another ldconfig call follows to re-generate the cache.  This can present problems when mkdumprd is run during boot.  The kdump service (S20) is started before autofs (S28), so when ldconfig is run it will remove any symlinks to shared libs which reside on autofs managed filesystems.

To resolve this we should instead save/restore the original ld.so.cache.  This way we ensure we end up getting back to the original cache even if network filesystems aren't yet available to us.


Version-Release number of selected component (if applicable):
kexec-tools-1.102pre-96.el5


How reproducible:
100%


Steps to Reproduce:
1. install shared libs on fs managed by autofs
2. touch /etc/kdump.conf
3. reboot


Actual results:
symlinks to shared libs on autofs managed fs's are gone


Expected results:
symlinks are preserved


Additional info:

Comment 2 Cong Wang 2010-06-18 07:03:54 UTC
Dave, I don't understand the problem here.
ldconfig remove symlinks if they are not cached??

Comment 3 Cong Wang 2010-06-18 07:31:14 UTC
Ok, understand now. I will take this patch.

Comment 7 Chao Ye 2010-10-14 07:37:31 UTC
Tested with kexec-tools-1.102pre-96.el5:
================================================
[root@dhcp-65-178 derek]# cat /etc/ld.so.conf
include ld.so.conf.d/*.conf
[root@dhcp-65-178 derek]# cat /etc/ld.so.conf.d/qt-i386.conf 
/usr/lib/qt-3.3/lib
[root@dhcp-65-178 derek]# cp /etc/ld.so.cache /etc/ld.so.cache.bak
[root@dhcp-65-178 derek]# md5sum /etc/ld.so.cache.bak
88e02a822f8319996944a7eef766a8b9  /etc/ld.so.cache.bak
[root@dhcp-65-178 derek]# vim /etc/ld.so.conf.d/qt-i386.conf 
[root@dhcp-65-178 derek]# cat /etc/ld.so.conf.d/qt-i386.conf 
/usr/lib/qt-3.3/lib/error
[root@dhcp-65-178 derek]# touch /etc/kdump.conf
[root@dhcp-65-178 derek]# serviceconf 
NetworkManager
NetworkManager is stopped
chargen-dgram
xinetd (pid  2965) is running...
NetworkManager
NetworkManager is stopped
NetworkManager
NetworkManager is stopped
chargen-dgram
xinetd (pid  2965) is running...
kdump
Kdump is operational
kdump
Kdump is operational
kdump
Kdump is operational
[root@dhcp-65-178 derek]# md5sum /etc/ld.so.cache
5f7c521284b37f3cbdec710fb83241e9  /etc/ld.so.cache
--------------------------------------
The original ld.so.cache md5 is 88e02a822f8319996944a7eef766a8b9, after kdump restarted, it changed to 5f7c521284b37f3cbdec710fb83241e9.




Verified with kexec-tools-1.102pre-108.el5:
================================================
[root@dhcp-65-178 derek]# vim /etc/ld.so.conf.d/qt-i386.conf 
[root@dhcp-65-178 derek]# cat /etc/ld.so.conf.d/qt-i386.conf
/usr/lib/qt-3.3/lib
[root@dhcp-65-178 derek]# rpm -Uvh /boot/kexec-tools-1.102pre-108.el5.i386.rpm 
Preparing...                ########################################### [100%]
   1:kexec-tools            ########################################### [100%]
[root@dhcp-65-178 derek]# touch /etc/kdump.conf
[root@dhcp-65-178 derek]# cp /etc/ld.so.cache /etc/ld.so.cache.bak96
[root@dhcp-65-178 derek]# md5sum /etc/ld.so.cache.bak96
5f7c521284b37f3cbdec710fb83241e9  /etc/ld.so.cache.bak96
[root@dhcp-65-178 derek]# serviceconf 
NetworkManager
NetworkManager is stopped
chargen-dgram
xinetd (pid  2965) is running...
NetworkManager
NetworkManager is stopped
NetworkManager
NetworkManager is stopped
chargen-dgram
xinetd (pid  2965) is running...
kdump
Kdump is operational
kdump
Kdump is operational
kdump
Kdump is operational
[root@dhcp-65-178 derek]# md5sum /etc/ld.so.cache
5f7c521284b37f3cbdec710fb83241e9  /etc/ld.so.cache
--------------------------------------
The original ld.so.cache md5 is 5f7c521284b37f3cbdec710fb83241e9, after kdump restarted, it changed to 5f7c521284b37f3cbdec710fb83241e9.


Change status to VERIFIED.

Comment 9 errata-xmlrpc 2011-01-13 23:18:55 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0061.html