cupsys upgrade error (cupsys won't stop)

Bug #11037 reported by Sebastien Bacher
20
Affects Status Importance Assigned to Milestone
cupsys (Ubuntu)
Fix Released
Critical
LaMont Jones

Bug Description

Installation de la nouvelle version du fichier de configuration
/etc/init.d/cupsys ...
Hmm, cupsys won't stop... I wait 5 seconds...
Retrying to stop...
Hmm, cupsys (or some forked processes) won't stop. Please stop them manually.
dpkg : erreur de traitement de cupsys (--configure) :
 le sous-processus post-installation script a retourné une erreur de sortie d'état 1

Revision history for this message
Matt Zimmerman (mdz) wrote :

*** Bug 11138 has been marked as a duplicate of this bug. ***

Revision history for this message
Matt Zimmerman (mdz) wrote :

Seems to break upgrades, so increasing severity

Revision history for this message
LaMont Jones (lamont) wrote :

Fixed in 1.1.20final+rc1-10ubuntu7 (by ignoring errors in the stop half of restart)

Revision history for this message
Matt Zimmerman (mdz) wrote :

Reopening, see bug #13814

Revision history for this message
Matt Zimmerman (mdz) wrote :

*** Bug 13814 has been marked as a duplicate of this bug. ***

Revision history for this message
Michael K. Edwards (m-k-edwards) wrote :

cupsys.postinst should use pidof consistently instead of grepping ps output. It
should probably also sleep after kill -9. Here's a pseudo-patch (I'm not at a
debian/ubuntu box at the moment):

      # Check cupsys is really stopped... stupid
- if [ -n "`ps aux | grep /usr/sbin/cupsd | grep -v grep`" ]; then
+ if [ -n "`pidof /usr/sbin/cupsd`" ]; then
      echo "Hmm, cupsys won't stop... I wait 5 seconds..."
      sleep 5
- if [ -n "`ps aux | grep /usr/sbin/cupsd | grep -v grep`" ]; then
+ if [ -n "`pidof /usr/sbin/cupsd`" ]; then
         echo "Retrying to stop..."
        kill -9 `pidof /usr/sbin/cupsd` || true
+ sleep 5
      fi
  fi
- if [ -n "`ps aux | grep /usr/sbin/cupsd | grep -v grep`" ]; then
+ if [ -n "`pidof /usr/sbin/cupsd`" ]; then
      echo "Sorry, cupsys (or some forked processes) won't stop. Please stop
them manually."
      exit 1
  fi

Or it could use killall -clean cupsd. Either way, I actually think the
"processes won't stop test" is silly after a kill -9.

Revision history for this message
LaMont Jones (lamont) wrote :

Fixed in 1.1.23-1ubuntu11, by using pidof as below, and just not
checking/exiting afterwards.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.