Re: KLOGD loops continuously calling 'syslog' system call whenprink is disabled
From: WANG Cong
Date: Thu Jun 19 2008 - 11:36:47 EST
On Thu, 19 Jun 2008 18:39:10 +0530
"Madhu R" <tuxmadhu@xxxxxxxxx> wrote:
> Hi All,
>
> when I disable printk(CONFIG_PRINTK=n) in the kernel config
> (2.6.26-rc6), the klogd loops continuously calling the 'syslog'
> system call. It consumes 99% of the cpu time ( using 'top' command ) .
> I found similar problem in the kernel mailing list and a patch had
> gone into the mainline kernel
> http://linux.derkeiler.com/Mailing-Lists/Kernel/2006-11/msg03317.html
>
> In the patch, it returns 'ENOSYS'' while calling 'syslog'
> system call if printk is disabled. So the klogd keeps on calling this
> 'syslog' and returns ENOSYS and this process takes most of the CPU
> time.
>
>
> Please clarify whether I am following correct procedure or
> this is DEFAULT behavior of klogd.
IIRC, this is the fault of klogd. It doesn't check the return value
of syslog(2) (or klogclt(3), a wrapper in glibc) carefully.
If you can, please send a patch to sysklogd people.
Thanks.
--
Hi, I'm a .signature virus, please copy/paste me to help me spread
all over the world.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/