Red Hat Bugzilla – Bug 1301908
rpm update hangs when ldconfig is executed in post section
Last modified: 2018-01-01 20:12:49 EST
Description of problem:
When updating from RHEL 7.1 to 7.2 several RPMs need a long time to update (it looks like the update hangs when done via yum)
Version-Release number of selected component (if applicable):
Everytime you update a RHEL 7.1 workstation to RHEL 7.2 via yum update
Steps to Reproduce:
1. Update a RHEL 7.1 workstation to RHEL 7.2 via yum update
Wait time below are taken from yum.log during yum update. While it waits for waitpid, the actual PID it is waiting for (like 2187) is not showing in "ps" any loner, neither is a ldconfig process showing. It looks like e.g. ldconfig is finishing too fast and it runs into a timeout during update.
wait time for kmod-20-5.el7.x86_64:
Jan 26 11:13:05 Updated: kmod-20-5.el7.x86_64
Jan 26 11:23:25 Updated: systemd-219-19.el7.x86_64
wait time for libgovirt-0.3.3-1.el7.x86_64:
Jan 26 11:23:56 Updated: libgovirt-0.3.3-1.el7.x86_64
Jan 26 11:28:07 Installed: geoclue2-2.1.10-2.el7.x86_64
D: %post(libgovirt-0.3.3-1.el7.x86_64): scriptlet start
D: %post(libgovirt-0.3.3-1.el7.x86_64): execv(/sbin/ldconfig) pid 2187
D: %post(libgovirt-0.3.3-1.el7.x86_64): waitpid(2187) rc 2187 status 0
wait time for libGLEW-1.10.0-5.el7.x86_64
Jan 26 11:33:24 Updated: libGLEW-1.10.0-5.el7.x86_64
Jan 26 11:35:24 Updated: pulseaudio-6.0-7.el7.x86_64
D: %post(libGLEW-1.10.0-5.el7.x86_64): scriptlet start
D: %post(libGLEW-1.10.0-5.el7.x86_64): execv(/sbin/ldconfig) pid 3611
D: %post(libGLEW-1.10.0-5.el7.x86_64): waitpid(3611) rc 3611 status 0
wait time for ekiga-4.0.1-5.el7.x86_64
Jan 26 11:36:32 Updated: ekiga-4.0.1-5.el7.x86_64
Jan 26 11:40:33 Updated: 1:NetworkManager-openvpn-1.0.8-1.el7.x86_64
+ /usr/bin/gtk-update-icon-cache --quiet /usr/share/icons/hicolor
D: %post(ekiga-4.0.1-5.el7.x86_64): waitpid(4479) rc 4479 status 0
do we have any update on this? Every RHEL 7.x to 7.2 update I am running takes at least 3 times longer than it should need.
Looking into this it is highly unlikely that the issue is caused the way it is proposed here. According to the waitpid documentation this is just not possible.
Is the rpm process actually hung in waitpid when looked at with strace? The output of the yum log file can be deceiving as some lines might be printed delayed.
My suspicion is that the hang up are actually when updating the rpmdb which is what appends right after running the %post scriptlets. There are know issues that can result in the performance of the rpmdb degrading. Especially many updates to the rpmdb can degrade the internal structures of the bdb. They can be magnified by other circumstances like huge installations and/or many files with the same basename.
If this is the case the performance should improve after rpmdb --rebuild.