ubuntu release upgrade failed due to too many open files

Bug #1214186 reported by Kevin Li
374
This bug affects 49 people
Affects Status Importance Assigned to Milestone
ubuntu-release-upgrader (Ubuntu)
Fix Released
High
Brian Murray
Saucy
Fix Released
High
Brian Murray

Bug Description

[Test Case]
1) Artificially set a limit on the number of files open using "ulimit -n 128" in a terminal
2) Open another package manager like synaptic
3) Run "/usr/lib/ubuntu-release-upgrader/check-new-release-gtk"
4) Choose to start the upgrade
5) Observe an apport bug filing dialog (after the Distribution Upgrade dialog has appeared)
6) Inspect the VarLogDistUpgradeMainlog.txt attachment for a 'too many open files error'
7) Do not report the bug

To test the release upgrader from -proposed use the following command "update-manager -p". This should include the fixed version of the release upgrader and raise an error message indicating that you have another package manager running titled "Unable to get exclusive lock".

[Regression Potential]
Rather small as I've just moved the line for when the apt-cache is initialized.

Ubuntu release upgrade failed. Terminal displays the following information:

Preparing the upgrade failed

Preparing the system for the upgrade failed so a bug reporting
process is being started.

kevin@KEVINXPS:~$
(process:3655): GLib-CRITICAL **: g_slice_set_config: assertion `sys_page_size == 0' failed

ProblemType: BugDistroRelease: Ubuntu 13.04
Package: ubuntu-release-upgrader-core 1:0.192.12
ProcVersionSignature: Ubuntu 3.8.0-27.40-generic 3.8.13.4
Uname: Linux 3.8.0-27-generic x86_64
ApportVersion: 2.9.2-0ubuntu8.3
Architecture: amd64
CrashDB: ubuntu
Date: Mon Aug 19 20:34:59 2013
InstallationDate: Installed on 2013-08-18 (1 days ago)
InstallationMedia: Ubuntu-GNOME 13.04 "Raring Ringtail" - Release amd64 (20130424)
MarkForUpload: True
PackageArchitecture: allSourcePackage: ubuntu-release-upgrader
UpgradeStatus: Upgraded to raring on 2013-08-20 (0 days ago)

Related branches

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

Status changed to 'Confirmed' because the bug affects multiple users.

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

Here is the error from main.log:

2013-08-19 20:34:44,337 DEBUG quirks: running PreCacheOpen
2013-08-19 20:34:44,337 DEBUG running Quirks.PreCacheOpen
2013-08-19 20:34:44,968 DEBUG failed to lock the cache, retrying (1)
2013-08-19 20:34:45,584 DEBUG failed to lock the cache, retrying (2)
2013-08-19 20:34:46,199 DEBUG failed to lock the cache, retrying (3)
2013-08-19 20:34:46,794 DEBUG failed to lock the cache, retrying (4)
2013-08-19 20:34:47,487 DEBUG failed to lock the cache, retrying (5)
2013-08-19 20:34:48,090 DEBUG failed to lock the cache, retrying (6)
2013-08-19 20:34:48,726 DEBUG failed to lock the cache, retrying (7)
2013-08-19 20:34:49,370 DEBUG failed to lock the cache, retrying (8)
2013-08-19 20:34:50,027 DEBUG failed to lock the cache, retrying (9)
2013-08-19 20:34:50,631 DEBUG failed to lock the cache, retrying (10)
2013-08-19 20:34:51,266 DEBUG failed to lock the cache, retrying (11)
2013-08-19 20:34:51,905 DEBUG failed to lock the cache, retrying (12)
2013-08-19 20:34:52,568 DEBUG failed to lock the cache, retrying (13)
2013-08-19 20:34:53,201 DEBUG failed to lock the cache, retrying (14)
2013-08-19 20:34:53,848 DEBUG failed to lock the cache, retrying (15)
2013-08-19 20:34:54,643 DEBUG failed to lock the cache, retrying (16)
2013-08-19 20:34:55,131 ERROR openCache() failed: 'E:Could not open file /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_raring_multiverse_i18n_Translation-en - open (24: Too many open files), E:Could not open file /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_raring_main_i18n_Translation-en - open (24: Too many open files), E:Could not open file /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_raring_multiverse_binary-i386_Packages - open (24: Too many open files), E:Could not open file /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_raring_universe_binary-i386_Packages - open (24: Too many open files), E:Could not open file /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_raring_restricted_binary-i386_Packages - open (24: Too many open files), E:Could not open file /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_raring_main_binary-i386_Packages - open (24: Too many open files), E:Could not open file /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_raring_multiverse_binary-amd64_Packages - open (24: Too many open files), E:Could not open file /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_raring_universe_binary-amd64_Packages - open (24: Too many open files), E:Could not open file /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_raring_restricted_binary-amd64_Packages - open (24: Too many open files), E:Could not open file /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_raring_main_binary-amd64_Packages - open (24: Too many open files)'
2013-08-19 20:34:55,131 ERROR self.prepared() failed

summary: - ubuntu release upgrade failed
+ ubuntu release upgrade failed due to too many open files
Changed in ubuntu-release-upgrader (Ubuntu):
importance: Undecided → High
status: Confirmed → Triaged
Revision history for this message
Brian Murray (brian-murray) wrote :

This seems to be an issue with how the apt cache is managed in DistUpgradeController.py.

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

A solution for a similar issue in some other packages can be found in bug 1051935.

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

Most of the users encountering this bug have a few PPAs enabled which will cause their own issues during the upgrade process, so I'm downgrading the importance to Medium.

Changed in ubuntu-release-upgrader (Ubuntu):
importance: High → Medium
Changed in ubuntu-release-upgrader (Ubuntu):
importance: Medium → High
tags: added: gnome-shell
Changed in ubuntu-release-upgrader (Ubuntu):
assignee: nobody → Brian Murray (brian-murray)
status: Triaged → In Progress
Changed in ubuntu-release-upgrader (Ubuntu Saucy):
status: New → In Progress
importance: Undecided → High
assignee: nobody → Brian Murray (brian-murray)
Revision history for this message
Adam Conrad (adconrad) wrote : Please test proposed package

Hello Kevin, or anyone else affected,

Accepted ubuntu-release-upgrader into saucy-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/ubuntu-release-upgrader/1:0.205.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in ubuntu-release-upgrader (Ubuntu Saucy):
status: In Progress → Fix Committed
tags: added: verification-needed
description: updated
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-release-upgrader - 1:0.208

---------------
ubuntu-release-upgrader (1:0.208) trusty; urgency=low

  [ Brian Murray ]
  * Synchronize the list of metapackages used in the code. LP: #1225016.
  * Properly display error messages encountered by DistUpgradeFetcherCore.
    (LP: #1241660)
  * DistUpgrade/DistUpgradeCache.py: Do not initialize the cache until we know
    it is unlocked. (LP: #1214186)
 -- Brian Murray <email address hidden> Fri, 25 Oct 2013 09:17:56 -0700

Changed in ubuntu-release-upgrader (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote :

Using the ubuntu-release-upgrader from saucy-proposed I successfully completed an upgrade from raring to saucy. However, I had not set the ulimit, this was just to confirm that the upgrade still works.

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

I tested the release upgrader from -proposed using update-manager -p after having set a ulimit of 256 and running synaptic at the same time. I did receive a dialog regarding having another package manager running.

tags: added: verification-done
removed: verification-needed
Revision history for this message
翔宇 (xuxiangyu981216) wrote : 回复:[Bug 1214186] Re: ubuntu release upgrade failed due to too many open files

Sorry.. I am just a Chinese student and my English is not very well. So I do not know what you're talking about (You succeeded to update it?). And I have tried to update it again that day and then I succeeded to upgrade it.

Anyway, I am very grateful for your E-mail.

Revision history for this message
Mike Carifio (carifio) wrote :

Still broken for me. I enabled saucy-proposed, 'sudo apt-get update' and then 'sudo do-release-upgrade -p'. Same errors. Do I need to install packages from saucy-proposed before doing the 'do-release-upgrade'? Pl. advise. Thanks.

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

@Mike - Could you please add the /var/log/dist-upgrader/main.log file from your most recent upgrade attempt? Thanks in advance.

Revision history for this message
Mike Carifio (carifio) wrote :

As requested.

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

@Mike - you are encountering bug 1241541 which you'd previously reported and not this particular one.

Revision history for this message
Mike Carifio (carifio) wrote :

Got it. Sorry 'bout that.

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

This bug was fixed in the package ubuntu-release-upgrader - 1:0.205.2

---------------
ubuntu-release-upgrader (1:0.205.2) saucy-proposed; urgency=low

  * DistUpgrade/DistUpgradeCache.py: Do not initialize the cache until we know
    it is unlocked. (LP: #1214186)
 -- Brian Murray <email address hidden> Fri, 25 Oct 2013 10:01:55 -0700

Changed in ubuntu-release-upgrader (Ubuntu Saucy):
status: Fix Committed → Fix Released
Revision history for this message
Scott Kitterman (kitterman) wrote : Update Released

The verification of this Stable Release Update has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

To post a comment you must log in.