extremely large log files in /var/log

Asked by Daniel Stoyanov

I ran out of disk space in the root filesystem folder, and after analysing the disk usage I have noticed that my /var/log folder is enormous - 3.3 GB. The following output giver more information

$ ls -Slh /var/log/ | head
total 3.3G
-rw-r----- 1 syslog adm 1.1G 2008-10-26 19:09 syslog
-rw-r----- 1 syslog adm 1.1G 2008-10-26 17:05 kern.log
-rw-r----- 1 syslog adm 1.1G 2008-10-26 19:05 messages
-rw-r----- 1 syslog adm 15M 2008-10-26 11:20 kern.log.0
-rw-r----- 1 syslog adm 14M 2008-10-26 11:20 syslog.0
-rw-r----- 1 syslog adm 14M 2008-10-26 11:20 messages.0
-rw-r----- 1 root adm 1.9M 2008-10-26 17:15 dpkg.log
-rw-r----- 1 syslog adm 1016K 2008-10-26 17:04 debug
-rw-r----- 1 syslog adm 463K 2008-10-21 11:30 debug.0

syslog, messages and kern.log are each 1.1 GB . I have looked at the first and last lines in the files nothing unusual. I have backed up theese files to investigate them. If you have any ideas don't hesitate to ask for further info.

Question information

Language:
English Edit question
Status:
Expired
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Daniel Stoyanov (dankh) said :
#1

My bug report is not a question. Let me explain :

User "Lambda" has dedicated at install 8 Gb of disk space for root filesystem. The system log files grow in short lapse of time (2-3 days) to 3.3 Gb, user's file system is full , the system is unstable and many anomalies occur.

I think this is a serious bug or problem in syslog or other system utility or package. I'm on Ubuntu 8.10 Beta up to date.

Revision history for this message
Koen (koen-beek) said :
#2

could you show what's in the biggest logfiles ? (the last 50 lines f.ex.)

Revision history for this message
Daniel Stoyanov (dankh) said :
#3

In the latest 50 files there was nothing interesting only massages from the lastest boot. But when I printed the latest 500 I saw this message repeating many times :

Oct 26 16:42:40 marla kernel: [20204.022488] =======================
Oct 26 16:42:40 marla kernel: [20204.028145] bad: scheduling from the idle thread!
Oct 26 16:42:40 marla kernel: [20204.028149] Pid: 0, comm: swapper Tainted: P 2.6.27-7-generic #1
Oct 26 16:42:40 marla kernel: [20204.028151] [<c037c3f6>] ? printk+0x1d/0x1f
Oct 26 16:42:40 marla kernel: [20204.028155] [<c0122b8a>] dequeue_task_idle+0x2a/0x40
Oct 26 16:42:40 marla kernel: [20204.028157] [<c012107f>] dequeue_task+0xcf/0x130
Oct 26 16:42:40 marla kernel: [20204.028160] [<c012112a>] deactivate_task+0x1a/0x30
Oct 26 16:42:40 marla kernel: [20204.028163] [<c037ca13>] schedule+0x4b3/0x790
Oct 26 16:42:40 marla kernel: [20204.028166] [<c01028cd>] cpu_idle+0xbd/0x140
Oct 26 16:42:40 marla kernel: [20204.028169] [<c037a651>] start_secondary+0x9d/0xcc
Oct 26 16:42:40 marla kernel: [20204.028172] =======================
Oct 26 16:42:40 marla kernel: [20204.031210] bad: scheduling from the idle thread!
Oct 26 16:42:40 marla kernel: [20204.031214] Pid: 0, comm: swapper Tainted: P 2.6.27-7-generic #1
Oct 26 16:42:40 marla kernel: [20204.031216] [<c037c3f6>] ? printk+0x1d/0x1f
Oct 26 16:42:40 marla kernel: [20204.031219] [<c0122b8a>] dequeue_task_idle+0x2a/0x40
Oct 26 16:42:40 marla kernel: [20204.031222] [<c012107f>] dequeue_task+0xcf/0x130
Oct 26 16:42:40 marla kernel: [20204.031225] [<c012112a>] deactivate_task+0x1a/0x30
Oct 26 16:42:40 marla kernel: [20204.031227] [<c037ca13>] schedule+0x4b3/0x790
Oct 26 16:42:40 marla kernel: [20204.031231] [<c01028cd>] cpu_idle+0xbd/0x140
Oct 26 16:42:40 marla kernel: [20204.031233] [<c037a651>] start_secondary+0x9d/0xcc
Oct 26 16:42:40 marla kernel: [20204.031236] =======================
Oct 26 16:42:40 marla kernel: [20204.037133] bad: scheduling from the idle thread!
Oct 26 16:42:40 marla kernel: [20204.037137] Pid: 0, comm: swapper Tainted: P 2.6.27-7-generic #1
Oct 26 16:42:40 marla kernel: [20204.037139] [<c037c3f6>] ? printk+0x1d/0x1f
Oct 26 16:42:40 marla kernel: [20204.037143] [<c0122b8a>] dequeue_task_idle+0x2a/0x40
Oct 26 16:42:40 marla kernel: [20204.037145] [<c012107f>] dequeue_task+0xcf/0x130
Oct 26 16:42:40 marla kernel: [20204.037148] [<c012112a>] deactivate_task+0x1a/0x30
Oct 26 16:42:40 marla kernel: [20204.037151] [<c037ca13>] schedule+0x4b3/0x790
Oct 26 16:42:40 marla kernel: [20204.037154] [<c01028cd>] cpu_idle+0xbd/0x140
Oct 26 16:42:40 marla kernel: [20204.037157] [<c037a651>] start_secondary+0x9d/0xcc
Oct 26 16:42:40 marla kernel: [20204.037160] =======================
Oct 26 16:42:40 marla kernel: [20204.038218] bad: scheduling from the idle thread!
Oct 26 16:42:40 marla kernel: [20204.038222] Pid: 0, comm: swapper Tainted: P 2.6.27-7-generic #1
Oct 26 16:42:40 marla kernel: [20204.038224] [<c037c3f6>] ? printk+0x1d/0x1f
Oct 26 16:42:40 marla kernel: [20204.038227] [<c0122b8a>] dequeue_task_idle+0x2a/0x40
Oct 26 16:42:40 marla kernel: [20204.038230] [<c012107f>] dequeue_task+0xcf/0x130
Oct 26 16:42:40 marla kernel: [20204.038233] [<c012112a>] deactivate_task+0x1a/0x30
Oct 26 16:42:40 marla kernel: [20204.038235] [<c037ca13>] schedule+0x4b3/0x790
Oct 26 16:42:40 marla kernel: [20204.038239] [<c01028cd>] cpu_idle+0xbd/0x140
Oct 26 16:42:40 marla kernel: [20204.038241] [<c037a651>] start_secondary+0x9d/0xcc

I think this is the the problem. I have also counted the lines in syslog, kern.log and messages which contain "bad: scheduling from the idle thread" :

$ more syslog | grep "bad: scheduling from the idle thread" | wc -l
874141
$ more kern.log | grep "bad: scheduling from the idle thread" | wc -l
874140
$ more messages | grep "bad: scheduling from the idle thread" | wc -l
146230

Maybe 874141 messages of 10 lines can make a log file be 1.1 GB. I add as attachement (in the bug report) the first and the latest 1000 lines of the respective log files :

head1000lines-kern.log.txt
head1000lines-messages.txt
head1000lines-syslog.txt
tail1000lines-kern.log.txt
tail1000lines-messages.txt
tail1000lines-syslog.txt

Revision history for this message
Koen (koen-beek) said :
#4

looks a bit like the problems reported in the following bug report : https://bugs.launchpad.net/ubuntu/+source/linux-source-2.6.20/+bug/107807

I'd recommend adding your issue to that bug report or you can create a new one with this extra information from the log files + also try to find out what was the last thing reported in the log file before these repeating messages

Do you have this problem when booting into ubuntu or is ubuntu started in a virtual machine ?
Do you have a kernel that was delivered with ubuntu or have you recompiled it ?

Revision history for this message
Koen (koen-beek) said :
#5

When you add information to the bug report or create a new one, please attach the output of the following files

uname -a > uname-a.log
cat /proc/version_signature > version.log
dmesg > dmesg.log
sudo lspci -vvnn > lspci-vvnn.log

the dmesg.log file may need to be reduced as it may be huge - remove the middle recurring part : split it in a head and a tail part

  thanks,

      Koen

Revision history for this message
Daniel Stoyanov (dankh) said :
#6

To answer your questions :
- it's "real" Ubuntu installation not a virtual machine
- I was experiencing some problems like services that refuse to start because there is no free space on the filesystem, but when I truncated log files to 0, everything is ok.
- I use the original kernel from the repositories.

The data before the messages is completely seamless to me, it's included in the attached files. I'll add the information from my log files to the the bug report you have pointed, it looks very similar.

Thank you for your time.

Revision history for this message
Launchpad Janitor (janitor) said :
#7

This question was expired because it remained in the 'Open' state without activity for the last 15 days.