Bug 8688 - klogd consumes all (97-100%) cpu
klogd consumes all (97-100%) cpu
Status: CLOSED DEFERRED
Product: Red Hat Linux
Classification: Retired
Component: sysklogd (Show other bugs)
6.1
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
:
: 9155 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2000-01-20 21:20 EST by zuazaga
Modified: 2014-03-16 22:12 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-07-22 15:37:00 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description zuazaga 2000-01-20 21:20:58 EST
klogd on 6.1 (stock and updated with all the current errata, including
sysklogd-1.3.31-14) will start to consume 100% cpu until killed.

This has supposedly been fixed in a patch to 2.3.12, backported to 2.2.11,
as described at:

http://www.uwsg.indiana.edu/hypermail/linux/kernel/9908.1/0976.html

but it still ocurrs on the redhat 2.2.12 kernel package shipped with
(kernel-2.2.12-20).

I have a pair of machines at work that will peg the klogd process within 5
minutes of booting, every time, and will test the proposed patch.

Please let me know if there is another solution.
Comment 1 zuazaga 2000-01-20 21:34:59 EST
Sorry, I looked at Andrea's patch, and something similar _was_ applied to
2.2.12.

At least one other fellow on comp.os.linux.misc reported the same problem on
1/5/2000.
Comment 2 Bill Nottingham 2000-01-21 01:17:59 EST
Do you have an exploit/example that causes this behavior?
Comment 3 humberto 2000-01-21 08:02:59 EST
I have two brand new machines with redhat 6.1 factory installed. Within about 10
minutes of booting, klogd will climb to 100% cpu, every single time.

My home machine, and 3 other redhat 6.1 boxes i've set up do not exhibit this
behavior.
Comment 4 Bill Nottingham 2000-01-21 16:54:59 EST
What modules do you have loaded? Is there anything
being output to the logs at these times?

If you strace klogd, what is it doing?
Comment 5 Scott Kammerzell 2000-02-03 12:30:59 EST
I have this same problem on a 6.0 box that has been upgraded all the way to the
sysklogd-1.3.31-15 RPM that I found on rawhide (alikins@redhat.com 's
suggestion).  We have been unable to get an strace from it as of yet.
Comment 6 Scott Kammerzell 2000-02-04 09:34:59 EST
This should probably be it's own bug, but it is related.
On a Red Hat 6.0 machine running sysklogd-1.3.31-6 when it starts eating cpu
time, an strace was run (strace -Tp <pid> ) and not a single system call went
thru while watching it.
 Since I couldn't get a strace, I tried to get it to generate a core file.  I
sent it SIGABRT, SIGBUG, SIGFPE, SIGSEGV, etc...  but it did not respond to
any of them.  Thus, as last resort, I kill -9 to regain the CPU.
Comment 7 Bill Nottingham 2000-02-04 09:41:59 EST
That is probably the result of the kernel bug mentioned above.
Comment 8 zuazaga 2000-02-06 18:11:59 EST
Sorry I've not been able to work on this for a while. I modifed
/etc/rc.d/init.d/syslog to run strace on klogd and have a few files where klogd
ran up the cpu. They don seem to show anything unusual.  Here's a snippet:

1179  write(1, "<5>Jan 26 09:29:37 kernel: Tryin"..., 64) = 64
1179  time([948893377])                 = 948893377
1179  write(1, "<4>Jan 26 09:29:37 kernel: Freei"..., 68) = 68
1179  time([948893377])                 = 948893377
1179  write(1, "<6>Jan 26 09:29:37 kernel: Addin"..., 74) = 74
1179  time([948893377])                 = 948893377
1179  write(1, "<6>Jan 26 09:29:37 kernel: es137"..., 76) = 76
1179  time([948893377])                 = 948893377
1179  write(1, "<6>Jan 26 09:29:37 kernel: es137"..., 70) = 70
1179  time([948893377])                 = 948893377
1179  write(1, "<6>Jan 26 09:29:37 kernel: es137"..., 59) = 59
1179  --- SIGSTOP (Stopped (signal)) ---
1179  --- SIGTERM (Terminated) ---

I killed the klogd after it used the CPU for a few minutes. There were no
unusual messages in the syslog output.

Checking the WCHAN with ps shows the klogd process in the "-" state.

One machine is still running the stock kernel, the other was upgraded to arecent
development version. I'll check Monday with the owner to see if it still locks
up klogd.

There are more strace log files availalable at:

http://www.hpcf.upr.edu/~humberto/klogd/

They're 96-100K each.
Comment 9 humberto 2000-02-07 09:13:59 EST
The second machine has been running 2.3.42 since Feb 3 without locking up klogd
once. Perhaps it's fixed in newer kernels?
Comment 10 Bill Nottingham 2000-03-07 15:57:59 EST
*** Bug 9155 has been marked as a duplicate of this bug. ***
Comment 11 Anonymous 2000-04-20 23:29:59 EDT
I also have this problem, using the 2.2.14 kernel with Red Hat 6.1
Comment 12 Bill Nottingham 2000-04-21 15:10:59 EDT
Do you have a sequence of events that you can do to make this
100% reproducible?
Comment 13 Bill Nottingham 2000-08-07 00:41:42 EDT
closed, lack of input.

Note You need to log in before you can comment on or make changes to this bug.