* Inducing the syslogd/klogd syndrome
@ 1998-07-19 19:25 furio ercolessi
1998-07-19 19:38 ` B. James Phillippe
1998-07-19 21:12 ` furio ercolessi
0 siblings, 2 replies; 4+ messages in thread
From: furio ercolessi @ 1998-07-19 19:25 UTC (permalink / raw)
To: axp-list
I now managed to induce the syslogd/klogd syndrome on
my system (Ruffian, RH5.1, kernel 2.0.34) by running 'ntpdate':
# ntpdate 123.123.123.123
19 Jul 21:01:50 ntpdate[6741]: poll() error: Operation not permitted
19 Jul 21:01:50 ntpdate[6741]: poll() error: Operation not permitted
[....]
(until ^C pressed)
In the logs:
Jul 19 21:01:50 foo kernel: Cannot read proc file system: 9 - Bad file descriptor.
Jul 19 21:02:20 foo last message repeated 265385 times
[...]
At this point syslogd and klogd are eating all the CPU as usual.
Killing and restarting them does not help: the new copies still
eat CPU. This seems to suggest that the problems are elsewhere.
I used
# ls -l /usr/sbin/ntpdate
-rwxr-xr-x 1 root root 111896 May 10 22:54 /usr/sbin/ntpdate
from xntp3-5.93-2.alpha.rpm (I do not remember where I grabbed this,
I cannot find a source right now).
The original xntp 3-5.93 does not compile out of the box on alpha Linux.
furio ercolessi
spin - trieste (italy)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Inducing the syslogd/klogd syndrome
1998-07-19 19:25 Inducing the syslogd/klogd syndrome furio ercolessi
@ 1998-07-19 19:38 ` B. James Phillippe
1998-07-19 21:12 ` furio ercolessi
1 sibling, 0 replies; 4+ messages in thread
From: B. James Phillippe @ 1998-07-19 19:38 UTC (permalink / raw)
To: axp-list
On Sun, 19 Jul 1998, furio ercolessi wrote:
> I now managed to induce the syslogd/klogd syndrome on
> my system (Ruffian, RH5.1, kernel 2.0.34) by running 'ntpdate':
>
> # ntpdate 123.123.123.123
> 19 Jul 21:01:50 ntpdate[6741]: poll() error: Operation not permitted
> 19 Jul 21:01:50 ntpdate[6741]: poll() error: Operation not permitted
> [....]
> (until ^C pressed)
>
> In the logs:
>
> Jul 19 21:01:50 foo kernel: Cannot read proc file system: 9 - Bad file descriptor.
> Jul 19 21:02:20 foo last message repeated 265385 times
Ah ha.. You know, the exact same thing happened to me last night. I had
to reboot to resolve it. My system is RedHat-5.1, Alpha Avanti, 2.0.35
w/alpha-patches. As soon as I ran ntpdate, away it went.
thanks,
-bp
--
B. James Phillippe <bryan@terran.org>
Linux Software Engineer, WGT Inc.
http://earth.terran.org/~bryan
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Inducing the syslogd/klogd syndrome
1998-07-19 19:25 Inducing the syslogd/klogd syndrome furio ercolessi
1998-07-19 19:38 ` B. James Phillippe
@ 1998-07-19 21:12 ` furio ercolessi
1998-07-21 22:41 ` Uncle George
1 sibling, 1 reply; 4+ messages in thread
From: furio ercolessi @ 1998-07-19 21:12 UTC (permalink / raw)
To: axp-list
> I used
>
> # ls -l /usr/sbin/ntpdate
> -rwxr-xr-x 1 root root 111896 May 10 22:54 /usr/sbin/ntpdate
>
> from xntp3-5.93-2.alpha.rpm (I do not remember where I grabbed this,
> I cannot find a source right now).
I now found an older RPM for xntpd in redhat-contrib (for instance
ftp://sunsite.doc.ic.ac.uk/packages/linux/redhat-contrib/manhattan/alpha/xntp3-5.91_export-3.alpha.rpm
) and this one works fine, including ntpdate!
# ls -l /usr/sbin/ntpdate
-rwxr-xr-x 1 root root 108692 Feb 15 21:39 /usr/sbin/ntpdate
furio ercolessi
spin - trieste (italy)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Inducing the syslogd/klogd syndrome
1998-07-19 21:12 ` furio ercolessi
@ 1998-07-21 22:41 ` Uncle George
0 siblings, 0 replies; 4+ messages in thread
From: Uncle George @ 1998-07-21 22:41 UTC (permalink / raw)
To: axp-list, greg; +Cc: furio ercolessi, B. James Phillippe
It was the poll() system call in 2.0.33 kernel that causes a cryptic ( but familiar ) message to be
printed by the kernel. Unfortunately this error message, from an unimplimented system service, does not
have a '\n' at the tail end of its message.
Along comes ntpdate, which really doesnt understand that the poll() function doesn't really work at all in
either glibc, or the kernel. BUT it tries really hard, at least 300,000 times, and fails at each attempt.
The kernel, on the other hand is trying to log some 300,000 attempts to this invalid system service. This
is all fine, with the exception that there are no newlines between each of the messages! - some run on
sentence.
Then along comes klogd, which will try to log each of these messages ( via syslogd ). But there are no
newlines, and klogd really hasn't been tested to handle a 4000 character message with no 'cr' of 'lf' in
them. this is evident when it tries to move the 4000 character message into a 1024 character line buffer.
rerally trashes the stack, and also trashes the kmsg channel, so it cant get any more info from the
kernel. Klogd gets a read error, syslogd gets the report from klogd, and it cycles forever.
so whats to fix:
1) put a '\n' in the kernel message in traps.c:do_entSys(), is printk("msg ... \n");
this should keep klogd happy. This is simple to do, and appears to keep klogd
happy. If there are any other like-wise type-o's, then u will still get that forever spin
problem in klogd/syslogd.
2) fix klogd so that longer than 1024 character kernel messages that dont have ( any ) terminating cr
or lf, to not overwrite the stack, and static variables. If u do get one of these messages that u cant
handle, or are improbable in nature - then a message should be written into the system log saying that
something strange has happened. I dont have a perm fix, and this is being reported to the klogd/syslogd
folks via greg@wind.rmcc.com
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~1998-07-21 22:33 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-07-19 19:25 Inducing the syslogd/klogd syndrome furio ercolessi
1998-07-19 19:38 ` B. James Phillippe
1998-07-19 21:12 ` furio ercolessi
1998-07-21 22:41 ` Uncle George
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox