package couchdb failed to purge

Bug #387945 reported by Martin Pitt
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
desktopcouch
Fix Released
Undecided
Unassigned
couchdb (Ubuntu)
Fix Released
Undecided
Chad Miller

Bug Description

Binary package hint: couchdb

When installing couchdb, it creates a system wide instance. When purging it, it fails to stop this, so that after installation, processes are left over:

$ ps aux|grep couch
couchdb 11689 0.0 0.0 4024 640 ? S 16:21 0:00 /bin/sh -e /usr/bin/couchdb -c \"/etc/couchdb/default.ini\" -c \"/etc/couchdb/local.ini\" -b -r 5 -p /var/run/couchdb/couchdb.pid -o /dev/null -e /dev/null -R
couchdb 11735 0.0 0.0 4024 356 ? S 16:21 0:00 /bin/sh -e /usr/bin/couchdb -c \"/etc/couchdb/default.ini\" -c \"/etc/couchdb/local.ini\" -b -r 5 -p /var/run/couchdb/couchdb.pid -o /dev/null -e /dev/null -R
couchdb 11736 0.0 0.6 114336 12888 ? Sl 16:21 0:00 /usr/lib/erlang/erts-5.7.2/bin/beam.smp -Bd -K true -- -root /usr/lib/erlang -progname erl -- -home /var/lib/couchdb -noshell -noinput -smp auto -sasl errlog_type error -pa /usr/lib/couchdb/erlang/lib/couch-0.9.0/ebin /usr/lib/couchdb/erlang/lib/mochiweb-r97/ebin /usr/lib/couchdb/erlang/lib/ibrowse-1.4.1/ebin -eval application:load(ibrowse) -eval application:load(crypto) -eval application:load(couch) -eval crypto:start() -eval ibrowse:start() -eval couch_server:start([ "/etc/couchdb/default.ini", "/etc/couchdb/local.ini"]), receive done -> done end. -pidfile /var/run/couchdb/couchdb.pid -heart
couchdb 11745 0.0 0.0 3788 512 ? Ss 16:21 0:00 heart -pid 11736 -ht 11

and the package fails to purge, since the couchdb user cannot be removed:

userdel: Benutzer couchdb ist derzeit angemeldet
/usr/sbin/deluser: »/usr/sbin/userdel couchdb« gab den Fehlercode 8 zurück. Programmende.
dpkg: Fehler beim Bearbeiten von couchdb (--purge):
 Unterprozess post-removal script gab den Fehlerwert 1 zurück

Sorry for German, it means that the "couchdb" user is currently logged in, and that userdel failed because of that.

Also, packages should not remove system accounts in the first place on removal, for various reason.

ProblemType: Package
Architecture: amd64
Date: Tue Jun 16 16:29:10 2009
DistroRelease: Ubuntu 9.10
ErrorMessage: Unterprozess post-removal script gab den Fehlerwert 1 zurück
Package: couchdb (not installed)
ProcVersionSignature: Ubuntu 2.6.30-9.10kms5-generic
SourcePackage: couchdb
Title: package couchdb (not installed) failed to install/upgrade: Unterprozess post-removal script gab den Fehlerwert 1 zurück
Uname: Linux 2.6.30-9-generic x86_64

Related branches

Revision history for this message
Martin Pitt (pitti) wrote :
Elliot Murphy (statik)
Changed in couchdb (Ubuntu):
assignee: nobody → Elliot Murphy (statik)
Revision history for this message
Elliot Murphy (statik) wrote :

I've confirmed this problem still exists with couchdb 0.9.0-2ubuntu5

Changed in couchdb (Ubuntu):
status: New → Confirmed
Revision history for this message
Elliot Murphy (statik) wrote :

I found this page discussing whether or not it is a good idea to delete system accounts when purging: http://wiki.debian.org/AccountHandlingInMaintainerScripts.

However, it seems like the bigger and more serious problem is that '/etc/init.d/couchdb stop' does not seem to actually stop any of the couchdb processes.

Revision history for this message
Martin Pitt (pitti) wrote : Re: [Bug 387945] Re: package couchdb failed to purge

Elliot Murphy [2009-08-23 15:54 -0000]:
> I found this page discussing whether or not it is a good idea to delete
> system accounts when purging:
> http://wiki.debian.org/AccountHandlingInMaintainerScripts.

Don't remove system accounts, especially not if you store files owned
by that account.

> However, it seems like the bigger and more serious problem is that
> '/etc/init.d/couchdb stop' does not seem to actually stop any of the
> couchdb processes.

Right.

Revision history for this message
Elliot Murphy (statik) wrote :

Hi Chad, a fun one for you based on our discussion today.

Changed in couchdb (Ubuntu):
assignee: Elliot Murphy (statik) → Chad Miller (cmiller)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package couchdb - 0.10.0~svn809550-0ubuntu1

---------------
couchdb (0.10.0~svn809550-0ubuntu1) karmic; urgency=low

  * New snapshot of couchdb 0.10.x stable prerelease branch (LP: #421971)
    - fixes a process leak in local changes feed consumer
    - disables internal gen_server timeouts
    - minimize the number of full commits
    - follow 302 redirects during replication
    - more precise and accurate calculation of replication progress
    - added crypto export notice to README
    - Fix for problem where HEAD requests that would have a chunked responses
      would send the chunked response anyway.
    - send deleted docs to changes filters and protect against missing
      filters.
    - merge cascading auth patch by Jason Davies, closes COUCHDB-478
  * Drop debian/patches/oauth_ini_users.patch as it has been merged upstream.
  * debian/postrm
    - don't try to delete couchdb system user/group (LP: #387945)

 -- Elliot Murphy <email address hidden> Mon, 31 Aug 2009 09:06:26 -0400

Changed in couchdb (Ubuntu):
status: Confirmed → Fix Released
Elliot Murphy (statik)
Changed in desktopcouch:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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