Failure: The 3.0 solver produced a worse result

Bug #2102720 reported by Jeremy Bícha
34
This bug affects 7 people
Affects Status Importance Assigned to Milestone
apt (Ubuntu)
Fix Released
Undecided
Julian Andres Klode

Bug Description

.

ProblemType: AptSolver
DistroRelease: Ubuntu 25.04
Package: apt 2.9.33
ProcVersionSignature: Ubuntu 6.14.0-7.7-generic 6.14.0-rc4
Uname: Linux 6.14.0-7-generic x86_64
ApportVersion: 2.32.0-0ubuntu2
Architecture: amd64
CasperMD5CheckResult: pass
Date: Sat Mar 15 10:51:29 2025
ErrorMessage:

InstallationDate: Installed on 2024-04-12 (337 days ago)
InstallationMedia: Ubuntu 24.04 LTS "Noble Numbat" - Beta amd64 (20240410.2)
RebootRequiredPkgs: Error: path contained symlinks.
SourcePackage: apt
Title: Failure: The 3.0 solver produced a worse result
UpgradeStatus: Upgraded to plucky on 2024-12-18 (87 days ago)

Revision history for this message
Jeremy Bícha (jbicha) wrote :
Revision history for this message
Julian Andres Klode (juliank) wrote :

Ah I think you have a hold (or pin) on brz; and the new solver now considers "brz" as obsolete because the candidate version is not installable anymore, and then tries to prefer to satisfiy

libdpkg-perl Suggests bzr

by installing bzr (it does not want to end up with Suggests getting broken by upgrades, so it upgrades Suggests that are currently satisfied to Recommends).

Notes:

As for obsolete, the goal here was to drive migration towards _new_ packages; i.e. instead of bzr and brz you have libfoo1 and libfoo1t64 (w/ provides on amd64); I don't want the solver to install libfoo1 (or keep it installed) but install libfoo1t64 for you.

Now I think this may interact badly with Suggests promotions...

The other avenue to explore for me is to have a look at why apt here considers "brz" obsolete in the first place because I just made changes in 2.9.23 to not treat manually installed packages as obsolete...

Revision history for this message
Julian Andres Klode (juliank) wrote :

Alright I made a silly mistake when I patched the "don't detect manually installed package as obsolete"; the calls were interleaved. So we see the "libdpkg-perl Suggests bzr" *before* we see "brz" as installed and set the flag in the solver state. Turns out I gotta loop twice; who knew?

Changed in apt (Ubuntu):
status: New → In Progress
Revision history for this message
Jeremy Bícha (jbicha) wrote :

breezy is broken in Ubuntu 25.04 so I installed it locally. That still didn't work but we're building the new breezy and rust-pyo3 today so maybe that helps.

Thanks for reading through the log. Except for the apport popup, there was no indication of anything that wasn't working correctly on the user side.

Revision history for this message
Julian Andres Klode (juliank) wrote :

Maybe I should print some message in apt when I generate a report for

https://discourse.ubuntu.com/t/evaluating-the-new-apt-solver-in-25-04/55618

But in released versions apport doesn't prompt for bug reports but you get the whoopsie error reports, so not sure.

Changed in apt (Ubuntu):
assignee: nobody → Julian Andres Klode (juliank)
tags: added: foundations-todo
Revision history for this message
Julian Andres Klode (juliank) wrote :
Revision history for this message
Julian Andres Klode (juliank) wrote :
Changed in apt (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apt - 2.9.34

---------------
apt (2.9.34) unstable; urgency=medium

  [ Julian Andres Klode ]
  * Fix uploads to errors.ubuntu.com with whoopsie:
    - zstd: The compressor level should be -6, not -19
    - edsp: Add functionality to only write relevant packages
    - solver evaluation: write minimized solver dumps
    - edsp: Dump minimized Dir::Log::Solver logs
    - solver3: Use zstd-compressed, base64-encoded dumps
    - solver3: Avoid empty ErrorMessage field in evaluation crash report
  * solver3: Only hide ver->pkg clauses, not pkg->ver version selection ones
    - previously we hid version information vital to the understanding
    - thanks to Helmut Grohne for the report
  * solver3: Record manual flag before discovering packages (LP: #2102720)
  * solver3: Handle previously satisfied Suggests last and do not install
    new packages for Suggests (LP: #2103556)

  [ Johannes Schauer Marin Rodrigues ]
  * apt-pkg/solver3.h: avoid static_assert(false)
  * cmdline/apt-get.cc: emit Signed-By field and support $(SIGNED_BY) in
    apt-get indextargets --format

  [ Christopher Bock ]
  * doc/sources.list.5.xml: snapshot infos

 -- Julian Andres Klode <email address hidden> Thu, 20 Mar 2025 22:45:30 +0100

Changed in apt (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Xavier Guillot (valeryan-24) wrote :

Hi, I just got the same bug and I have Apt 2.9.34 …

Revision history for this message
Xavier Guillot (valeryan-24) wrote :
Revision history for this message
Julian Andres Klode (juliank) wrote :

Xavier please file a separate bug, this one is solved. There can be loads of different underlying conditions that can cause the evaluation to fail with a worse result. Thank you!

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.