[Bug 1930573] Re: usrmerge error after upgradingfrom 20.10 to 21.04

Lukas Märdian 1930573 at bugs.launchpad.net
Wed Oct 27 14:26:16 UTC 2021


Thank you Brian for accepting it into hirsute-proposed!

I've tested usrmerge 24ubuntu3.1 from hirsute-proposed, all good:

$ lxc launch ubuntu:bionic usrmerge
$ lxc exec usrmerge bash
# do-release-upgrade
[...]
# reboot
# ls -la /
total 96
drwxr-xr-x  22 root   root     4096 Oct 21 15:54 .
drwxr-xr-x  22 root   root     4096 Oct 21 15:54 ..
drwxr-xr-x   2 root   root    12288 Oct 27 13:11 bin
drwxr-xr-x   2 root   root     4096 Oct 21 15:54 boot
drwxr-xr-x   8 root   root      500 Oct 27 13:12 dev
drwxr-xr-x  94 root   root    12288 Oct 27 13:12 etc
drwxr-xr-x   3 root   root     4096 Oct 27 13:03 home
drwxr-xr-x  21 root   root     4096 Oct 27 13:08 lib
drwxr-xr-x   2 root   root     4096 Oct 27 13:05 lib64
drwxr-xr-x   2 root   root     4096 Oct 21 15:48 media
drwxr-xr-x   2 root   root     4096 Oct 21 15:48 mnt
drwxr-xr-x   2 root   root     4096 Oct 21 15:48 opt
dr-xr-xr-x 502 nobody nogroup     0 Oct 27 13:12 proc
drwx------   4 root   root     4096 Oct 27 13:12 root
drwxr-xr-x  22 root   root      700 Oct 27 13:12 run
drwxr-xr-x   2 root   root    12288 Oct 27 13:11 sbin
drwxr-xr-x   6 root   root     4096 Oct 27 13:08 snap
drwxr-xr-x   2 root   root     4096 Oct 21 15:48 srv
dr-xr-xr-x  13 nobody nogroup     0 Oct 27 13:12 sys
drwxrwxrwt  11 root   root     4096 Oct 27 13:12 tmp
drwxr-xr-x  12 root   root     4096 Oct 27 13:07 usr
drwxr-xr-x  13 root   root     4096 Oct 21 15:52 var
# mkdir -p /usr/lib/udev && cp /lib/udev/hwdb.bin /usr/lib/udev/
# sed -i 's/Prompt=lts/Prompt=normal/' /etc/update-manager/release-upgrades
# do-release-upgrade
[...]
Errors were encountered while processing:
 usrmerge
Exception during pm.DoInstall():  E:Sub-process /usr/bin/dpkg returned an error code (1)

*** Send problem report to the developers?

After the problem report has been sent, please fill out the form in the
automatically opened web browser.

What would you like to do? Your options are:
  S: Send report (238.1 KB)
  V: View report
  K: Keep report file for sending later or copying to somewhere else
  I: Cancel and ignore future crashes of this program version
  C: Cancel
Please choose (S/V/K/I/C): C

Could not install the upgrades

The upgrade has aborted. Your system could be in an unusable state. A
recovery will run now (dpkg --configure -a).

Setting up usrmerge (24ubuntu3) ...
ionice: ioprio_set failed: Operation not permitted
chrt: failed to set pid 44214's policy: Operation not permitted

FATAL ERROR:
Both /lib/udev/hwdb.bin and /usr/lib/udev/hwdb.bin exist.

You can try correcting the errors reported and running again
/usr/lib/usrmerge/convert-usrmerge until it will complete without errors.
Do not install or update other Debian packages until the program
has been run successfully.

dpkg: error processing package usrmerge (--configure):
 installed usrmerge package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 usrmerge

Upgrade complete

The upgrade has completed but there were errors during the upgrade
process.

To continue please press [ENTER]
=> [C] [ENTER] [x]
# /usr/lib/usrmerge/convert-usrmerge
ionice: ioprio_set failed: Operation not permitted
chrt: failed to set pid 44233's policy: Operation not permitted

FATAL ERROR:
Both /lib/udev/hwdb.bin and /usr/lib/udev/hwdb.bin exist.

You can try correcting the errors reported and running again
/usr/lib/usrmerge/convert-usrmerge until it will complete without errors.
Do not install or update other Debian packages until the program
has been run successfully.

# echo $?
1
# wget https://launchpad.net/ubuntu/+archive/primary/+files/usrmerge_24ubuntu3.1_all.deb
# dpkg -i usrmerge_24ubuntu3.1_all.deb 
(Reading database ... 35984 files and directories currently installed.)
Preparing to unpack usrmerge_24ubuntu3.1_all.deb ...
Unpacking usrmerge (24ubuntu3.1) over (24ubuntu3) ...
Setting up usrmerge (24ubuntu3.1) ...
Smartmatch is experimental at /usr/lib/usrmerge/convert-usrmerge line 172.
ionice: ioprio_set failed: Operation not permitted
chrt: failed to set pid 44276's policy: Operation not permitted
The system has been successfully converted.
# /usr/lib/usrmerge/convert-usrmerge
Smartmatch is experimental at /usr/lib/usrmerge/convert-usrmerge line 172.
ionice: ioprio_set failed: Operation not permitted
chrt: failed to set pid 44423's policy: Operation not permitted
The system has been successfully converted.
# echo $?
0
# /usr/lib/usrmerge/convert-usrmerge
Smartmatch is experimental at /usr/lib/usrmerge/convert-usrmerge line 172.
ionice: ioprio_set failed: Operation not permitted
chrt: failed to set pid 44812's policy: Operation not permitted
The system has been successfully converted.
# echo $?
0

** Tags removed: verification-needed-hirsute
** Tags added: verification-done-hirsute

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to usrmerge in Ubuntu.
https://bugs.launchpad.net/bugs/1930573

Title:
  usrmerge error after upgradingfrom 20.10 to 21.04

Status in usrmerge package in Ubuntu:
  Fix Committed
Status in usrmerge source package in Hirsute:
  Fix Committed
Status in usrmerge source package in Impish:
  Fix Committed
Status in usrmerge source package in Jammy:
  Fix Committed
Status in usrmerge package in Debian:
  New

Bug description:
  [Impact]

   * Starting with Ubuntu Hirsute, the 'usrmerge' package is pulled into
  the default installation, doing the merging of /{bin,sbin,lib}/ and
  /usr/{bin,sbin,lib} on upgrade. If there are left-over generated files
  it will fail with an error like this:

  Setting up usrmerge (24ubuntu3) ...

  FATAL ERROR:
  Both /lib/udev/hwdb.bin and /usr/lib/udev/hwdb.bin exist.

  
  The upgrade has completed but there were errors during the upgrade 
  process. 

   * We want a fix in Hirsute+ that clears the old location (e.g.
  /lib/udev/hwdb.bin) if the file has already been re-generated at the
  new location (e.g. /usr/lib/udev/hwdb.bin).

  
  [Test Plan]

  Prepare a recent, but non-usrmerge'd system (e.g. launch Bionic and upgrade to Focal then Hirsute):
  $ lxc launch ubuntu:bionic usrmerge
  # do-release-upgrade
  [...]
  # reboot
  # ls -la / # to make sure that /lib is not (yet) a link to /usr/lib

  Simulate duplicated generated files & upgrade:
  # mkdir -p /usr/lib/udev && cp /lib/udev/hwdb.bin /usr/lib/udev/
  # vim /etc/update-manager/release-upgrades # change to "Prompt=normal"
  # do-release-upgrade
  [...]
  => Upgrade fails, press "C" to cancel bug report
  => "The upgrade has completed but there were errors during the upgrade process."

  Verify that the script still fails:
  # /usr/lib/usrmerge/convert-usrmerge
  FATAL ERROR:
  Both /lib/udev/hwdb.bin and /usr/lib/udev/hwdb.bin exist.

  Install relevant usrmerge package:
  # wget https://launchpad.net/ubuntu/+archive/primary/+files/usrmerge_VER_all.deb
  # dpkg -i usrmerge_VER_all.deb
  => The system has been successfully converted.
  # /usr/lib/usrmerge/convert-usrmerge
  => The system has been successfully converted.
  # echo $?
  0

  [Where problems could occur]

   * The upload modifies the convert-usrmerge script, adding special handling for certain, generated files.
   * If something goes wrong, it could delete the wrong state of udev's hwdb which would be re-generated by systemd-hwdb-update.service
   * It could also interrupt the upgrade processes on installation of the usrmerge package, asking the user for manual action (e.g. solving some file conflict and re-running /usr/lib/usrmerge/convert-usrmerge)

  [Other Info]
   
   * The patch was sent to Debian: https://bugs.debian.org/997866

  
  === Original Description ===

  I got the following error after upgrading from 20.10 to 21.04:

  Setting up usrmerge (24ubuntu3) ...

  FATAL ERROR:
  Both /lib/udev/hwdb.bin and /usr/lib/udev/hwdb.bin exist.

  You can try correcting the errors reported and running again
  /usr/lib/usrmerge/convert-usrmerge until it will complete without errors.
  Do not install or update other Debian packages until the program
  has been run successfully.

  dpkg: error processing package usrmerge (--configure):
   installed usrmerge package post-installation script subprocess returned error exit status 1
  Errors were encountered while processing:
   usrmerge

  Running "sudo dpkg --configure -a", "sudo apt -f install" or "sudo
  /usr/lib/usrmerge/convert-usrmerge" give exactly the same error.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/usrmerge/+bug/1930573/+subscriptions




More information about the foundations-bugs mailing list