Public bug reported:

Binary package hint: klogd

# lsb_release -rd
Description: Ubuntu 8.10
Release: 8.10

# dpkg-query --show | grep sysklogd
sysklogd 1.5-2ubuntu6

Initial Symptom: I was dd'ing from /dev/zero to a file, when klogd's CPU usage 
shot to about 100%. I strace'd the process:
...
read(0, "", 4095)                       = 0
read(0, "", 4095)                       = 0
read(0, "", 4095)                       = 0
read(0, "", 4095)                       = 0
read(0, "", 4095)                       = 0
...
and it seems to be stuck in an infinite loop. I dug through the source to see 
where read is called. There's a non-match in syslogd.c (3rd parameter would be 
1024) and a match in klogd.c: function LogProcLine, line 988, which is called 
from main, line 1219. LogProcLine checks if read's return code is less than 
zero, else passes the buffer to LogLine. LogLine's main loop is while len is 
bigger than 0, which obviously is never hit. I surmise that LogProcLine needs 
to handle the zero return code (which indicates that the stream has been 
closed) or pass this fact back to the main loop which should take appropriate 
steps.

** Affects: sysklogd (Ubuntu)
     Importance: Undecided
         Status: New

-- 
sysklogd enters infinite loop, uses 100% CPU
https://bugs.launchpad.net/bugs/348286
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to