[dist-upgrader] bug in the free space check?

Bug #47092 reported by Martin Olsson
14
Affects Status Importance Assigned to Milestone
update-manager (Ubuntu)
Fix Released
High
Michael Vogt

Bug Description

I have found what I consider a major critical bug in the breezy to dapper upgrade process.

I ran the gksudo thing and used update manager to upgrade my breezy. Apparently I did not have enough HDD space and it did not warn me... not even when the disk filled up to zero bytes free it warned me it just kept going with no error messages.

The first signs I got that something was wrong was that the GTK recyclebin application crashed and then some other GTK components "quit unexpectedly". I kicked up a terminal and bash said it could create some temp file so I went "df" and discovered the full disk.

The installation however continued and I let it continue, finally at maybe 99% the entire installer crashes in a series of weird error messages which was not directly related to the full disk but that made it obvious that this was infact the problem.

My system did not contain anything that important but if you screw up peoples main desktop systems like this they will just never use ubuntu again.

PLEASE ADD SOME LAST MINUTE CHECK IN THE INSTALLER THAT WARNS IF THERE IS NOT ENOUGH DISK SPACE FOR THE UPGRADE

Revision history for this message
Martin Olsson (mnemo) wrote :

There is almost not a single installer in Windows that cannot handle this types of issues. What they do is that they pause the installation whenever the disk is full, they display a message about it and that dialog has a "retry" button so that the user can clean up some stuff from the disk and continue as nothing happened.

I realized that implementing such a thing would be too late for dapper but a single "one liner check" for disk space can be included in dapper in time.. right?

Revision history for this message
Sebastian Heinlein (glatzor) wrote :

Actually there is a disk space check in the dist-upgrade tool.

Changed in update-manager:
assignee: nobody → mvo
Revision history for this message
Martin Olsson (mnemo) wrote :

To upgrade I used this command:

 gksudo "update-manager -d"

in a ALT-F2 box and then I just used the regular update GUI to upgrade my distro. More me there was no disk space checks, or possibly a check was made but it didn't work (bad calculation maybe?)

Are you refering to the CVS version or are you refering to the RC that went out a couple of days ago? Because, as I said; it screwed my entire Linux partition into a state where I can't even boot into a GUI or anything. And there was just no warnings or anything.

regards,
martin

Revision history for this message
Sebastian Heinlein (glatzor) wrote :

Some more questions:

Which partitions were full? How many partitions do you use? What are your mount points? What file systems do you use?

Changed in update-manager:
status: Unconfirmed → Needs Info
Revision history for this message
Martin Olsson (mnemo) wrote : output of "df"

this is the output of "df" to generate this dump I had to delete to files in my home directory first.. when I first booted the / partition had 0 bytes available. After deleting the files that number changed to the 276440 free bytes you see in this dump...

Revision history for this message
Martin Olsson (mnemo) wrote : dpkg.log

I have no idea what this files contains but I suspect I could be useful?

Revision history for this message
Martin Olsson (mnemo) wrote : my fstab

this is my /etc/fstab file

Revision history for this message
Martin Olsson (mnemo) wrote : this if /var/log/messages

Again.. I have no idea what this files contains but I suspect I could be useful?

Revision history for this message
Martin Olsson (mnemo) wrote : Re: Major critical bug in breezy to dapper upgrade

I hope the files I attached can be useful in trying to find the reason as to why I did not receive any warnings that the dist-upgrade thing was about to screw up my system..

If there is any other command and/or files you need... just post a note here..

Revision history for this message
Sebastian Heinlein (glatzor) wrote :

Thanks a lot.

Revision history for this message
Neil Woolford (neil-neilwoolford) wrote :

A quick 'me too'.

gksudo "update-manager -d"

started the process without protest even though there wasn't enough disc space to finish it. This was a while ago, around flights six or seven I guess. I ran it unattended at night (cheap connection then) so I didn't get to see the errors happening, just found a failed install with a full partition.

Fortunately no real data was lost and everything in the other partitions was fine. But the OP here didn't have a unique experience... Wish I'd filed a bug now...

Revision history for this message
Neil Woolford (neil-neilwoolford) wrote :

I do have a spare machine that I'd be happy to install Breezy to again and try (overnight) test upgrades to Dapper on if that would help.

Revision history for this message
Michael Vogt (mvo) wrote :

Thanks for your bugreport.

Please include the files in /var/log/dist-upgrade*.log, it contains information about the partition size checking (it is done, but it may have bugs).

Revision history for this message
Michael Vogt (mvo) wrote :

Please note that my last comment applies for the use as a dist-upgrade tool. There is indeed no checking for the regular updates.

Michael Vogt (mvo)
description: updated
Revision history for this message
Neil Woolford (neil-neilwoolford) wrote :

I've now done a severe (but rather artificial) test;

I installed a fresh Breezy and updated it so that the update-manager etc were current. I then crushed the partition down with gparted so that it was stupidly small at 2.64GB.

I ran 'gksudo update-manager -d' and it (correctly) reported that there was too little space to install. It instructed me to add 115MB of space to be able to upgrade.

I then used gparted again on the same Breezy partition to expand it to 2.75GB, so just on the margin between too little and enough space.

This time 'gksudo update-manager -d' ran without a warning about space. Download of packages went fine. However, about three-quarters of the way through the actual install, errors began to be reported. The first one was about failing to write to a status record; although the message said the upgrade would abort, it actually continued for a couple of minutes and then really failed.

At this point the install terminal showed a message that there was no space on the disc. The install then aborted.

df confirmed a full disc partition. (/ on dev/hda3).

I will be attaching the /var/log/dist-upgrade*.log files as soon as I can get them off the machine. (The full disc means not all tools and networking are working properly for the moment...)

Revision history for this message
Neil Woolford (neil-neilwoolford) wrote : dist-upgrade-apt.log

Sorry it took me so long to get it off the machine...
A full disc and a partial install made the system 'interesting' to use.

Knoppix finally triumphed though ;)

Revision history for this message
Neil Woolford (neil-neilwoolford) wrote : dist-upgrade-term.log

As above. One more to come.

Revision history for this message
Neil Woolford (neil-neilwoolford) wrote : dist-upgrade.log

The last of the three.

Revision history for this message
Michael Vogt (mvo) wrote :

Thanks for this log, I think I found the bug and will attach a patch next.

Changed in update-manager:
status: Needs Info → Confirmed
Revision history for this message
Michael Vogt (mvo) wrote : fix for the free space check

fix for the free space check

Revision history for this message
Neil Woolford (neil-neilwoolford) wrote :

Would you like me to try the patched version of the space check tonight?

If so, which file should I be applying the patch to? (I've not done a patch before - point me to a howto if appropriate.) Or is the patch about to enter the build? In which case I could check it there.

Neil

Revision history for this message
Michael Vogt (mvo) wrote :

This problem is fixed in the current version of the upgrade tool in dapper.

Changed in update-manager:
status: Confirmed → Fix Released
Revision history for this message
Jiří Andrys (felacisko) wrote :

"This problem is fixed in the current version of the upgrade tool in dapper."

Do you fix this problem in Breezy, too? Today I try to upgrade Breezy to Dapper and I have the same problem like mnemo.

Revision history for this message
Neil Woolford (neil-neilwoolford) wrote :

The fix is a patch to one of the Python scripts that is downloaded by the upgrade-manager when you select to upgrade to the new version. It isn't part of the original Breezy install. (Or actually installed Dapper, strictly speaking.) You should automatically get the patched version now.

It certainly worked for me: the unpatched version of DistUpgradeControler.py told me I needed to free 70MB of extra space, the patched version said 212MB. I made this space, and got a faultless install which immediately warned me on completion that the disc was 96% full!

So I think the patch *does* work, but maybe there is not much safety margin .

I suggest that Ander should consider attaching "the files in /var/log/dist-upgrade*.log" as I did in response to Michael Vogt's earlier posting in this bug, in case they give a hint as to possible reasons for the problem.

Revision history for this message
Jiří Andrys (felacisko) wrote : from Ander

I had 1.2GB free space on root disc.
Version of update-manager was 0.42.2ubuntu12~breezy2

Revision history for this message
Jiří Andrys (felacisko) wrote : dist-upgrade-apt.log

Second log file.

File "dist-upgrade-term.log" had zero size.

I am sorry, but I was really impatient, so I use apt-get dist-upgrade for upgrading to Dapper. I hope that these log files will be helpful.

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.