Upgrade from natty fails with 64-bit oneiric beta cd (I/O error while reading CD)

Bug #848659 reported by Tim Frost
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
update-manager (Ubuntu)
Expired
Medium
Michael Vogt
Oneiric
Won't Fix
Medium
Michael Vogt
Precise
Expired
Medium
Unassigned

Bug Description

System is running 64-bit natty. When I insert a CD burnt from image ubuntu-11.10-beta1-alternate-amd64.iso, the upgrade process runs until it is attempting to process the i386 Packages files. At that step, the upgrade process stops with error 'W:Failed to fetch cdrom://Ubuntu 11.10 _Oneiric Ocelot_ - Beta amd64 (20110901)/dists/oneiric/main/binary-i386/Packages Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs'

I note that the two i386 Packages.gz files are 20 bytes, corresponding to a zero-length uncompressed file.

Contents of /var/log/dist-upgrade attached as a tar archive

Revision history for this message
Tim Frost (timfrost) wrote :
Revision history for this message
Colin Watson (cjwatson) wrote :

Michael, this relates to the multiarch support in the dist-upgrader. Could you please have a look at this and tell me whether cdimage is doing something fundamentally wrong when building the disks?

affects: debian-installer (Ubuntu) → update-manager (Ubuntu)
Changed in update-manager (Ubuntu):
assignee: nobody → Michael Vogt (mvo)
Changed in update-manager (Ubuntu Oneiric):
importance: Undecided → High
milestone: none → ubuntu-11.10-beta-2
tags: added: rls-mgr-o-tracking
Revision history for this message
Tim Frost (timfrost) wrote :

Using the daily build ISO http://cdimage.ubuntu.com/daily/20110915/oneiric-alternate-amd64.iso appeared to work in a 64-bit virtual machine. With internet access available, it also downloaded packages files for the 32-bit architecture. However, the actual upgrade aborted part-way through. The contents of /var/lib/apt/lists are all files for oneiric (68 files, see attachment).

Most of the installed packages are reported by 'apt-get dist-upgrade' as still to be upgraded.

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

Here is the error from the second upgrade:

Traceback (most recent call last):
  File "/tmp/distupgrade.38Ckym/DistUpgradeView.py", line 201, in run
    res = pm.do_install(self.writefd)
SystemError: E:Could not perform immediate configuration on 'python-pyatspi2'. Please see man 5 apt.conf under APT::Immediate-Configure for details. (2)

Steve Langasek (vorlon)
Changed in update-manager (Ubuntu Oneiric):
milestone: ubuntu-11.10-beta-2 → ubuntu-11.10
Revision history for this message
Tim Frost (timfrost) wrote :

This now appears to be caused by a failed upgrade leaving a reference to the CD in /etc/apt/sources.list.

My preferred mirror appears to be missing some packages that the upgrade was trying to fetch. This caused a failed upgrade last night. I then switched mirrors and updated/upgraded natty, using update-manager, without looking at /etc/apt/sources.list.

When I re-tried the upgrade after that from the same CD, it aborted. I note that after a successful upgrade in a VM,. using the image from daily-20110920.5, term.log starts with warnings about duplicate sources.list entries and after the upgrade, the cdrom entry does indeed have 'main' and 'restricted' duplicated:

# added by the release upgrader
# deb cdrom:[Ubuntu 11.10 _Oneiric Ocelot_ - Beta amd64 (20110920.5)]/ oneiric main main restricted restricted

Revision history for this message
Tim Frost (timfrost) wrote :

I am now confused:
- my 64-bit server upgraded from a CD burnt from the 20110915 daily 64-bit server ISO, with no problems
- upgrade of a 64-bit VM which has no additional software succeeds using the 64-bit alternate ISO 20110920.5
- attempts to upgrade my main PC, running 64-bit natty, fail with the same error, during step 2 (setting new channels), using a CDRW created from any of:
  * 20110915 64-bit alternate ISO
  * 20110915 64-bit server ISO
   20110920.5 64-bit alternate ISO

In addition, do-release-upgrade can't find a development release, so I can't even use that to upgrade:
tim@zaphod:~$ sudo do-release-upgrade -d
[sudo] password for tim:
Checking for a new ubuntu release
No new release found
tim@zaphod:~$

The attempts to upgrade my main system DID fetch packages files from an acceptable repository even if I chose "NO" at the "Fetch latest updates from the network" question. It appears that the question only affects packages that are available from the CD - the packages fetched were from universe or multiverse or from the partner repository http://archive.canonical.com/ubuntu. If that is the case, then the message is misleading.

There is a (or at least a potential) secondary bug, because the upgrade process didn't recognise ucmirror.canterbury.ac.nz as a valid mirror, although natty synaptic offers that as a choice. I suspect that the upgrader doesn't recognise anything other than "*.archive.ubuntu.com" as a valid mirror. I discovered this when I switched mirror after discovering that the Citylink mirror that is considered official (nz.archive.ubuntu.com => ubuntu.citylink.co.nz) was not up-to-date, and tried to do the release update after selecting ucmirror.canterbury.ac.nz. With ucmirror.canterbury.ac.nz, I got 'no valid mirrors found'

Colin Watson (cjwatson)
Changed in update-manager (Ubuntu Oneiric):
status: New → Confirmed
Revision history for this message
Michael Vogt (mvo) wrote :

I was not able to reproduce this here on a oneiric system, I will need to setup a amd64 natty VM for proper testing.

Revision history for this message
Tim Frost (timfrost) wrote :

Further testing and research:
I used the server CD that successfully upgraded my server from natty to oneiric, and it failed at the same stage.

On the server, main.log showed repositories being disabled, then
 'running doUpdate() (showErrors=True)'

On the workstation, at the same stage in the process, it logged "AptCdrom.add() called with '/media/cdrom0'", this time with:
2011-09-24 11:19:27,896 ERROR IOError/SystemError in cache.update(): 'W:Failed to fetch cdrom://Ubuntu-Server 11.10 _Oneiric Ocelot_ - Beta amd64 (20110901)/dists/oneiric/main/binary-i386/Packages Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs
(The server ISO from 1 Sept daily build was used to create the CD).
The call to doUpdate() (showErrors=True) was logged immediately after 'AptCdrom.add() returned: True'

Revision history for this message
Tim Frost (timfrost) wrote :

Doing the natty->oneiric upgrade in a 32-bit VM offers a clue:
the ISO is mounted as '/media/Ubuntu 11.10 i386', rather than as /media/cdrom or /media/cdrom0. main.log shows:
2011-09-24 20:19:34,554 DEBUG AptCdrom.add() called with '/media/Ubuntu 11.10 i386'
2011-09-24 20:19:34,645 INFO ignoring missing '/media/Ubuntu 11.10 i386/dists/oneiric/restricted/debian-installer/binary-i386/Packages'
2011-09-24 20:19:34,658 INFO ignoring missing '/media/Ubuntu 11.10 i386/dists/oneiric/restricted/binary-i386/Packages'
2011-09-24 20:19:34,660 INFO ignoring missing '/media/Ubuntu 11.10 i386/dists/oneiric/main/debian-installer/binary-i386/Packages'
2011-09-24 20:19:34,695 INFO ignoring missing '/media/Ubuntu 11.10 i386/dists/oneiric/main/binary-i386/Packages'
2011-09-24 20:19:34,783 DEBUG AptCdrom.add() returned: True

Also, the upgrade is invoked by
/usr/bin/python /tmp/distupgrade.IR40Fz/oneiric --cdrom '/media/Ubuntu 11.10 i386'

These all use the name assigned when the ISO was created

On the physical PC, I see differences:
1: The CD is mounted at /media/cdrom0 rather than at '/media/Ubuntu 11.10 amd64'
2: AptCdrom.add is called with /media/cdrom0
3: The errors reference the disk ID from .disk/info, which is different from the disk name.
4: the upgrade is invoked as /usr/bin/python /tmp/tmp.SKbxzxdtVR/oneiric --cdrom /media/cdrom0

After burning the 64-bit beta2 to a new CDRW disk, I now appear to be succeeding with the upgrade. This suggests that there was an error with the media, and that the upgrade wasn't handling that error gracefully.

Revision history for this message
Tim Frost (timfrost) wrote :

This time, the upgrade succeeded. Looking at main.log, I note that this time I also said 'NO' to the question about use of the network to fetch the latest updates.

I note that AptCdrom.add() was called successfully during both attempts.

Running 'md5sum -c md5sum.txt | grep -v OK' on the bad disk gets lots of read errors for packages, so I assume that the error was generated by the process that checks packages on the CD.

This bug can be closed as 'invalid'

For the record, I have attached a tar archive of /var/log/dist-upgrade after the successful upgrade. It includes the subdirectories with logs of the 3 previous failed attempts.

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

Thanks for your bugreport.

I just tried this on a fresh install of natty amd64 in a clean VM. Then I added the oneiric alternative CD
and with both network and networkless upgrade option it recognized the CD and offered a correct update.

So at least the default case should work. I will still investigate why the previous attempt gave you the error.

Changed in update-manager (Ubuntu Oneiric):
status: Confirmed → Incomplete
importance: High → Medium
Revision history for this message
Michael Vogt (mvo) wrote :

In the 2011-09-24-1105 archive is:

2011-09-24 10:39:22,765 DEBUG AptCdrom.add() called with '/media/cdrom0'
2011-09-24 10:39:26,738 INFO ignoring missing '/media/cdrom0/dists/oneiric/restricted/debian-installer/binary-amd64/Packages'
2011-09-24 10:39:26,740 INFO ignoring missing '/media/cdrom0/dists/oneiric/restricted/binary-i386/Packages'
2011-09-24 10:39:26,756 INFO ignoring missing '/media/cdrom0/dists/oneiric/restricted/binary-amd64/Packages'
2011-09-24 10:39:26,769 INFO ignoring missing '/media/cdrom0/dists/oneiric/main/debian-installer/binary-amd64/Packages'
2011-09-24 10:39:26,799 INFO ignoring missing '/media/cdrom0/dists/oneiric/main/binary-i386/Packages'
2011-09-24 10:39:27,012 INFO ignoring missing '/media/cdrom0/dists/oneiric/main/binary-amd64/Packages'
2011-09-24 10:39:27,142 DEBUG AptCdrom.add() returned: True
2011-09-24 10:39:27,143 DEBUG running doUpdate() (showErrors=True)
2011-09-24 10:40:02,457 ERROR IOError/SystemError in cache.update(): 'W:Failed to fetch cdrom://Ubuntu 11.10 _Oneiric Ocelot_ - Beta amd64 (20110920.5)/dists/oneiric/main/binary-i386/Packages Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs

Even with disk errors the code should fail more gracefully so I will keep this at medium.

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

What does:
$ ls -l /var/lib/apt/lists/*Ubuntu*i386*
show?

Revision history for this message
Tim Frost (timfrost) wrote :

Unfortunately, I have already removed references to the CD, so there are no files matching /var/lib/apt/lists/*Ubuntu* at all .

Revision history for this message
Steve Langasek (vorlon) wrote :

The code should fail more gracefully, but I don't think it's realistic to get this fix in before 11.10. Deferring to p.

Changed in update-manager (Ubuntu Oneiric):
status: Incomplete → Won't Fix
summary: - Upgrade from natty fails with 64-bit oneiric beta cd
+ Upgrade from natty fails with 64-bit oneiric beta cd (I/O error while
+ reading CD)
Revision history for this message
Tim Frost (timfrost) wrote :

Agreed.

It *should* be fixed, but it only affects users if:
1: they are upgrading using a CD/DVD
AND
2: the media is bad
(and they have used that media without verifying that the file checksums are good)

Unfortunately, this will be hard to test, as it depends on having media (such as a CD-RW disk) that is bad, that you can write the iso image to.

Given the nature of the failure, I suspect that an install from bad media would also fail with similar symptoms, because the error is being detected by /usr/lib/apt/methods/cdrom (or the installer equivalent) when scanning the package files

Changed in update-manager (Ubuntu Precise):
status: New → Incomplete
importance: Undecided → Medium
Changed in update-manager (Ubuntu Oneiric):
milestone: ubuntu-11.10 → none
Changed in update-manager (Ubuntu):
milestone: ubuntu-11.10 → none
tags: added: rls-mgr-p-tracking
removed: rls-mgr-o-tracking
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for update-manager (Ubuntu Precise) because there has been no activity for 60 days.]

Changed in update-manager (Ubuntu Precise):
status: Incomplete → Expired
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.