unreliable network connection can cause update-manager to delete whole system

Bug #335154 reported by Richard C
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
update-manager (Ubuntu)
Fix Released
Undecided
Michael Vogt

Bug Description

Binary package hint: update-manager

Hello,

I was struggling with an unreliable Internet connection for some time, and it would drop out semi-frequently (new DSL line, connected via router, not direct to my PC). This is not ideal, but the consequesnses were a surprise.

My expectation (please correct me if I am wrong) was that update manager would attempt to download all the packages required, and on failure exit. At this point, I could restart update manager and continue downloading pretty much were it left off, as the previously completed packages would be found in the cache and skipped. I didn't worry about corruption of packages as they're signed, and wouldn't get past dpkg.

What happened is a bit unclear, as my system is not bootable. I can mount the disk for forensic purposes though. It appears that all of the packages were marked as obsolete, and uninstalled. Essentially "sudo ls -Rf /" via dpkg. The system is not bootable, the root partition is essentially ruined.

This was an update of 8.04 LTS (up to date at start of this process), to the (not LTS) 8.10 version. I'm happy to help find out how this happened so other uses don't have to suffer. If some way to rescue the machine cold be found, then that would be great, too.

Thanks for all your hard work,

Richard

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

Thanks for your bugreport.

Could you please attach the files in /var/log/dist-ugprade from the bad upgrade? This sounds pretty bad.

Changed in update-manager:
assignee: nobody → mvo
status: New → Incomplete
Revision history for this message
Richard C (richard-c) wrote : Re: [Bug 335154] Re: unreliable network connection can cause update-manager to delete whole system

Sorry for the delay. gzipped tar of the directory is attached. Let me
know if there's anything else I can add.

Richard

2009/3/5 Michael Vogt <email address hidden>:
> Thanks for your bugreport.
>
> Could you please attach the files in /var/log/dist-ugprade from the bad
> upgrade? This sounds pretty bad.
>
> --
> unreliable network connection can cause update-manager to delete whole system
> https://bugs.launchpad.net/bugs/335154
> You received this bug notification because you are a direct subscriber
> of the bug.
>
>
>

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

Thanks a lot for the log.

It is a bit mysterious what happend, even with the log. It looks like the u-m thought that it was able to do a update from your mirror, but the Packages files that it got were empty. If you could add the content of /var/lib/apt/lists ads well, that would be most appreciated. I added extra paranoia code to ensure this does not happen anymore to the obsoletes calculation and extra care to the update code. This should hopefully fix the problem. Still, the contents of /var/lib/apt/lists will be helpful to diagnose it further.

Thanks,
 Michael

Changed in update-manager (Ubuntu):
status: Incomplete → In Progress
Revision history for this message
Richard C (richard-c) wrote :

Hi Michael,

Please find the directory contents attached as tgz.

Any ideas how I might get this disk back towards working? I recall
there's something like/called "debbootstrap", but I'm not sure where
to start.

Thanks,

Richard

2009/3/16 Michael Vogt <email address hidden>:
> Thanks a lot for the log.
>
> It is a bit mysterious what happend, even with the log. It looks like
> the u-m thought that it was able to do a update from your mirror, but
> the Packages files that it got were empty. If you could add the content
> of /var/lib/apt/lists ads well, that would be most appreciated. I added
> extra paranoia code to ensure this does not happen anymore to the
> obsoletes calculation and extra care to the update code. This should
> hopefully fix the problem. Still, the contents of /var/lib/apt/lists
> will be helpful to diagnose it further.
>
> Thanks,
>  Michael
>
> ** Changed in: update-manager (Ubuntu)
>       Status: Incomplete => In Progress
>
> --
> unreliable network connection can cause update-manager to delete whole system
> https://bugs.launchpad.net/bugs/335154
> You received this bug notification because you are a direct subscriber
> of the bug.
>
>
>

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

Hi Richard,

it looks like the attachment did not made it. Could you please add it again? To get your system back, its probably best if you still have a shell to just "chroot" into it and run "sudo apt-get install ubuntu-destkop". If no shell is available anymore, "debootstrap jaunty /mount/point/of/the/install http://uk.archive.ubuntu.com/ubuntu"

Revision history for this message
Richard C (richard-c) wrote :

third time lucky: contents of /var/lib/apt/lists recovered from busted machine

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

This bug was fixed in the package update-manager - 1:0.101.1

---------------
update-manager (1:0.101.1) jaunty; urgency=low

  [ Michael Vogt ]
  * DistUpgrade/DistUpgradeCache.py:
    - catch cache.update() errors that do not raise exceptions
  * DistUpgrade/DistUpgradeController.py:
    - when calculating the obsolete packages, add extra paranoia
      for odd network failures (LP: #335154)
  * DistUpgrade/DistUpgradeAufs.py:
    - do not overlay /var/cache/apt/archives so that the user
      does not have to download the packages twice
    - honor the TMPDIR environment (by using tempfile)
  * DistUpgrade/DistUpgrade.cfg:
    - add powernowd to the forced obsoleted packages (the kernel
      does handle that with the builin ondemand governor now)

  [ Jonathan Riddell ]
  * DistUpgrade/DistUpgrade.cfg:
    - remove gtk-qt-engine in Kubuntu upgrades

 -- Michael Vogt <email address hidden> Wed, 18 Mar 2009 17:57:54 +0100

Changed in update-manager:
status: In Progress → 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.