do-release-upgrade crashed with IOError in init_proxy(): [Errno 5] Input/output error

Bug #982082 reported by Michel
38
This bug affects 7 people
Affects Status Importance Assigned to Milestone
ubuntu-release-upgrader (Ubuntu)
Fix Released
Medium
Barry Warsaw

Bug Description

machine upgrade from 11.10
machine reboot
this bug experienced
same type of error after machine suspend and restarted.

ProblemType: Crash
DistroRelease: Ubuntu 12.04
Package: update-manager-core 1:0.156.11
ProcVersionSignature: Ubuntu 3.2.0-23.36-generic 3.2.14
Uname: Linux 3.2.0-23-generic i686
ApportVersion: 2.0.1-0ubuntu2
Architecture: i386
Date: Sat Apr 14 14:57:33 2012
ExecutablePath: /usr/bin/do-release-upgrade
GsettingsChanges:

InterpreterPath: /usr/bin/python2.7
ProcCmdline: /usr/bin/python /usr/lib/update-manager/check-new-release -q
ProcEnviron:
 LANGUAGE=fr_FR:fr:en_GB:en
 PATH=(custom, user)
 LANG=fr_FR.UTF-8
 SHELL=/bin/bash
PythonArgs: ['/usr/lib/update-manager/check-new-release', '-q']
SourcePackage: update-manager
Title: do-release-upgrade crashed with IOError in init_proxy(): [Errno 5] Input/output error
UpgradeStatus: Upgraded to precise on 2012-04-14 (0 days ago)
UserGroups:

Revision history for this message
Michel (michel-mno) wrote :
tags: removed: need-duplicate-check
Michel (michel-mno)
visibility: private → public
Changed in update-manager (Ubuntu):
importance: Undecided → Medium
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
Yvan Arnaud (yvanarnaud) wrote :

Hi,
this bug report is a bit old but as there is no answer yet, I'll describe my own experience with it.
I had a similar error after login on a fresh install of precise desktop.
Launching do-release-upgrade on command line reported an invalid proxy error.
I found out that I had an invalid proxy declaration in /etc/apt/apt.conf.
So, correcting the Acquire::http::proxy line with the valid proxy address was the solution for me.
Best regards

Revision history for this message
Brian Murray (brian-murray) wrote :

This still seems possible with the code in raring.

affects: update-manager (Ubuntu) → ubuntu-release-upgrader (Ubuntu)
Changed in ubuntu-release-upgrader (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
Brian Murray (brian-murray) wrote :

I believe this crash could happen because init_proxy from from UpdateManager.Core.utils import prints to sys.stderr which may not be available depending on how check-new-release-gtk is called.

Revision history for this message
Brian Murray (brian-murray) wrote :

The same thing seems to happen in get_dist when it writes to sys.stderr and if check-new-release-gtk is called with -q.

You can see some crashes about this at:

https://errors.ubuntu.com/bucket/?id=/usr/bin/do-release-upgrade%3AIOError%3A%3Cmodule%3E%3A__init__%3Aget_dist
https://errors.ubuntu.com/problem/2df096bdb247ddda764df92e21b99d920fa1c2df

Revision history for this message
Brian Murray (brian-murray) wrote :

I wonder if a similar problem could be causing this error:

https://errors.ubuntu.com/problem/2ee37f473307472828bd2bc1b7fe749a69d3bc86

where we are getting an IOError when trying to print.

Revision history for this message
Barry Warsaw (barry) wrote :

AFAICT, check-new-release-gtk does not and never did accept a -q option.

Revision history for this message
Brian Murray (brian-murray) wrote :

My mistake I really meant check-new-release -q, and check-new-release is a symlink to do-release-upgrade. It may be worth looking at release-upgrade-motd which calls check-new-release -q.

Revision history for this message
Barry Warsaw (barry) wrote :

After discussion on IRC and some additional investigations, it seems like what's happening is that stderr is being closed at some point during the update-motd process. If stderr is closed, then lsb_release can exit with a non-zero status, and this will cause check-new-release to try to write to stderr, which will cause the IOError if it's closed.

It's not entirely clear to us why or how stderr can get closed, and no one here has been able to reproduce the problem. However, we have a possible workaround. If you are having the problem, please try the attached patch and see if that fixes the bug. If so, we'll get this into saucy and SRU it into stable releases.

Note this is only a workaround, but after discussion with Colin, and in the absence of a reproducer or more information, it's probably still reasonable to apply this. You may need to apply this diff to /etc/update-motd.d/91-release-upgrade

Changed in ubuntu-release-upgrader (Ubuntu):
status: Triaged → Incomplete
assignee: nobody → Barry Warsaw (barry)
Revision history for this message
Barry Warsaw (barry) wrote :

Marking as incomplete so that we can get more information from someone who is affected.

tags: added: patch
Revision history for this message
Barry Warsaw (barry) wrote :

Okay, so the patch in #10 is just papering over the problem.

After further discussions, we think there's a possibility that LP: #1094218 could be related, although we have no direct evidence of this. For the sake of argument, let's say it is. If the IOError with error code 10 that is displayed in that bug occurs in this case, then that would explain lsb_release exiting with a non-zero status, potentially providing us with the root cause. We still don't have an explanation for why stderr would be closed in update-motd, but if we can prevent lsb_release from exiting non-zero, then check-new-release won't try to write to stderr. Anyway, a fix for LP: #1094218 has been uploaded to precise-proposed so let's cross our fingers and see what happens.

Revision history for this message
Brian Murray (brian-murray) wrote :

The errors listed in comment #6 aren't accessible at this point in time due to the migration of errors.ubuntu.com, however looking at e.u.c for new instances of this issue I don't see any so it may be fixed. Then again there probably aren't a lot of distribution upgrades happening at this point in time, so let's wait a bit longer to close this one out.

peterstan (stasnel)
Changed in ubuntu-release-upgrader (Ubuntu):
status: Incomplete → Opinion
Changed in ubuntu-release-upgrader (Ubuntu):
status: Opinion → Confirmed
Revision history for this message
Brian Murray (brian-murray) wrote :

I am unable to find any instances of this crash on the Error Tracker any more so I am marking this as Fix Released.

Changed in ubuntu-release-upgrader (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.