/var/log fills up disk space on phone

Bug #1270248 reported by Rick Spencer
20
This bug affects 2 people
Affects Status Importance Assigned to Milestone
android (Ubuntu)
New
Undecided
Unassigned
linux-flo (Ubuntu)
Confirmed
Medium
Unassigned
linux-mako (Ubuntu)
Fix Released
Medium
Andy Whitcroft
logrotate (Ubuntu)
Invalid
High
Oliver Grawert
lxc-android-config (Ubuntu)
Fix Released
Critical
Oliver Grawert

Bug Description

The effect of this is that certain important things stop working. For example, text messages are no longer displayed in the messaging app.

root@ubuntu-phablet:/# du -hcs /var/log/*
0 /var/log/alternatives.log
12K /var/log/alternatives.log.1
4.0K /var/log/apport.log
8.0K /var/log/apport.log.1
4.0K /var/log/apport.log.2.gz
4.0K /var/log/apport.log.3.gz
4.0K /var/log/apport.log.4.gz
4.0K /var/log/apport.log.5.gz
8.0K /var/log/apport.log.6.gz
4.0K /var/log/apport.log.7.gz
16K /var/log/apt
128K /var/log/auth.log
212K /var/log/auth.log.1
8.0K /var/log/auth.log.2.gz
8.0K /var/log/auth.log.3.gz
8.0K /var/log/auth.log.4.gz
56K /var/log/bootstrap.log
0 /var/log/btmp
0 /var/log/btmp.1
56K /var/log/dmesg
44K /var/log/dmesg.0
16K /var/log/dmesg.3.gz
16K /var/log/dmesg.4.gz
0 /var/log/dpkg.log
640K /var/log/dpkg.log.1
752K /var/log/faillog
4.0K /var/log/fontconfig.log
12K /var/log/fsck
4.0K /var/log/installer
265M /var/log/kern.log
311M /var/log/kern.log.1
27M /var/log/kern.log.2.gz
34M /var/log/kern.log.3.gz
19M /var/log/kern.log.4.gz
9.0M /var/log/lastlog
12K /var/log/lightdm
16K /var/log/lxc
0 /var/log/mail.err
0 /var/log/mail.log
4.0K /var/log/news
272K /var/log/pm-powersave.log
200K /var/log/pm-powersave.log.1
4.0K /var/log/pm-powersave.log.2.gz
101M /var/log/syslog
52M /var/log/syslog.1
1.4M /var/log/syslog.1.gz
4.5M /var/log/syslog.2.gz
5.9M /var/log/syslog.3.gz
764K /var/log/syslog.4.gz
3.3M /var/log/syslog.5.gz
6.4M /var/log/syslog.6.gz
2.6M /var/log/syslog.7.gz
156K /var/log/system-image
340K /var/log/udev
0 /var/log/ufw.log
4.0K /var/log/unattended-upgrades
724K /var/log/upstart
120K /var/log/wtmp
100K /var/log/wtmp.1
844M total

root@ubuntu-phablet:/# ls -l
total 72
drwxrwxrwt 7 root root 140 Jan 16 16:41 android
drwxr-xr-x 2 root root 4096 Jan 7 13:39 bin
drwxr-xr-x 2 root root 4096 Oct 18 10:07 boot
lrwxrwxrwx 1 root root 14 Oct 26 17:22 cache -> /android/cache
lrwxrwxrwx 1 root root 13 Oct 26 17:22 data -> /android/data
drwxr-xr-x 17 root root 6180 Jan 16 16:48 dev
drwxr-xr-x 98 root root 4096 Jan 9 14:53 etc
lrwxrwxrwx 1 root root 16 Oct 26 17:22 factory -> /android/factory
lrwxrwxrwx 1 root root 17 Oct 26 17:22 firmware -> /android/firmware
drwxr-xr-x 3 root root 4096 Oct 26 17:18 home
drwxr-xr-x 18 root root 4096 Jan 9 14:52 lib
drwxr-xr-x 2 root root 16384 Oct 26 17:18 lost+found
drwxr-xr-x 2 root root 4096 Oct 24 12:47 media
drwxr-xr-x 2 root root 4096 Oct 18 10:07 mnt
drwxr-xr-x 3 root root 4096 Oct 26 17:18 opt
lrwxrwxrwx 1 root root 16 Oct 26 17:22 persist -> /android/persist
dr-xr-xr-x 236 root root 0 Dec 31 1969 proc
drwx------ 2 root root 4096 Oct 26 17:18 root
drwxr-xr-x 18 root root 600 Jan 16 16:41 run
drwxr-xr-x 2 root root 4096 Jan 9 14:52 sbin
drwxr-xr-x 2 root root 4096 Oct 24 12:47 srv
dr-xr-xr-x 12 root root 0 Jan 16 16:41 sys
lrwxrwxrwx 1 root root 15 Oct 26 17:22 system -> /android/system
drwxrwxrwt 6 root root 320 Jan 17 12:18 tmp
drwxrwx--x 7 system system 4096 Nov 4 08:20 userdata
drwxr-xr-x 10 root root 4096 Oct 26 17:22 usr
drwxr-xr-x 13 root root 4096 Oct 26 17:22 var
lrwxrwxrwx 1 root root 22 Oct 26 17:22 vendor -> /android/system/vendor

Tags: patch avengers
Oliver Grawert (ogra)
Changed in logrotate (Ubuntu):
status: New → Confirmed
importance: Undecided → High
Revision history for this message
Jamie Strandboge (jdstrand) wrote :

Logrotate fixes are fine, but the kernel is also quite chatty with these messages every 20 seconds:
Jan 31 13:03:09 ubuntu-phablet kernel: [ 3203.158980] adjust_soc: ibat_ua = -401300, vbat_uv = 3860077, soc = 17, batt_temp=292
Jan 31 13:03:29 ubuntu-phablet kernel: [ 3223.159834] adjust_soc: ibat_ua = -428500, vbat_uv = 3867418, soc = 18, batt_temp=292
Jan 31 13:03:49 ubuntu-phablet kernel: [ 3243.158797] adjust_soc: ibat_ua = -410100, vbat_uv = 3865951, soc = 18, batt_temp=292
Jan 31 13:04:09 ubuntu-phablet kernel: [ 3263.158919] adjust_soc: ibat_ua = -387400, vbat_uv = 3863013, soc = 18, batt_temp=292
Jan 31 13:04:29 ubuntu-phablet kernel: [ 3283.158888] adjust_soc: ibat_ua = -383400, vbat_uv = 3862134, soc = 18, batt_temp=293

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

FYI, I just had /home fill up due to ~/.cache/upstart/mtp-server.log:
$ cd ./.cache/upstart ; du -s *
...
1111848 mtp-server.log

This prevented networking from starting and generally weird behavior. Removing the file and rebooting set things right. Note, I have 8GB of music on my device, and mtp-server.log had a *lot* of stuff in it related to that music. I don't know why it is being so chatty....

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

This is now pretty serious-- my disk is filling up pretty much every time I reboot:
# ls -lh ./mtp-server.log
-rw-r----- 1 phablet phablet 1.2G Mar 12 12:27 ./mtp-server.log

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

mtp issue filed as bug #1292127.

Revision history for this message
Oliver Grawert (ogra) wrote :
Revision history for this message
Oliver Grawert (ogra) wrote :

with the switch to 4.4 we seem to also have set the KLOG_LEVEL in androids heathd to 6 which produces additional noise, this need to be patched too.

tags: added: patch
Revision history for this message
Oliver Grawert (ogra) wrote :
Revision history for this message
Oliver Grawert (ogra) wrote :
Revision history for this message
Oliver Grawert (ogra) wrote :

same thing for the flo kernel

Andy Whitcroft (apw)
Changed in linux-flo (Ubuntu):
status: New → In Progress
Changed in linux-mako (Ubuntu):
status: New → In Progress
Changed in linux-flo (Ubuntu):
importance: Undecided → Medium
Changed in linux-mako (Ubuntu):
importance: Undecided → Medium
assignee: nobody → Andy Whitcroft (apw)
Changed in linux-flo (Ubuntu):
assignee: nobody → Andy Whitcroft (apw)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux-mako - 3.4.0-5.28

---------------
linux-mako (3.4.0-5.28) trusty; urgency=low

  [ Oliver Grawert ]

  * SAUCY: battery: quieten the battery charging messages by default
   - LP: #1270248
 -- Andy Whitcroft <email address hidden> Fri, 28 Mar 2014 14:32:35 +0000

Changed in linux-mako (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux-flo - 3.4.0-3.10

---------------
linux-flo (3.4.0-3.10) trusty; urgency=low

  [ Oliver Grawert ]

  * SAUCE: battery: quieten the battery charging messages by default
    - LP: #1270248

linux-flo (3.4.0-3.9) trusty; urgency=low

  [ Tim Gardner ]

  * Revert "[Config]: Enabling backlight driver for flo"
    The android hal is going to control the backlight.
 -- Andy Whitcroft <email address hidden> Fri, 28 Mar 2014 14:19:03 +0000

Changed in linux-flo (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Oliver Grawert (ogra) wrote :

the flo patch did not work, working on fixing it...

Changed in linux-flo (Ubuntu):
status: Fix Released → Confirmed
Revision history for this message
John McAleely (john.mcaleely) wrote :

This appears to have been a fix for the log issue, but not similar ways to fill media and prevent booting, see Bug #1316978

Revision history for this message
Oliver Grawert (ogra) wrote :

lxc-android-config (0.185) utopic; urgency=medium

  * ship /etc/cron.hourly/logrotate to make sure on very noisy systems the
    syslog file doesn't excessively grow before we can rotate it.
...
lxc-android-config (0.182) utopic; urgency=medium

  * divert rsyslog logrotate config and ship /etc/logrotate.d/touch-syslog as
    a replacement, this makes sure the file will be flushed by logrotate once
    it hits 10M in size.

Changed in logrotate (Ubuntu):
status: Confirmed → Invalid
Changed in lxc-android-config (Ubuntu):
importance: Undecided → Critical
assignee: nobody → Oliver Grawert (ogra)
status: New → Fix Released
Andy Whitcroft (apw)
Changed in linux-flo (Ubuntu):
assignee: Andy Whitcroft (apw) → nobody
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.