ubuntu-touch-session needs to be able to start even if the homedir is filled to 100%

Bug #1316978 reported by John McAleely on 2014-05-07
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ubuntu CI Services
Undecided
Unassigned
android (Ubuntu)
Undecided
Unassigned
dbus (Ubuntu)
Critical
Oliver Grawert
dbus (Ubuntu RTM)
Undecided
Oliver Grawert
hud (Ubuntu)
Critical
Oliver Grawert
ubuntu-touch-session (Ubuntu)
Critical
Oliver Grawert
ubuntu-touch-session (Ubuntu RTM)
Undecided
Oliver Grawert

Bug Description

When the ~/phablet tree has media files added to it by the user, it is possible for the storage space to be filled, and consequently for the device not to boot.

From the OEM project bug:

"After further investigation this problem was caused by the following:

 1) Files were pushed to ~phablet/xxxx
 2) The files filled the home partition completely
 3) Upon a restart of the phone the upstart session job /usr/share/upstart/sessions/dbus.conf is attempted
 4) Because the partition is full, the final line of the pre-start stanza fails as $HOME/.cache/upstart/dbus-session cannot be created
 5) As there is no running dbus session instance unity8 fails to start

Clearing space on the home partition allows unity8 to start again."

Posted here, since following discussion in #ubuntu-touch it has the same underlying cause as bug #1270248, also reported on this package.

Raised as a separate bug, because this was caused by user action, rather than simply the system failing to do log housekeeping.

Related branches

Oliver Grawert (ogra) wrote :

could you please attach the output of:

adb shell df -h

for when this happens ... it seems that this is solely related to the homedir (unlike bug 1270248)

John McAleely (john.mcaleely) wrote :

Reported on utopic r2/ Nexus 4

Oliver Grawert (ogra) on 2014-05-07
summary: - User copying files to ~/phablet can fill media, and prevent boot
+ User copying files to ~/phablet can fill media, and prevent upstart from
+ creating logs (which kills the session)

root@ubuntu-phablet:~# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/loop0 2.0G 1.5G 415M 78% /
udev 916M 4.0K 916M 1% /dev
tmpfs 184M 632K 183M 1% /run
/dev/mmcblk0p23 5.7G 5.4G 8.0K 100% /home
/dev/loop1 106M 104M 1.5M 99% /lib/modules
none 4.0K 0 4.0K 0% /android
tmpfs 184M 632K 183M 1% /run
tmpfs 918M 4.0K 918M 1% /etc/fstab
tmpfs 918M 952K 917M 1% /var/lib/lxc/android/rootfs
/dev/disk/by-partlabel/cache 552M 9.9M 542M 2% /android/cache
/dev/disk/by-partlabel/persist 16M 4.2M 12M 27% /android/persist
/dev/disk/by-partlabel/modem 64M 54M 11M 83% /android/firmware
none 4.0K 0 4.0K 0% /sys/fs/cgroup
tmpfs 918M 0 918M 0% /tmp
none 5.0M 0 5.0M 0% /run/lock
none 918M 0 918M 0% /run/shm
none 100M 4.0K 100M 1% /run/user
tmpfs 918M 0 918M 0% /var/lib/lightdm
tmpfs 918M 0 918M 0% /var/lib/sudo
udev 916M 4.0K 916M 1% /var/lib/lxc/android/rootfs/socket
none 4.0K 0 4.0K 0% /var/lib/lxc/android/rootfs/aboot
none 4.0K 0 4.0K 0% /var/lib/lxc/android/rootfs/boot
none 4.0K 0 4.0K 0% /var/lib/lxc/android/rootfs/misc
none 4.0K 0 4.0K 0% /var/lib/lxc/android/rootfs/radio
none 4.0K 0 4.0K 0% /var/lib/lxc/android/rootfs/recovery
none 4.0K 0 4.0K 0% /var/lib/lxc/android/rootfs/rpm
none 4.0K 0 4.0K 0% /var/lib/lxc/android/rootfs/sbl1
none 4.0K 0 4.0K 0% /var/lib/lxc/android/rootfs/sbl2
none 4.0K 0 4.0K 0% /var/lib/lxc/android/rootfs/sbl3
none 4.0K 0 4.0K 0% /var/lib/lxc/android/rootfs/tz

John McAleely (john.mcaleely) wrote :

Same output as above, but attached so that formatting might survive better.

Oliver Grawert (ogra) wrote :

so after researching this for a day there are several issues with ubuntu-touch-session (and probably other packages too) ...

while we manage to bring up a desktop session on the desktop even when /home is 100% full, all the hackery in ubuntu-touch-session like writing to ~/.bashrc, having modified upstart jobs that expect to be able to write to the users homedir etc will not allow this.

the only option to at least get the session up again (to i.e. show a message to the user to free up space and to still allow emergency calls etc) will be a general re-write of ubuntu-touch-session and the additional changed upstart jobs here to only use XDG_RUNTIME_DIR or /tmp on session startup. i will start this re-write this week, i am not yet sure how we can present a message to the user (a discussion with design is anticipated at the malta sprint) to tell him/her to free up space and i can not make any prediction about the timeframe for fixing this bug (with luck only a few days, but there are system design issues in general here that we need to fix)

Changed in ubuntu-touch-session (Ubuntu):
status: New → Confirmed
importance: Undecided → Critical
assignee: nobody → Oliver Grawert (ogra)
Changed in android (Ubuntu):
status: New → Invalid
summary: - User copying files to ~/phablet can fill media, and prevent upstart from
- creating logs (which kills the session)
+ ubuntu-touch-session needs to be able to start even if the homedir is
+ filled to 100%
Oliver Grawert (ogra) wrote :

on a sidenote our standard testing suite should get a test to boot with a $HOME set to readonly after this bug is fixed so we can make sure this does not regress again.

Oliver Grawert (ogra) wrote :

adding CI service as reminder for adding a test once we have it fixed

Oliver Grawert (ogra) wrote :

with the changes in http://paste.ubuntu.com/7452072/ i can get a unity8 session to start even with a completely readonly home

Oliver Grawert (ogra) on 2014-05-19
Changed in hud (Ubuntu):
importance: Undecided → Critical
assignee: nobody → Oliver Grawert (ogra)
Changed in dbus (Ubuntu):
importance: Undecided → Critical
assignee: nobody → Oliver Grawert (ogra)
status: New → Confirmed
Changed in hud (Ubuntu):
status: New → Confirmed
Pete Woods (pete-woods) wrote :

I just felt the need to point out that unity8 doesn't really even use HUD any more (as of a week or so ago, the gesture to invoke HUD was disabled).

So if HUD failing to load due to DBus failure blocks unity8 startup, we could probably just cut a few more cords in the unty8 codebase to prevent the HUD UI component from attempting to initialise HUD. Either by deleting the UI components, or by ensuring they don't load.

Oliver Grawert (ogra) wrote :

as i understood the removal of the gesture is only temporary until an alternative is found ...
also doesnt the search function in the panel use the HUD as backend still ?

generally i'm just trying to move the dbus-session file to $XDG_RUNTIME_DIR and adjust all consumers to read it from there, the change to the HUD code is a trivial one liner (and you get cleanup of the messed up upstart job (duplicated pre-start script) for free with the MP)

Pete Woods (pete-woods) wrote :

Okay, cool. If you have a more general purpose fix, then awesome. In addition, the deduplication fix is included in an upcoming MR that's being SRU'd to trusty.

Oliver Grawert (ogra) on 2014-07-18
tags: added: rtm
tags: added: rtm14
removed: rtm
Michael Frey (mfrey) on 2014-09-09
tags: added: touch-2014-09-25
Oliver Grawert (ogra) on 2014-09-26
Changed in hud (Ubuntu):
status: Confirmed → Fix Released
Changed in ubuntu-touch-session (Ubuntu RTM):
status: New → Confirmed
Changed in dbus (Ubuntu RTM):
status: New → Confirmed
assignee: nobody → Oliver Grawert (ogra)
Changed in ubuntu-touch-session (Ubuntu RTM):
assignee: nobody → Oliver Grawert (ogra)
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package dbus - 1.6.18-0ubuntu11

---------------
dbus (1.6.18-0ubuntu11) 14.09; urgency=medium

  * write to $XDG_RUNTIME_DIR instead of the users home when creating the
    dbus-session file, so we can start our session even with 100% filled or
    readonly home dir (LP: #1316978)
 -- Oliver Grawert <email address hidden> Fri, 26 Sep 2014 14:18:38 +0200

Changed in dbus (Ubuntu RTM):
status: Confirmed → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-touch-session - 0.108+14.10.20140926.1-0ubuntu1

---------------
ubuntu-touch-session (0.108+14.10.20140926.1-0ubuntu1) utopic; urgency=low

  [ Oliver Grawert ]
  * 'move to new dbus-session address handling in XDG_RUNTIME_DIR (LP:
    #1316978) (LP: #1316978)
 -- Ubuntu daily release <email address hidden> Fri, 26 Sep 2014 14:45:01 +0000

Changed in ubuntu-touch-session (Ubuntu RTM):
status: Confirmed → Fix Released
Changed in ubuntu-touch-session (Ubuntu):
status: Confirmed → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package dbus - 1.8.8-1ubuntu2

---------------
dbus (1.8.8-1ubuntu2) utopic; urgency=medium

  * write to $XDG_RUNTIME_DIR instead of the users home when creating the
    dbus-session file, so we can start our session even with 100% filled or
    readonly home dir (LP: #1316978)
 -- Oliver Grawert <email address hidden> Fri, 26 Sep 2014 15:07:05 +0200

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

Duplicates of this bug

Other bug subscribers

Bug attachments