do-release-upgrade crashed with UnboundLocalError in _replaceDebsWithSnaps(): local variable 'proc' referenced before assignment
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ubuntu-release-upgrader (Ubuntu) |
Fix Released
|
High
|
Brian Murray | ||
Bionic |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Adding support for transitioning debs to snaps when upgrading from 16.04 to 18.04, bug 1780841, ended up creating a crash in a specific scenario.
[Test Case]
1) Install and Ubuntu 16.04 desktop system
2) Modify /etc/hosts so api.snapcraft.io resolves to 127.0.0.1
3) Upgrade to Ubuntu 18.04 using u-r-u 18.04.20 (sudo ./bionic --frontend DistUpgradeView
4) Observe the Traceback in this bug report
N.B. You'll need to manually download and extract the release upgrader tarball from http://
I was testing a release upgrade from Ubuntu 16.04 to Ubuntu 18.04 where I had no connectivity to the snap store and encountered this crash.
ProblemType: CrashDistroRelease: Ubuntu 18.04
Package: ubuntu-
ProcVersionSign
Uname: Linux 4.4.0-121-generic x86_64
ApportVersion: 2.20.9-0ubuntu7.2
Architecture: amd64
CrashDB: ubuntu
Date: Wed Jul 11 20:03:49 2018
ExecutablePath: /usr/bin/
ExecutableTimes
InstallationDate: Installed on 2016-10-04 (645 days ago)
InstallationMedia: Ubuntu 16.04.1 LTS "Xenial Xerus" - Release amd64 (20160719)
InterpreterPath: /usr/bin/python3.5
PackageArchitec
ProcCmdline: /usr/bin/python3 ./bionic --frontend DistUpgradeViewText
ProcCwd: /tmp/u-r-u
ProcEnviron:
TERM=screen
SHELL=/bin/bash
PATH=(custom, no user)
LANG=en_US.UTF-8
LC_CTYPE=
Python3Details: /usr/bin/python3.6, Python 3.6.5, python3-minimal, 3.6.5-3ubuntu1
PythonArgs: ['/usr/
PythonDetails: /usr/bin/python2.7, Python 2.7.15rc1, python-minimal, 2.7.15~
Title: do-release-upgrade crashed with UnboundLocalError in _replaceDebsWit
UpgradeStatus: Upgraded to bionic on 2018-07-12 (0 days ago)
UserGroups:
modified.
mtime.conffile.
Related branches
description: | updated |
Here's the Traceback:
Traceback (most recent call last): exit(main( )) r-u/DistUpgrade /DistUpgradeMai n.py", line 238, in main r-u/DistUpgrade /DistUpgradeCon troller. py", line 1949, in run r-u/DistUpgrade /DistUpgradeCon troller. py", line 1926, in fullUpgrade doPostUpgrade( ) r-u/DistUpgrade /DistUpgradeCon troller. py", line 1336, in doPostUpgrade quirks. run("PostUpgrad e") r-u/DistUpgrade /DistUpgradeQui rks.py" , line 113, in run r-u/DistUpgrade /DistUpgradeQui rks.py" , line 138, in bionicPostUpgrade _replaceDebsWit hSnaps( ) r-u/DistUpgrade /DistUpgradeQui rks.py" , line 543, in _replaceDebsWit hSnaps
File "./bionic", line 8, in <module>
sys.
File "/tmp/u-
if app.run():
File "/tmp/u-
return self.fullUpgrade()
File "/tmp/u-
self.
File "/tmp/u-
self.
File "/tmp/u-
func()
File "/tmp/u-
self.
File "/tmp/u-
if proc.returncode == 0:
UnboundLocalError: local variable 'proc' referenced before assignment