Bug 589768 - mkdumprd should restore ld.so.cache rather than re-generate it
Summary: mkdumprd should restore ld.so.cache rather than re-generate it
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kexec-tools (Show other bugs)
(Show other bugs)
Version: 5.5
Hardware: All Linux
low
low
Target Milestone: rc
: ---
Assignee: Cong Wang
QA Contact: Chao Ye
URL:
Whiteboard:
Keywords:
Depends On:
Blocks: 602785
TreeView+ depends on / blocked
 
Reported: 2010-05-06 20:27 UTC by Dave Maley
Modified: 2018-11-14 19:37 UTC (History)
3 users (show)

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: ---


Attachments (Terms of Use)
save/restore ld.so.cache in mkdumprd (892 bytes, patch)
2010-05-06 20:27 UTC, Dave Maley
no flags Details | Diff


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:0061 normal SHIPPED_LIVE kexec-tools bug fix update 2011-01-12 17:22:27 UTC

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


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