installation stopped by an exception from mark_install() in Cache class of python3-apt

Bug #1908023 reported by Shih-Yuan Lee
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OEM Priority Project
Status tracked in Focal
Focal
Fix Released
Critical
Shih-Yuan Lee
ubiquity (Ubuntu)
Fix Released
Undecided
Unassigned
Focal
Fix Released
Undecided
Unassigned

Bug Description

[Impact]

 * The original mark_install() function in ubiquity/install_misc.py is not reliable.

 * It will break the packages dependencies unexpectedly even when we do provide the complete packages installation set.

[Test Case]

 * It needs to manually provide some fixed broken order in the source code level, such as https://paste.ubuntu.com/p/XfGczzmxzM/ did, which is based on ubiquity 20.04.15.2 in focal. (The broken order is a real case dumpped from OEM project.)
 * So I used https://paste.ubuntu.com/p/fzK3BQhH7M/ to simulate the fixed broken order to verify the patch and it works fine. (https://paste.ubuntu.com/p/8B3M6dS8xr/ is the log.)

[Where problems could occur]

 * We found some order such as https://paste.ubuntu.com/p/tC25Gt25fY/ for example.
When libgbm1 is the first package from set(), it will cause the following exception or silently remove some other packages like xserver-xorg-input-libinput, xserver-xorg-input-all and xserver-xorg-video-all like comment #2 & #3.

[Other Info]

 * The patch of https://code.launchpad.net/~fourdollars/ubiquity/+git/ubiquity/+merge/395438 is using another mechanism to install packages set as apt upgrade / apt-get upgrade --with-new-pkgs is using.

LP: #1891599 dealt with the random and this is dealing with the exception.

Exception in the installation

Aug 12 19:26:59 ubuntu /plugininstall.py: Exception during installation:
Aug 12 19:26:59 ubuntu /plugininstall.py: Traceback (most recent call last):
Aug 12 19:26:59 ubuntu /plugininstall.py: File "/usr/share/ubiquity/plugininstall.py", line 235, in run
Aug 12 19:26:59 ubuntu /plugininstall.py: self.install_extras()
Aug 12 19:26:59 ubuntu /plugininstall.py: File "/usr/share/ubiquity/plugininstall.py", line 1212, in install_extras
Aug 12 19:26:59 ubuntu /plugininstall.py: self.do_install(filtered_extra_packages)
Aug 12 19:26:59 ubuntu /plugininstall.py: File "/usr/lib/ubiquity/ubiquity/install_misc.py", line 941, in do_install
Aug 12 19:26:59 ubuntu /plugininstall.py: mark_install(cache, pkg)
Aug 12 19:26:59 ubuntu /plugininstall.py: File "/usr/lib/ubiquity/ubiquity/install_misc.py", line 553, in mark_install
Aug 12 19:26:59 ubuntu /plugininstall.py: raise InstallStepError(
Aug 12 19:26:59 ubuntu /plugininstall.py: ubiquity.install_misc.InstallStepError: Unable to install 'libgbm1' due to conflicts.

This happen in oem project because we have lots pkg to upgrade during installation because the design of factory process need it.

As package list have certain dependency, and the the order that we get the pkg from the python set object is not good for underlying apt engine, then exception will raise.

Related branches

Revision history for this message
Shih-Yuan Lee (fourdollars) wrote :

$ sudo apt-get --dry-run install libgbm1 # There is no such problem on Ubuntu 18.04.
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
  libegl-mesa0 libglapi-mesa libglx-mesa0 libwayland-client0
  libwayland-server0
The following packages will be upgraded:
  libegl-mesa0 libgbm1 libglapi-mesa libglx-mesa0 libwayland-client0
  libwayland-server0
6 upgraded, 0 newly installed, 0 to remove and 826 not upgraded.
Inst libwayland-server0 [1.14.0-2] (1.16.0-1ubuntu1.1~18.04.3 Ubuntu:18.04/bionic-security, Ubuntu:18.04/bionic-updates [amd64])
Inst libegl-mesa0 [18.0.0~rc5-1ubuntu1] (20.0.8-0ubuntu1~18.04.1 Ubuntu:18.04/bionic-updates [amd64]) []
Inst libgbm1 [18.0.0~rc5-1ubuntu1] (20.0.8-0ubuntu1~18.04.1 Ubuntu:18.04/bionic-updates [amd64]) []
Inst libglx-mesa0 [18.0.0~rc5-1ubuntu1] (20.0.8-0ubuntu1~18.04.1 Ubuntu:18.04/bionic-updates [amd64]) []
Inst libglapi-mesa [18.0.0~rc5-1ubuntu1] (20.0.8-0ubuntu1~18.04.1 Ubuntu:18.04/bionic-updates [amd64]) []
Inst libwayland-client0 [1.14.0-2] (1.16.0-1ubuntu1.1~18.04.3 Ubuntu:18.04/bionic-security, Ubuntu:18.04/bionic-updates [amd64])
Conf libwayland-server0 (1.16.0-1ubuntu1.1~18.04.3 Ubuntu:18.04/bionic-security, Ubuntu:18.04/bionic-updates [amd64])
Conf libegl-mesa0 (20.0.8-0ubuntu1~18.04.1 Ubuntu:18.04/bionic-updates [amd64])
Conf libgbm1 (20.0.8-0ubuntu1~18.04.1 Ubuntu:18.04/bionic-updates [amd64])
Conf libglx-mesa0 (20.0.8-0ubuntu1~18.04.1 Ubuntu:18.04/bionic-updates [amd64])
Conf libglapi-mesa (20.0.8-0ubuntu1~18.04.1 Ubuntu:18.04/bionic-updates [amd64])
Conf libwayland-client0 (1.16.0-1ubuntu1.1~18.04.3 Ubuntu:18.04/bionic-security, Ubuntu:18.04/bionic-updates [amd64])

Revision history for this message
Shih-Yuan Lee (fourdollars) wrote :
Revision history for this message
Shih-Yuan Lee (fourdollars) wrote :

There is such problem when using http://releases.ubuntu.com/releases/20.04/ubuntu-20.04.1-desktop-amd64.iso + focal-proposed.

Changed in oem-priority:
assignee: nobody → Shih-Yuan Lee (fourdollars)
importance: Undecided → Critical
status: New → Confirmed
summary: - Installing libgbm1 will make other packages to be removed
+ Installing libgbm1 will make other packages removed
tags: added: oem-priority originate-from-1899905 somerville
no longer affects: hwe-next
no longer affects: mesa (Ubuntu)
summary: - Installing libgbm1 will make other packages removed
+ installation stopped by an exception from mark_install() in Cache class
+ of python3-apt
description: updated
Changed in oem-priority:
status: Confirmed → In Progress
description: updated
description: updated
description: updated
description: updated
tags: added: focal
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubiquity - 21.04.6

---------------
ubiquity (21.04.6) hirsute; urgency=medium

  * Revert "BD on iproute2" There's a mock 'ip' command which is supposed to
    be used actually.
  * Append _fn to netcfg mock_path name. This is actually why the mock 'ip'
    command wasn't being found. The check library now generates the testcase
    with `_fn` appended, so we need to rename our directory to follow suit.

 -- Iain Lane <email address hidden> Mon, 25 Jan 2021 19:02:50 +0000

Changed in ubiquity (Ubuntu):
status: New → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Ok, so it's not ideal that this lands so late in the .2 cycle as this SRU adds a new user-visible that would be nice to have translated. Too bad.

Changed in ubiquity (Ubuntu Focal):
status: New → Fix Committed
tags: added: verification-needed verification-needed-focal
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello Shih-Yuan, or anyone else affected,

Accepted ubiquity into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/ubiquity/20.04.15.5 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Revision history for this message
Shih-Yuan Lee (fourdollars) wrote :

I checked ubiquity 20.04.15.5 and it works fine.

Changed in oem-priority:
status: In Progress → Fix Committed
tags: added: verification-done verification-done-focal
removed: verification-needed verification-needed-focal
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubiquity - 20.04.15.5

---------------
ubiquity (20.04.15.5) focal; urgency=medium

  [ Mauricio Faria de Oliveira ]
  * Add preseed option 'ubiquity/prepare_automatic' (default: false) to
    include the prepare page in automatic mode. (LP: #1895351)
    - debian/ubiquity.templates: add ubiquity/prepare_automatic.
    - ubiquity/plugins/ubi-prepare.py: do not bail if it's true.

  [ Shih-Yuan Lee (FourDollars) ]
  * install_misc.py: Use another mechanism to install the packages. (LP:
    #1908023)

 -- Iain Lane <email address hidden> Mon, 25 Jan 2021 18:28:35 +0000

Changed in ubiquity (Ubuntu Focal):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for ubiquity has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Changed in oem-priority:
status: Fix Committed → 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.