install with encrypted home failed near the end: OSError: [Errno 12] Cannot allocate memory

Bug #979350 reported by Brian Murray
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
ecryptfs-utils (Ubuntu)
Fix Released
Undecided
Unassigned
Precise
Fix Released
Undecided
Unassigned
ubiquity (Ubuntu)
Fix Released
High
Colin Watson
Precise
Fix Released
High
Colin Watson
user-setup (Ubuntu)
Fix Released
High
Colin Watson
Precise
Fix Released
High
Colin Watson

Bug Description

I was trying to recreate another bug and just a full disk install with an encrypted home and received a notification that ubiquity had crashed.

TEST CASE:
1. Use a system with 1GB of RAM or less or a VM and set Virtual Memory to 1024MB
2. Boot a Live Session
3. Start Ubiquity
4. Select the following options:
  - prepare: select 'Download upgrades while installing' and 'Install 3rd party software'
  - partman: use entire disk
  - user setup: Encrypt my home directory
5. Proceed with installation

ACTUAL RESULT
Near the end of installation ubiquity crash with the following error in syslog:
Apr 11 20:52:47 ubuntu plugininstall.py: self.pid = os.fork()
Apr 11 20:52:47 ubuntu plugininstall.py: OSError: [Errno 12] Cannot allocate memory

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: ubiquity 2.10.8
ProcVersionSignature: Ubuntu 3.2.0-22.35-generic 3.2.14
Uname: Linux 3.2.0-22-generic x86_64
ApportVersion: 2.0-0ubuntu4
Architecture: amd64
CasperVersion: 1.314
Date: Wed Apr 11 13:53:54 2012
InstallCmdLine: file=/cdrom/preseed/ubuntu.seed boot=casper initrd=/casper/initrd.lz quiet splash -- maybe-ubiquity
LiveMediaBuild: Ubuntu 12.04 LTS "Precise Pangolin" - Beta amd64 (20120410)
ProcEnviron:
 LANGUAGE=en_US.UTF-8
 TERM=linux
 PATH=(custom, no user)
 LANG=en_US.UTF-8
SourcePackage: ubiquity
UpgradeStatus: No upgrade log present (probably fresh install)

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

Ah, I seem to have run out of memory:

Apr 11 20:52:47 ubuntu plugininstall.py: log-output -t ubiquity cp -a /var/log/syslog /target/var/log/installer/syslog
Apr 11 20:52:47 ubuntu plugininstall.py: Exception during installation:
Apr 11 20:52:47 ubuntu plugininstall.py: Traceback (most recent call last):
Apr 11 20:52:47 ubuntu plugininstall.py: File "/usr/share/ubiquity/plugininstall.py", line 1720, in <module>
Apr 11 20:52:47 ubuntu plugininstall.py: install.run()
Apr 11 20:52:47 ubuntu plugininstall.py: File "/usr/share/ubiquity/plugininstall.py", line 57, in wrapper
Apr 11 20:52:47 ubuntu plugininstall.py: self.cleanup()
Apr 11 20:52:47 ubuntu plugininstall.py: File "/usr/share/ubiquity/plugininstall.py", line 1701, in cleanup
Apr 11 20:52:47 ubuntu plugininstall.py: misc.execute('umount', os.path.join(self.target, 'cdrom'))
Apr 11 20:52:47 ubuntu plugininstall.py: File "/usr/lib/ubiquity/ubiquity/misc.py", line 506, in execute
Apr 11 20:52:47 ubuntu plugininstall.py: status = subprocess.call(log_args)
Apr 11 20:52:47 ubuntu plugininstall.py: File "/usr/lib/python2.7/subprocess.py", line 493, in call
Apr 11 20:52:47 ubuntu plugininstall.py: return Popen(*popenargs, **kwargs).wait()
Apr 11 20:52:47 ubuntu plugininstall.py: File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
Apr 11 20:52:47 ubuntu plugininstall.py: errread, errwrite)
Apr 11 20:52:47 ubuntu plugininstall.py: File "/usr/lib/python2.7/subprocess.py", line 1143, in _execute_child
Apr 11 20:52:47 ubuntu plugininstall.py: self.pid = os.fork()
Apr 11 20:52:47 ubuntu plugininstall.py: OSError: [Errno 12] Cannot allocate memory

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

I'd allocated 768 MB to the virtual machine, perhaps that isn't enough with an encrypted home?

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

Bug 977390 is another bug where the system ran out of memory, however they were not using an encrypted home.

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

I increased the amount of RAM to 1024 MB and my install completed successfully.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote : Traceback

Exception during installation:
Apr 11 20:52:47 ubuntu plugininstall.py: Traceback (most recent call last):
Apr 11 20:52:47 ubuntu plugininstall.py: File "/usr/share/ubiquity/plugininstall.py", line 1720, in <module>
Apr 11 20:52:47 ubuntu plugininstall.py: install.run()
Apr 11 20:52:47 ubuntu plugininstall.py: File "/usr/share/ubiquity/plugininstall.py", line 57, in wrapper
Apr 11 20:52:47 ubuntu plugininstall.py: self.cleanup()
Apr 11 20:52:47 ubuntu plugininstall.py: File "/usr/share/ubiquity/plugininstall.py", line 1701, in cleanup
Apr 11 20:52:47 ubuntu plugininstall.py: misc.execute('umount', os.path.join(self.target, 'cdrom'))
Apr 11 20:52:47 ubuntu plugininstall.py: File "/usr/lib/ubiquity/ubiquity/misc.py", line 506, in execute
Apr 11 20:52:47 ubuntu plugininstall.py: status = subprocess.call(log_args)
Apr 11 20:52:47 ubuntu plugininstall.py: File "/usr/lib/python2.7/subprocess.py", line 493, in call
Apr 11 20:52:47 ubuntu plugininstall.py: return Popen(*popenargs, **kwargs).wait()
Apr 11 20:52:47 ubuntu plugininstall.py: File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
Apr 11 20:52:47 ubuntu plugininstall.py: errread, errwrite)
Apr 11 20:52:47 ubuntu plugininstall.py: File "/usr/lib/python2.7/subprocess.py", line 1143, in _execute_child
Apr 11 20:52:47 ubuntu plugininstall.py: self.pid = os.fork()
Apr 11 20:52:47 ubuntu plugininstall.py: OSError: [Errno 12] Cannot allocate memory
Apr 11 20:52:47 ubuntu plugininstall.py:

tags: added: installer-crash
Revision history for this message
Launchpad Janitor (janitor) wrote : Re: install with encrypted home failed near the end

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

Changed in ubiquity (Ubuntu):
status: New → Confirmed
Revision history for this message
Ubuntu QA Website (ubuntuqa) wrote :

This bug has been reported on the Ubuntu ISO testing tracker.

A list of all reports related to this bug can be found here:
http://iso.qa.ubuntu.com/qatracker/reports/bugs/979350

tags: added: iso-testing
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

I reproduce it with 1GB or virtual ram in a VM, encrypted home, 3rd party software and download updates selected.

Changed in ubiquity (Ubuntu Precise):
importance: Undecided → High
Changed in ubiquity (Ubuntu Precise):
assignee: nobody → Canonical Foundations Team (canonical-foundations)
summary: - install with encrypted home failed near the end
+ install with encrypted home failed near the end: OSError: [Errno 12]
+ Cannot allocate memory
tags: added: qa-manual-testing rls-mgr-p-tracking
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

debug log

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

I saw this but mine was marked as a duplicate. The machine I tested it on was bare metal HP Mini 110 with 1024M ram. It failed when I did 'Try Ubuntu', encrypted home, 3rd part and download updates selected. I was able to complete an install with encrypted home if I didn't 'Try Ubuntu' first.

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

I just tried this in a VM with 1024M ram, encrypted home, and 3rd party selected and had the same problem when using 'Install Ubuntu'. Upping the ram to 2048M worked around the issue.

Revision history for this message
Gema Gomez (gema) wrote :

I have been able to reproduce this on a netbook as well. Ubiquity crashes eventually with encrypted home, 3rd party sw and download updates selected.

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

I traced memory usage of Ubiquity (with pmap -d) and there is a huge increase of memory when the slideshow starts (~ +1.5GB)
The graph is attached

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

log files and data file

description: updated
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

This issue is specific to amd64. On i386 the installation finishes without error.
Memory consumption on i386 is much lower than on amd64 (factor 4 to 8)
The graph attached is for i386 on a VM with 512MB.

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

"Writable" data also includes any writable mmap()ed files, so is not necessarily a good indicator of memory usage; seeing this jump from the slideshow probably just points to the data files being loaded and doesn't correspond to a real increase in memory usage (since 1.5GB would also obviously be a problem *without* ecryptfs). So this may not be the memory we're looking for.

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

I don't know if this will make much difference, but worth a shot if the slideshow is responsible for that much:

ubiquity (2.10.12) precise-proposed; urgency=low

  * Fix download verification to handle epochs correctly, and add a little
    more logging so that we can debug any further errors along these lines.
  * GTK frontend:
    - Disable WebKit's cache, since the slideshow doesn't have a significant
      browsing interface and the cache is memory-hungry. This may help with
      LP #979350.

 -- Colin Watson <email address hidden> Fri, 13 Apr 2012 19:49:13 +0100

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

It doesn't help matters that ecryptfs-setup-swap disables the compressed RAM device that we use for swap on live CDs under memory pressure. That probably doesn't make much difference in the 1GB case, but it'd still be a good thing to fix.

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

This bug was fixed in the package ecryptfs-utils - 96-0ubuntu3

---------------
ecryptfs-utils (96-0ubuntu3) precise; urgency=low

  * src/utils/ecryptfs-setup-swap: Skip /dev/zram* swap devices
    (LP: #979350).
 -- Colin Watson <email address hidden> Wed, 18 Apr 2012 15:52:45 +0100

Changed in ecryptfs-utils (Ubuntu Precise):
status: New → Fix Released
Colin Watson (cjwatson)
Changed in ubiquity (Ubuntu Precise):
assignee: Canonical Foundations Team (canonical-foundations) → Colin Watson (cjwatson)
Colin Watson (cjwatson)
tags: added: rls-p-tracking
removed: rls-mgr-p-tracking
Changed in user-setup (Ubuntu Precise):
status: New → Triaged
importance: Undecided → High
assignee: nobody → Colin Watson (cjwatson)
Changed in ubiquity (Ubuntu Precise):
status: Confirmed → Triaged
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package user-setup - 1.42ubuntu3

---------------
user-setup (1.42ubuntu3) precise; urgency=low

  * user-setup-apply:
    - Revert the change from 1.42ubuntu2. We'll handle this in ubiquity
      instead; in d-i, it seems to be too difficult to get right without the
      aid of script libraries from cryptsetup.
    - If OVERRIDE_ALREADY_ENCRYPTED_SWAP is set in the environment, assume
      that encrypted swap has already been set up rather than re-creating
      and re-zeroing swap (LP: #979350).
 -- Colin Watson <email address hidden> Thu, 19 Apr 2012 02:46:54 +0100

Changed in user-setup (Ubuntu Precise):
status: Triaged → Fix Released
Revision history for this message
Steve Langasek (vorlon) wrote :

The ubiquity side of this is in the upload just accepted into precise-proposed.

Changed in ubiquity (Ubuntu Precise):
status: Triaged → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubiquity - 2.10.14

---------------
ubiquity (2.10.14) precise-proposed; urgency=low

  [ Colin Watson ]
  * Install ubiquity-frontend-$frontend along with oem-config-$frontend to
    improve dependency resolution; with the packaging the way it is at the
    moment, apt may sometimes select ubiquity-frontend-kde to resolve
    ubiquity's dependency on a frontend before realising that oem-config-gtk
    already depends on ubiquity-frontend-gtk.
  * Don't default to installing GRUB to a removable device with /cdrom
    mounted from it, even if /cdrom's filesystem isn't iso9660
    (LP: #984989).
  * If encrypting the user's home directory, wipe and enable encrypted swap
    before starting the slideshow, because running the slideshow can use up
    a lot of memory so we won't be able to disable swap once that's in
    progress (LP: #979350).
  * Automatic update of included source packages: apt-setup 1:0.55ubuntu3,
    partman-base 153ubuntu4, user-setup 1.42ubuntu3.
  * If /etc/network/interfaces doesn't exist when configuring the network in
    oem-config, write out a skeleton one (LP: #985305).

  [ Stéphane Graber ]
  * Always install oem-config-slideshow-ubuntu in OEM mode, also for
    alternate installs (LP: #984736)
 -- Colin Watson <email address hidden> Thu, 19 Apr 2012 03:30:44 +0100

Changed in ubiquity (Ubuntu Precise):
status: Fix Committed → 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.