Update manager doesn't calculate free space correctly for distribution upgrade

Bug #986272 reported by bcbc
76
This bug affects 16 people
Affects Status Importance Assigned to Milestone
ubuntu-release-upgrader (Ubuntu)
Triaged
Medium
Unassigned

Bug Description

I ran an upgrade from 11.10 to 12.04 with 1.9GB free space. No warning was given about insufficient free space. I received two popup windows during the upgrade informing me that I was low on space and this went down to less than 100MB (as I manually freed up space).

The problem may be:
1. ~1800 packages are downloaded (this could be the amount of free space it thinks it needs
2. After upgrading and removing old packages it uses a net amount of ~500MB (this could be the free space it thinks)
3. During unpacking and installing 1800 packages it uses 2GB+ <== this is definitely not the amount of space it thinks it needs.

tags: added: dist-upgrade
Changed in update-manager (Ubuntu):
importance: Undecided → Medium
Revision history for this message
bcbc (bcbc) wrote :
Revision history for this message
bcbc (bcbc) wrote :

2012-04-18 22:18:42,171 DEBUG Free space on /: 1856667648

2012-04-18 22:18:45,900 DEBUG dir '/var/cache/apt/archives' needs '987733436' of '<DistUpgradeCache.FreeSpace object at 0xae731cc>' (1856667648.000000)
2012-04-18 22:18:45,901 DEBUG dir '/usr' needs '211730432' of '<DistUpgradeCache.FreeSpace object at 0xae731cc>' (868934212.000000)
2012-04-18 22:18:45,901 DEBUG dir '/usr' needs '52428800' of '<DistUpgradeCache.FreeSpace object at 0xae731cc>' (657203780.000000)
2012-04-18 22:18:45,901 DEBUG dir '/boot' needs '22345536' of '<DistUpgradeCache.FreeSpace object at 0xae731cc>' (604774980.000000)
2012-04-18 22:18:45,901 DEBUG dir '/tmp' needs '5242880' of '<DistUpgradeCache.FreeSpace object at 0xae731cc>' (582429444.000000)
2012-04-18 22:18:45,901 DEBUG dir '/' needs '10485760' of '<DistUpgradeCache.FreeSpace object at 0xae731cc>' (577186564.000000)
2012-04-18 22:18:45,901 DEBUG dir '/tmp' needs '0.0' of '<DistUpgradeCache.FreeSpace object at 0xae731cc>' (566700804.000000)
2012-04-18 22:18:45,901 DEBUG dir '/usr' needs '0.0' of '<DistUpgradeCache.FreeSpace object at 0xae731cc>' (566700804.000000)

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in update-manager (Ubuntu):
status: New → Confirmed
Revision history for this message
GerhardGaußling (ggrubbish-web) wrote :
Download full text (10.9 KiB)

I also ran into this, but I reported it unfortunately under upgrade-system here: https://bugs.launchpad.net/ubuntu/+source/upgrade-system/+bug/996379

Here is some output of /var/log/dist-upgrade/main.log

[...]
2012-05-07 23:30:21,678 DEBUG apt btrfs snapshots supported: False
2012-05-07 23:30:21,679 DEBUG cache aufs_rw_dir: /tmp/
2012-05-07 23:30:21,679 DEBUG Free space on /: 1472831488
2012-05-07 23:30:21,679 DEBUG Dir /usr mounted on /
2012-05-07 23:30:21,679 DEBUG Dir /var mounted on /
2012-05-07 23:30:21,679 DEBUG Dir /boot mounted on /
2012-05-07 23:30:21,679 DEBUG Dir /var/cache/apt/archives mounted on /
2012-05-07 23:30:21,679 DEBUG Dir /tmp mounted on /
2012-05-07 23:30:21,679 DEBUG Dir /home mounted on /
2012-05-07 23:30:21,683 DEBUG Dir /tmp mounted on /
2012-05-07 23:30:21,683 DEBUG fs_free contains: '{'/var': <DistUpgradeCache.FreeSpace object at 0xa2d33ac>, '/tmp': <DistUpgradeCache.FreeSpace object at 0xa2d33ac>, '/usr': <DistUpgradeCache.FreeSpace object at 0xa2d33ac>, '/boot': <DistUpgradeCache.FreeSpace object at 0xa2d33ac>, '/home': <DistUpgradeCache.FreeSpace object at 0xa2d33ac>, '/': <DistUpgradeCache.FreeSpace object at 0xa2d33ac>, '/var/cache/apt/archives': <DistUpgradeCache.FreeSpace object at 0xa2d33ac>}'
2012-05-07 23:30:22,310 DEBUG linux-image-3.2.0-24-generic (new-install) added with 28219595 to boot space
2012-05-07 23:30:22,797 DEBUG dir '/var/cache/apt/archives' needs '975438014' of '<DistUpgradeCache.FreeSpace object at 0xa2d33ac>' (1472831488.000000)
2012-05-07 23:30:22,798 DEBUG dir '/usr' needs '378480640' of '<DistUpgradeCache.FreeSpace object at 0xa2d33ac>' (497393474.000000)
2012-05-07 23:30:22,798 DEBUG dir '/usr' needs '52428800' of '<DistUpgradeCache.FreeSpace object at 0xa2d33ac>' (118912834.000000)
2012-05-07 23:30:22,798 DEBUG dir '/boot' needs '28219595' of '<DistUpgradeCache.FreeSpace object at 0xa2d33ac>' (66484034.000000)
2012-05-07 23:30:22,798 DEBUG dir '/tmp' needs '5242880' of '<DistUpgradeCache.FreeSpace object at 0xa2d33ac>' (38264439.000000)
2012-05-07 23:30:22,798 DEBUG dir '/' needs '10485760' of '<DistUpgradeCache.FreeSpace object at 0xa2d33ac>' (33021559.000000)
2012-05-07 23:30:22,798 DEBUG dir '/tmp' needs '0.0' of '<DistUpgradeCache.FreeSpace object at 0xa2d33ac>' (22535799.000000)
2012-05-07 23:30:22,798 DEBUG dir '/usr' needs '0.0' of '<DistUpgradeCache.FreeSpace object at 0xa2d33ac>' (22535799.000000)
[...]
2012-05-07 23:38:28,420 INFO cache.commit()
2012-05-07 23:38:28,420 DEBUG failed to SystemUnLock() (E:Nicht gesperrt)
2012-05-08 00:06:13,174 ERROR got an error from dpkg for pkg: '/var/cache/apt/archives/ghc_7.4.1-1ubuntu2_i386.deb': 'failed in write on buffer copy for backend dpkg-deb during `./usr/lib/ghc/ghc-7.4.1/libHSghc-7.4.1.a': No space left on device'
2012-05-08 00:06:13,558 DEBUG running apport_pkgfailure() ghc: failed in write on buffer copy for backend dpkg-deb during `./usr/lib/ghc/ghc-7.4.1/libHSghc-7.4.1.a2012-05-08 00:06:14,053 ERROR got an error from dpkg for pkg: '/var/cache/apt/archives/ghc_7.4.1-1ubuntu2_i386.deb': 'failed in write on buffer copy for backend dpkg-deb during `./usr/lib/ghc/ghc-7.4.1/libHSghc-7.4.1.a': No space left on device'
2012-05-0...

Revision history for this message
GerhardGaußling (ggrubbish-web) wrote :
Revision history for this message
GerhardGaußling (ggrubbish-web) wrote :

this seems to be a duplicate bug of these bugs:
update manager space calculation for a release upgrade was wrong - aftereffect: package ghc 7.4.1-1ubuntu2 failed to install/upgrade: ErrorMessage: dependency problems - leaving unconfigured
https://bugs.launchpad.net/ubuntu/+source/upgrade-system/+bug/996379
[Master] package failed to install/upgrade: package is already installed and configured
https://bugs.launchpad.net/ubuntu/+source/dpkg/+bug/541595

Revision history for this message
bcbc (bcbc) wrote :

Bug 541595 is marked as 'fix released'. So it's no longer active. Also, that bug was to do with an incorrect report that a package was already installed. The other bug 996379 is marked as invalid.

This bug is to do with update-manager checking the space required for the release-upgrade incorrectly. Then proceeding with the upgrade only to fail due to lack of free space.

affects: update-manager (Ubuntu) → ubuntu-release-upgrader (Ubuntu)
Changed in ubuntu-release-upgrader (Ubuntu):
status: Confirmed → Triaged
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.