spread purge fails and then spread cannot be installed again

Bug #766750 reported by Eliah Kagan on 2011-04-20
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
spread (Ubuntu)
High
Unassigned

Bug Description

Binary package hint: spread

On a fully-updated Natty i386 system on which I performed these package management operations with apt-get, I was able to install spread 3.17.4-2ubuntu1, remove it, install it again, and reinstall it, but when I tried to purge it, dpkg-statoverride failed. At that point, the package was uninstalled but its configuration presumably not fully purged. After that, I was unable to install spread. The following is the Terminal log of these operations/attempts:

ek@Zim:~$ sudo apt-get install spread
[sudo] password for ek:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  spread
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 197 kB of archives.
After this operation, 578 kB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu/ natty/universe spread i386 3.17.4-2ubuntu1 [197 kB]
Fetched 197 kB in 1s (173 kB/s)
Selecting previously deselected package spread.
(Reading database ... 131708 files and directories currently installed.)
Unpacking spread (from .../spread_3.17.4-2ubuntu1_i386.deb) ...
Processing triggers for ureadahead ...
ureadahead will be reprofiled on next reboot
Processing triggers for man-db ...
Setting up spread (3.17.4-2ubuntu1) ...
Adding group `spread' (GID 123) ...
Done.
Warning: The home dir /var/run/spread you specified already exists.
Adding system user `spread' (UID 113) ...
Adding new user `spread' (UID 113) with group `spread' ...
The home directory `/var/run/spread' already exists. Not copying from `/etc/skel'.
adduser: Warning: The home directory `/var/run/spread' does not belong to the user you are currently creating.
ek@Zim:~$ sudo apt-get remove spread
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  spread
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 578 kB disk space will be freed.
Do you want to continue [Y/n]?
(Reading database ... 131728 files and directories currently installed.)
Removing spread ...
Processing triggers for man-db ...
Processing triggers for ureadahead ...
ek@Zim:~$ sudo apt-get install spread
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  spread
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/197 kB of archives.
After this operation, 578 kB of additional disk space will be used.
Selecting previously deselected package spread.
(Reading database ... 131714 files and directories currently installed.)
Unpacking spread (from .../spread_3.17.4-2ubuntu1_i386.deb) ...
Processing triggers for ureadahead ...
Processing triggers for man-db ...
Setting up spread (3.17.4-2ubuntu1) ...
addgroup: The group `spread' already exists as a system group. Exiting.
Warning: The home dir /var/run/spread you specified already exists.
The system user `spread' already exists. Exiting.
ek@Zim:~$ sudo apt-get --reinstall install spread
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
Need to get 0 B/197 kB of archives.
After this operation, 0 B of additional disk space will be used.
(Reading database ... 131729 files and directories currently installed.)
Preparing to replace spread 3.17.4-2ubuntu1 (using .../spread_3.17.4-2ubuntu1_i386.deb) ...
Unpacking replacement spread ...
Processing triggers for ureadahead ...
Processing triggers for man-db ...
Setting up spread (3.17.4-2ubuntu1) ...
addgroup: The group `spread' already exists as a system group. Exiting.
Warning: The home dir /var/run/spread you specified already exists.
The system user `spread' already exists. Exiting.
ek@Zim:~$ sudo apt-get purge spread
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  spread*
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 578 kB disk space will be freed.
Do you want to continue [Y/n]?
(Reading database ... 131728 files and directories currently installed.)
Removing spread ...
Purging configuration files for spread ...
dpkg-statoverride: unrecoverable fatal error, aborting:
 syntax error: unknown user 'spread' in statoverride file
dpkg-statoverride: unrecoverable fatal error, aborting:
 syntax error: unknown user 'spread' in statoverride file
dpkg-statoverride: unrecoverable fatal error, aborting:
 syntax error: unknown user 'spread' in statoverride file
Processing triggers for man-db ...
Processing triggers for ureadahead ...
ek@Zim:~$ sudo apt-get install spread
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  spread
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/197 kB of archives.
After this operation, 578 kB of additional disk space will be used.
dpkg: unrecoverable fatal error, aborting:
 syntax error: unknown user 'spread' in statoverride file
E: Sub-process /usr/bin/dpkg returned an error code (2)
ek@Zim:~$

I'm attaching /var/log/dpkg.log.

I am able to produce this bug on a Natty amd64 system as well. The Natty i386 system is a virtual machine and I can roll it back to an earlier state (and would be pleased to do so to perform further testing, if that would be helpful), but the Natty amd64 system is a physical machine and I don't know how to re-enable installation of spread. (But this is a bug report and not a request for assistance--I strongly suspect that I will be able to find a workaround.)

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: spread (not installed)
ProcVersionSignature: Ubuntu 2.6.38-8.42-generic 2.6.38.2
Uname: Linux 2.6.38-8-generic i686
Architecture: i386
Date: Tue Apr 19 21:54:51 2011
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Beta i386 (20110416)
ProcEnviron:
 LANGUAGE=en_US:en
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: spread
UpgradeStatus: No upgrade log present (probably fresh install)

For convenience:

ek@Zim:/var/lib/dpkg$ diff statoverride-old statoverride
1a2
> spread spread 755 /var/run/spread

And as expected, /etc/spread/spread.conf, /var/run/spread, and the spread user are all nonexistent now (as the removal/purge was partially successful):

ek@Zim:~$ ls -l /etc/spread/spread.conf /var/run/spread; grep spread /etc/passwd
ls: cannot access /etc/spread/spread.conf: No such file or directory
ls: cannot access /var/run/spread: No such file or directory
ek@Zim:~$

Manually removing lines 2, 3, and 6 (the lines that start with spread) in /var/lib/dpkg/statoverride is an effective workaround for this bug, as expected.

Dave Gilbert (ubuntu-treblig) wrote :

Confirmed on Quantal alpha 3.17.4-4

Changed in spread (Ubuntu):
importance: Undecided → High
status: New → Triaged
Roel van de Kraats (lp-4) wrote :

I ran into this problem as well. The problem seems to be in the 'postrm' script, which first removes the 'spread' user and then tries to run dpkg-statoverride. This results in:

# dpkg --purge spread
(Reading database ... 40112 files and directories currently installed.)
Removing spread ...
Purging configuration files for spread ...
dpkg-statoverrides: unrecoverable fatal error, aborting:
 syntax error: unknown user 'spread' in statoverride file
dpkg-statoverrides: unrecoverable fatal error, aborting:
 syntax error: unknown user 'spread' in statoverride file

The fix is to let debian/spread.postrm first call dpkg-statoverride and then call userdel.

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

Other bug subscribers