Runaway init --user consuming CPU and RAM

Bug #1257880 reported by Michael Hall
34
This bug affects 8 people
Affects Status Importance Assigned to Milestone
upstart (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

My Unity 8 froze on my Nexus 4. After connecting it to USB and adb shell, I found that 'init --user' was using 100% CPU and 60% RAM (> 1g). I ran "ubuntu-bug upstart" while it was still running to try and gather any information about what it was doing.

root@ubuntu-phablet:/# system-image-cli -i
current build number: 32
device name: mako
channel: trusty
last update: 2013-11-27 13:22:03
version version: 32
version ubuntu: 20131126.2
version device: 20131126

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: upstart 1.11-0ubuntu1
Uname: Linux 3.4.0-3-mako armv7l
ApportVersion: 2.12.7-0ubuntu1
Architecture: armhf
Date: Wed Dec 4 14:08:43 2013
InstallationDate: Installed on 2013-11-26 (8 days ago)
InstallationMedia: Ubuntu Trusty Tahr (development branch) - armhf (20131126.2)
ProcEnviron:
 TERM=linux
 PATH=(custom, no user)
 SHELL=/bin/bash
SourcePackage: upstart
UpgradeStatus: No upgrade log present (probably fresh install)
UpstartBugCategory: Session
UpstartRunningSessionCount: 2
UpstartRunningSystemVersion: init (upstart 1.11)
upstart.tty1.override: manual
upstart.tty2.override: manual
upstart.tty3.override: manual
upstart.tty4.override: manual
upstart.tty5.override: manual
upstart.tty6.override: manual

Revision history for this message
Michael Hall (mhall119) wrote :
Revision history for this message
James Hunt (jamesodhunt) wrote :

Hi Michael - thanks for raising this bug. However, none of the expected files that apport should have collected are attached. Added to which, I don't have a Nexus 4.

Do you have a crash file or any further details on what might have triggered this? Had the device been running for a long time? Had it just been updated via apt, etc.

Is this problem recreateable? If so, please grab an strace of the Session Init (re-nicing if required) and then maybe kill -ABRT to force a crash that apport will deal with.

The only detail I can glean from this bug which might be relevant is "UpstartRunningSessionCount: 2". I would have expected a count of 1.

James Hunt (jamesodhunt)
Changed in upstart (Ubuntu):
status: New → Incomplete
Revision history for this message
Michael Hall (mhall119) wrote :

No crash report, since the process never actually crashed. This is at least the second time this has happened, so if it happens again I'll try kill -ABRT. The device had been running for maybe a full day, I hadn't done anything with apt since I'm using the system-image.

Can you provide instructions for what to do with strace? I know nothing about that.

Revision history for this message
James Hunt (jamesodhunt) wrote :

Hi Michael - if it happens again, please try to ping one of the upstart devs. Otherwise, the following would be very useful:

$ initctl list
$ ps -efwww
$ cat ~/.xsession-errors
$ initctl list-sessions
$ sudo cat /proc/$pid/stack

# let it run for a few seconds then kill it and attach the log.
$ strace -p $pid -fFv -s 1024 -o /tmp/session-init-strace.log

Then try the "kill -ABRT $pid". Thanks!

Revision history for this message
Michael Hall (mhall119) wrote :

I don't have strace installed, and I'm using the system-image so I can't apt-get install it. Bug I ran the rest and have attached the output.

Michael Hall (mhall119)
Changed in upstart (Ubuntu):
status: Incomplete → New
Revision history for this message
James Hunt (jamesodhunt) wrote :

I haven't so far been able to convince gdb-multiarch to load that core file successfully.

If this is repeatable, please ping an Upstart dev on irc so we can debug this more interactively.

Revision history for this message
James Lewis (james-fsck) wrote :

I appear to have this problem, or one very similar on the desktop...

jlewis 4689 0.2 48.6 3133972 2917960 ? Ss Aug15 10:12 init --user

I'm not sure what it's doing, but it's using half my RAM and CPU... it appears to reliably leak memory over time, since I don't have a problem after login, but if I leave it a few days eventually the box grinds to a halt in an almost never ending swap grind.... I end up having to alt-f6 / kill Xorg or hard boot depending on how soon I catch it.

I've attached the output requested above, hope this helps some.... I have a number of 14.04 machines and this is the only one seeing this issue.

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

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

Changed in upstart (Ubuntu):
status: New → Confirmed
Revision history for this message
Gareth Woolridge (moon127) wrote :

Also seeing this on the desktop, as james-fsck machine grinds to a halt in swap after a few days.

I was forced to hard reset as I couldn't afford the time to try and get back into the system, if this happens again at a less critical time I'll try and collecty output per above.

Revision history for this message
Gareth Woolridge (moon127) wrote :

Disregard above, I only killed compiz and manually started unity to get the existing desktop back long enough to save some work so gathered the requested.

Revision history for this message
Gareth Woolridge (moon127) wrote :

Strace log

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.