Could not calculate upgrade should suggest log location

Bug #1771387 reported by Mekk on 2018-05-15
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-release-upgrader (Ubuntu)
Medium
Brian Murray
Bionic
Undecided
Unassigned
Cosmic
Undecided
Unassigned

Bug Description

Test Case
---------
1) add this PPA to your system 'sudo add-apt-repository ppa:oibaf/graphics-drivers'
2) run 'sudo apt-get update; sudo apt-get dist-upgrade'
3) try to upgrade to Cosmic
4) Observe the following message:
"Could not calculate the upgrade

An unresolvable problem occurred while calculating the upgrade.

This can be caused by:
* Upgrading to a pre-release version of Ubuntu
* Running the current pre-release version of Ubuntu
* Unofficial software packages not provided by Ubuntu

If none of this applies, then please report this bug using the
command 'ubuntu-bug ubuntu-release-upgrader-core' in a terminal."

With the version of the package from -proposed you should instead see the following in the error message:

"If none of this applies, then please report this bug using the
command 'ubuntu-bug ubuntu-release-upgrader-core' in a terminal. If
you want to investigate this yourself the log files in
'/var/log/dist-upgrade' will contain details about the upgrade.
Specifically, look at 'main.log' and 'apt.log'."

Regression Potential
--------------------
This change does end up breaking translations but the message is much more informative and lots of users have difficulty upgrading between releases which can leave them on an insecure (EoL) release of Ubuntu which is worse.

Situation
===============
As more-or-less usual, my attempt to upgrade from 16.04 to 18.04 failed with "Could not calculate upgrade" error (well, one even more confusing and less google-able, as translated to my national language). Also, as usual, I found myself confused, without any pointers what to do next. I tried a few times, tried googling, to no success.

It took me switching to LANG=C (to see more googlish error messages) and about 20 minutes of scanning various forums until I found suggestion to check /var/log/dist-upgrade

There I found some rather cryptic remark about unresolvable cyclic dependency which may be caused by held packages, which nevertheless inspired me to look for a way to find held packages.

A few more minutes of googling and I found out about
     apt-mark showhold
which nicely listed my few held packages (nvidia-304 and some related, IIRC results of driver problems I resolved 2 years ago).

I removed those packages and now my upgrade is progressing. But whole experience was very unpleasant.

Suggested changes (tiny changes but with large impact)
======================================================

1. Whenever do-release-upgrade fails, it should suggest checking out /var/log/dist-upgrade.
   Simply, instead of finishing with
       "Could not calculate the upgrade.
       Unresolvable error happened."
   finish with
       "Could not calculate the upgrade.
       Unresolvable error happened.
       Technical logs of failed upgrade can be found in /var/log/dist-upgrade"

   This very sentence would save me at least 2 hours.

2. In case upgrade calculation fails due to held or unofficial packages, either list problematic
   packages, or suggest commands which will list them. For example, my very case would be resolved
   in a minute if installer printed something like:

       Note: upgrade calculation could be caused by held packages:
          nvidia-304 nvidia-304-dev nvidia-current-updates
       (consider removing those packages temporarily to resolve the problem)

   or

       Note: upgrade calculation could be caused by held packages
       (use apt-mark showhold to list such packages on your system, and
        consider removing them temporarily to resolve the problem)

Related branches

Mekk (marcin-kasperski) on 2018-05-15
description: updated
Changed in ubuntu-release-upgrader (Ubuntu):
status: New → Triaged
tags: added: rls-cc-incoming
tags: added: rls-dd-incoming
removed: rls-cc-incoming
Mekk (marcin-kasperski) wrote :

Out of curiosity: what those rls-cc and rls-dd mean? Do you agree with my suggestions, or reject them, or … ?

(Google points me towards various launchpad errors with similar redirections and pages about RLS - „restless leg syndrome”…)

Brian Murray (brian-murray) wrote :

The tags are a way for Ubuntu Developers to track potential work for a release of Ubuntu.

Changed in ubuntu-release-upgrader (Ubuntu):
status: Triaged → In Progress
assignee: nobody → Brian Murray (brian-murray)
importance: Undecided → Medium
tags: added: id-5b5b2ceb30bee3278544fe94
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-release-upgrader - 1:19.04.7

---------------
ubuntu-release-upgrader (1:19.04.7) disco; urgency=medium

  [ Brian Murray ]
  * DistUpgrade/DistUpgradeCache.py: When calculating free space needed for
    mount points don't use a negative number as the buffer. (LP: #1786484)
  * fix more typos re RELEASE_UPRADER_ALLOW_THIRD_PARTY
  * DistUpgrade/DistUpgradeCache.py: When calculating free space needed for
    mount points don't use a negative number as the buffer. (LP: #1786484)
  * fix more typos re RELEASE_UPRADER_ALLOW_THIRD_PARTY
  * DistUpgrade/DistUpgradeController.py: When rewriting sources.list entries
    check to see if the source provides packages for the release to which the
    upgrade is occurring. If it doesn't the entry is disabled thereby
    improving upgrades with PPAs. (LP: #1807043)
  * do-release-upgrade: add a parameter to allow third party mirrors and
    repositories, additionally pass along the environmental variable
    RELEASE_UPGRADER_ALLOW_THIRD_PARTY via pkexec and sudo. (LP: #1807032)
  * DistUpgrade/DistUpgradeCache.py: improve messaging regarding failures to
    calculate the upgrade and suggest using ppa-purge if PPAs are an issue.
  * DistUpgrade/DistUpgradeCache.py: in the event there is a failure to
    calculate the upgrade provide information about the log files in
    /var/log/dist-upgrade. (LP: #1771387)

  [ Jeremy Bicha ]
  * autopkgtest: Update dependency from gir1.2-webkit-3.0 to gir1.2-webkit2-4.0

 -- Brian Murray <email address hidden> Tue, 11 Dec 2018 15:35:34 -0800

Changed in ubuntu-release-upgrader (Ubuntu):
status: In Progress → Fix Released
description: updated

Hello Mekk, or anyone else affected,

Accepted ubuntu-release-upgrader into cosmic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/ubuntu-release-upgrader/1:18.10.11.3 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 and change the tag from verification-needed-cosmic to verification-done-cosmic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-cosmic. 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.

Changed in ubuntu-release-upgrader (Ubuntu Cosmic):
status: New → Fix Committed
tags: added: verification-needed verification-needed-cosmic
description: updated
description: updated
Brian Murray (brian-murray) wrote :

I tested the upgrade from bionic to cosmic using the oibaf graphics drivers PPA and with the version of the release upgrader from -proposed received the following message:

"An unresolvable problem occurred while calculating the upgrade.

This was likely caused by:
* Unofficial software packages not provided by Ubuntu
Please use the tool 'ppa-purge' from the ppa-purge
package to remove software from a Launchpad PPA and
try the upgrade again.

If none of this applies, then please report this bug using the
command 'ubuntu-bug ubuntu-release-upgrader-core' in a terminal.If
you want to investigate this yourself the log files in
'/var/log/dist-upgrade' will contain details about the upgrade.
Specifically, look at 'main.log' and 'apt.log'."

Setting to verification done.

tags: added: verification-done verification-done-cosmic
removed: verification-needed verification-needed-cosmic
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-release-upgrader - 1:18.10.11.3

---------------
ubuntu-release-upgrader (1:18.10.11.3) cosmic; urgency=medium

  * DistUpgrade/DistUpgradeCache.py: When calculating free space needed for
    mount points don't use a negative number as the buffer. (LP: #1786484)
  * fix more typos re RELEASE_UPRADER_ALLOW_THIRD_PARTY.
  * DistUpgrade/DistUpgradeController.py: When rewriting sources.list entries
    check to see if the source provides packages for the release to which the
    upgrade is occurring. If it doesn't the entry is disabled thereby
    improving upgrades with PPAs. (LP: #1807043)
  * do-release-upgrade: add a parameter to allow third party mirrors and
    repositories, additionally pass along the environmental variable
    RELEASE_UPGRADER_ALLOW_THIRD_PARTY via pkexec and sudo. (LP: #1807032)
  * DistUpgrade/DistUpgradeCache.py: improve messaging regarding failures to
    calculate the upgrade and suggest using ppa-purge if PPAs are an issue.
  * DistUpgrade/DistUpgradeCache.py: in the event there is a failure to
    calculate the upgrade provide information about the log files in
    /var/log/dist-upgrade. (LP: #1771387)
  * debian/source_ubuntu-release-upgrader.py: Include xorg_fixup.log if it
    exists.
  * DistUpgrade/xorg_fix_proprietary.py: modify how the system is checked to
    see if nvidia is being used, drop fglrx check since it has been
    deprecated. (LP: #1773637)

 -- Brian Murray <email address hidden> Thu, 20 Dec 2018 12:31:37 -0800

Changed in ubuntu-release-upgrader (Ubuntu Cosmic):
status: Fix Committed → Fix Released

The verification of the Stable Release Update for ubuntu-release-upgrader has completed successfully and the package has now been 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.

Hello Mekk, or anyone else affected,

Accepted ubuntu-release-upgrader into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/ubuntu-release-upgrader/1:18.04.30 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 and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. 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.

Changed in ubuntu-release-upgrader (Ubuntu Bionic):
status: New → Fix Committed
tags: added: verification-needed verification-needed-bionic
removed: verification-done
Brian Murray (brian-murray) wrote :

I followed the test case today using the version of ubuntu-release-upgrader from bionic-proposed and received the following error message:

"If none of this applies, then please report this bug using the
command 'ubuntu-bug ubuntu-release-upgrader-core' in a terminal.If
you want to investigate this yourself the log files in
'/var/log/dist-upgrade' will contain details about the upgrade.
Specifically, look at 'main.log' and 'apt.log'."

bdmurray@clean-bionic-amd64:~$ apt-cache policy ubuntu-release-upgrader-core
ubuntu-release-upgrader-core:
  Installed: 1:18.04.30
  Candidate: 1:18.04.30

Setting to verification-done.

tags: added: verification-done verification-done-bionic
removed: verification-needed verification-needed-bionic
Brian Murray (brian-murray) wrote :

I tested an upgrade from Xenial to Bionic with some ROS packages installed from their archive. With the version of ubuntu-release-upgrader from bionic-proposed I received a more informative error message.

An unresolvable problem occurred while calculating the upgrade.

This was likely caused by:
* Unofficial software packages not provided by Ubuntu
Please use the tool 'ppa-purge' from the ppa-purge
package to remove software from a Launchpad PPA and
try the upgrade again.

If none of this applies, then please report this bug using the
command 'ubuntu-bug ubuntu-release-upgrader-core' in a terminal.If
you want to investigate this yourself the log files in
'/var/log/dist-upgrade' will contain details about the upgrade.
Specifically, look at 'main.log' and 'apt.log'.

Restoring original system state

Setting to verification-done.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-release-upgrader - 1:18.04.30

---------------
ubuntu-release-upgrader (1:18.04.30) bionic; urgency=medium

  * data/release-upgrades: Clarify documentation regarding the behavior for
    different Prompt settings. (LP: #1795024)
  * do-release-upgrade: Utilize information regarding what Prompt is set to so
    that a more informative error message can be displayed.
    (LP: #1798618, LP: #1795024)
  * DistUpgrade/DistUpgradeCache.py: When calculating free space needed for
    mount points don't use a negative number as the buffer. (LP: #1786484)
  * fix more typos re RELEASE_UPRADER_ALLOW_THIRD_PARTY
  * DistUpgrade/DistUpgradeController.py: When rewriting sources.list entries
    check to see if the source provides packages for the release to which the
    upgrade is occurring. If it doesn't the entry is disabled thereby
    improving upgrades with PPAs. (LP: #1807043)
  * do-release-upgrade: add a parameter to allow third party mirrors and
    repositories, additionally pass along the environmental variable
    RELEASE_UPGRADER_ALLOW_THIRD_PARTY via pkexec and sudo. (LP: #1807032)
  * DistUpgrade/DistUpgradeCache.py: improve messaging regarding failures to
    calculate the upgrade and suggest using ppa-purge if PPAs are an issue.
  * DistUpgrade/DistUpgradeCache.py: in the event there is a failure to
    calculate the upgrade provide information about the log files in
    /var/log/dist-upgrade. (LP: #1771387)
  * debian/source_ubuntu-release-upgrader.py: Include xorg_fixup.log if it
    exists.
  * DistUpgrade/xorg_fix_proprietary.py: modify how the system is checked to
    see if nvidia is being used, drop fglrx check since it has been
    deprecated. (LP: #1773637)

 -- Brian Murray <email address hidden> Wed, 16 Jan 2019 15:53:58 -0800

Changed in ubuntu-release-upgrader (Ubuntu Bionic):
status: Fix Committed → Fix Released
Mekk (marcin-kasperski) wrote :

What about point 2 of my original report (suggesting apt-mark showhold)? Here it can be sufficient to mention it in the log message, so no translations are involved…

Brian Murray (brian-murray) wrote :

Could you open a new bug report regarding listing out of apt-mark showhold in the log files? Thanks in advance.

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

Other bug subscribers