Red Hat Bugzilla – 1247915 – When update squid package from squid-3.1.10-29.el6 to squid-3.1.23-9.el6.x86_64. Existing squid processes are not restarted in postuninstall scriptlet.
Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
When update squid package from squid-3.1.10-29.el6 to squid-3.1.23-9.el6.x86_64. Existing squid processes are not restarted in postuninstall scriptlet.
This issue is the duplicate of #1248855. The reason, why the PID file is same, is because, newer installed squid binary has no permissions to stop the old running one.
*** This bug has been marked as a duplicate of bug 1248855 ***
Description of problem: When update squid package from squid-3.1.10-29.el6 to squid-3.1.23-9.el6.x86_64. Existing squid processes are not restarted in postuninstall scriptlet. Version-Release number of selected component (if applicable): squid-3.1.23-9.el6 How reproducible: 100 % Steps to Reproduce: 1. Install squid-3.1.10-29 and start squid service. 2. Check squid process's pids with 'ps auxwww' 2. Update squid package with 'rpm -Uvh squid-3.1.23-9.el6.x86_64.rpm' 3. Check squid process's pids with 'ps auxwww' Actual results: squid processes are not restarted at package update. Expected results: squid processes are restartd at package update. Additional info: - Before update ~~~ # ps auxwww |grep squid root 1505 0.0 0.3 71568 3284 ? Ss 16:50 0:00 squid -f /etc/squid/squid.conf squid 1508 0.1 1.0 74472 10644 ? S 16:50 0:00 (squid) -f /etc/squid/squid.conf squid 1509 0.0 0.1 20084 1064 ? S 16:50 0:00 (unlinkd) root 1512 0.0 0.0 103244 836 pts/0 S+ 16:50 0:00 grep squid ~~~ - Run update ~~~ # rpm -Uvh -vv squid-3.1.23-9.el6.x86_64.rpm : D: erase: %postun(squid-7:3.1.10-29.el6.x86_64) scriptlet start D: erase: %postun(squid-7:3.1.10-29.el6.x86_64) execv(/bin/sh) pid 1522 + '[' 1 -ge 1 ']' + service squid condrestart D: erase: waitpid(1522) rc 1522 status 0 secs 100.115 D: --- h# 285 squid-7:3.1.10-29.el6.x86_64 ~~~ - After update ~~~ # ps auxwww |grep squid root 1505 0.0 0.3 71568 3284 ? Ss 16:50 0:00 squid -f /etc/squid/squid.conf squid 1508 0.0 1.0 74472 10644 ? S 16:50 0:00 (squid) -f /etc/squid/squid.conf squid 1509 0.0 0.1 20084 1064 ? S 16:50 0:00 (unlinkd) root 1590 0.0 0.0 103244 836 pts/0 S+ 16:54 0:00 grep squid ~~~ The PIDs are not changed. In /etc/rc.d/init.d/squid, condrestart() { [ -e /var/lock/subsys/squid ] && restart || : } After update, /var/lock/subsys/squid does not exits. While the update, update process took much time at 'service squid condrestart'. So, stop() function could not kill pre-existing squid process. ~~~ stop() { echo -n $"Stopping $prog: " $SQUID -k check -f $SQUID_CONF >> /var/log/squid/squid.out 2>&1 RETVAL=$? if [ $RETVAL -eq 0 ] ; then $SQUID -k shutdown -f $SQUID_CONF & rm -f /var/lock/subsys/$SQUID timeout=0 while : ; do [ -f /var/run/squid.pid ] || break if [ $timeout -ge $SQUID_SHUTDOWN_TIMEOUT ]; then echo return 1 fi sleep 2 && echo -n "." timeout=$((timeout+2)) done echo_success echo else echo_failure if [ ! -e /var/lock/subsys/$SQUID ]; then RETVAL=0 else rm -f /var/lock/subsys/$SQUID RETVAL=$? fi echo fi return $RETVAL } ~~~ After update, I tried to just do 'service squid restart'. The command returns following error. ~~~ # service squid restart Stopping squid: squid: ERROR: Could not send signal 15 to process 1746: (1) Operation not permitted .................................................. Squid failed to stop in reasonable time and therefore wasn't started. ~~~ On the other hand, downgrade to squid-3.1.10-29.el6 can restart squid process successfully and does not take much time.