* syslogd problems - fixed?
@ 1998-07-23 19:51 Barrett G. Lyon
1998-07-23 23:27 ` Quant-X Alpha Linux Support
1998-07-27 15:00 ` Paul Tomblin
0 siblings, 2 replies; 6+ messages in thread
From: Barrett G. Lyon @ 1998-07-23 19:51 UTC (permalink / raw)
To: axp-list
This email is mostly a FYI,
I had the syslogd problem where it would take-over the machine, and cause
a lockup. I was reading that a few other people were having problems with
syslogd also.
My machine was very unstable, and I noticed that with the v2.1 kernels
there was no "/proc/sys" direcotry structure. I'm not sure if it should
be that way or not, but I did not have anything like
"/proc/sys/kernel/file-max" and other handy information.
What I noticed was linux's default "file-max" was set to only 1024 by.
Now I know that linux's fds are not static, but I am not 100%
sure how they work, yet 1024 is some-what of a limit.
Now, keep in mind that my machine would crash almost on a daily basis,
each time seemingly due to syslogd. Everything in the /var/log/messages
was normal, the machine would just stop. Well one day, I got this:
Jun 8 02:55:21 arsenic last message repeated 503409 times
That message was repeated 506 times!!!
The actual message that was repeating was:
Jun 7 21:10:29 arsenic syslogd: select: Bad file descriptor
When I saw that, I wrote a script that ran lsof, and droped everything to
a file. I would do a "cat lsof-output | wc -l" after a system crash and
sure enough it was about 1000 or so lines long. What I think that means
is that I was almost hitting the max file descriptors that the kernel was
configed for by default.
When it hit the max limit, bad things started happening, and the machine
would just start to die, and the syslogd stuff was just a result of
running out of fds.
I then just ditched the v2.1 kernels and went with the stable kernel
2.0.34. With the 2.0.34 kernel I had the full proc filesystem, and I
could bump up the /proc/sys/kernel/file-max to 4096, rather than 1024.
This works great, and the machine has been up for weeks with a very very
heavy load, and until yesterday has not crashed. 20 days uptime (personal
alpha record).
Yeserday's crash reported "no free inodes contact Linus" on console.
I think there is some ratio with the file-max, inode-max, and inode-nr.
But, I don't know much about that, so someone else will hafta tell me
about that.
Anyway, that is my non-technical fix for my problems, and I may
miss-understand a few things about what was actually going on, but
never-the-less IT WORKS! :)
-Barrett
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: syslogd problems - fixed?
1998-07-23 19:51 syslogd problems - fixed? Barrett G. Lyon
@ 1998-07-23 23:27 ` Quant-X Alpha Linux Support
1998-07-27 15:00 ` Paul Tomblin
1 sibling, 0 replies; 6+ messages in thread
From: Quant-X Alpha Linux Support @ 1998-07-23 23:27 UTC (permalink / raw)
To: axp-list
Hi Barrett !
> This email is mostly a FYI,
I hope for your information too...
> My machine was very unstable, and I noticed that with the v2.1 kernels
> there was no "/proc/sys" direcotry structure. I'm not sure if it should
> be that way or not, but I did not have anything like
> "/proc/sys/kernel/file-max" and other handy information.
On my system (LX164, 2.1.110) there _is_ a "/proc/sys" tree.
But file-max can be found under "/proc/sys/fs/file-max" and
not under "/proc/kernel" !!
> What I noticed was linux's default "file-max" was set to only 1024 by.
> Now I know that linux's fds are not static, but I am not 100%
> sure how they work, yet 1024 is some-what of a limit.
echo "1024000000" >/proc/sys/fs/file-max seems to work here. ;-}
> I then just ditched the v2.1 kernels and went with the stable kernel
> 2.0.34. With the 2.0.34 kernel I had the full proc filesystem, and I
> could bump up the /proc/sys/kernel/file-max to 4096, rather than 1024.
I don't know what you are really doing/running, but the proc tree under
2.1.xxx is far more complete than 2.0.34.
> This works great, and the machine has been up for weeks with a very very
> heavy load, and until yesterday has not crashed. 20 days uptime (personal
> alpha record).
>
> Yeserday's crash reported "no free inodes contact Linus" on console.
>
> I think there is some ratio with the file-max, inode-max, and inode-nr.
> But, I don't know much about that, so someone else will hafta tell me
> about that.
All these nice fields can be found under /proc/sys/fs/... (at least here).
ciao -
Stefan.
--
Quant-X Service & Ph: (+43) 4212 6004-0
Consulting Ges.m.b.H. Fax: (+43) 4212 600420
http://www.quant-x.com Email: support@quant-x.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: syslogd problems - fixed?
1998-07-23 19:51 syslogd problems - fixed? Barrett G. Lyon
1998-07-23 23:27 ` Quant-X Alpha Linux Support
@ 1998-07-27 15:00 ` Paul Tomblin
1 sibling, 0 replies; 6+ messages in thread
From: Paul Tomblin @ 1998-07-27 15:00 UTC (permalink / raw)
To: axp-list
Quoting Barrett G. Lyon (doxx@ns1.foothill.net):
>
> I then just ditched the v2.1 kernels and went with the stable kernel
> 2.0.34. With the 2.0.34 kernel I had the full proc filesystem, and I
> could bump up the /proc/sys/kernel/file-max to 4096, rather than 1024.
>
> This works great, and the machine has been up for weeks with a very very
> heavy load, and until yesterday has not crashed. 20 days uptime (personal
> alpha record).
I set my file-max to 4096 two days ago, and today I got the syslogd screw-up.
It doesn't seem to fix it, just delay it by a day or two.
--
Paul Tomblin, ptomblin@xcski.com.
"An appointment is an engagement to see someone, while a morningstar is a
large lump of metal used for viciously crushing skulls. It is important not
to confuse the two, isn't it, Mr. --?" - Terry Pratchett
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: syslogd problems - fixed?
@ 1998-07-27 15:20 Greg Lindahl
1998-07-27 16:10 ` Barrett G. Lyon
1998-07-27 16:13 ` Paul Tomblin
0 siblings, 2 replies; 6+ messages in thread
From: Greg Lindahl @ 1998-07-27 15:20 UTC (permalink / raw)
To: axp-list
> > This works great, and the machine has been up for weeks with a very very
> > heavy load, and until yesterday has not crashed. 20 days uptime (personal
> > alpha record).
>
> I set my file-max to 4096 two days ago, and today I got the syslogd screw-up.
> It doesn't seem to fix it, just delay it by a day or two.
Well, that's actually useful information.
When you look in /proc at which processes have files open, are there a
few processes that keep on opening more and more?
If you cat /proc/sys/kernel/file-nr, do you see the # of fd's in use
steadily rising? This count seems to represent the size of a data
structure so it may never shrink, but it's good enough for this
purpose.
Since (by default) 1 process can only open 256 fd's, the most likely
explanation at this point is that the kernel isn't properly reusing
closed fd's -- no one process (only 16) can eat up 4096 fd's. The
proof of this guess is that you'll see file-nr keep on rising, but the
# of fd's indicated as in-use in /proc will be small.
-- g
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: syslogd problems - fixed?
1998-07-27 15:20 Greg Lindahl
@ 1998-07-27 16:10 ` Barrett G. Lyon
1998-07-27 16:13 ` Paul Tomblin
1 sibling, 0 replies; 6+ messages in thread
From: Barrett G. Lyon @ 1998-07-27 16:10 UTC (permalink / raw)
To: axp-list
[-- Attachment #1: Type: text/plain, Size: 2316 bytes --]
I wrote the orig. message, there must be a fds leak in the Linux kernels.
Thats the only way that I can explane what happens. I can only keep my
machine up for about 10 days before the machine starts to crash. I had
lsof looping every 30 seconds to keep a list of open files in
/var/log/lsof. I was keeping my file-max at around 4096 until 9 days of
uptime where if I cat'd my lsof file and did a wc -l it was near over 4000
lines. Most of the open files where things like httpd, or the bots that my
shell users run, but nothing stuck out as using more than its share. At
that point things started to segfault, so I upped file-max to a rather
large number, and about 30 minutes later the machine crashed with "No free
inodes: contact Linus" on console (or something to that effect).
looks like the syslogd problem is just a result of the fds leak in the
linux kernel?
-Barrett
At 11:20 AM 7/27/98 -0400, you wrote:
>> > This works great, and the machine has been up for weeks with a very very
>> > heavy load, and until yesterday has not crashed. 20 days uptime
(personal
>> > alpha record).
>>
>> I set my file-max to 4096 two days ago, and today I got the syslogd
screw-up.
>> It doesn't seem to fix it, just delay it by a day or two.
>
>Well, that's actually useful information.
>
>When you look in /proc at which processes have files open, are there a
>few processes that keep on opening more and more?
>
>If you cat /proc/sys/kernel/file-nr, do you see the # of fd's in use
>steadily rising? This count seems to represent the size of a data
>structure so it may never shrink, but it's good enough for this
>purpose.
>
>Since (by default) 1 process can only open 256 fd's, the most likely
>explanation at this point is that the kernel isn't properly reusing
>closed fd's -- no one process (only 16) can eat up 4096 fd's. The
>proof of this guess is that you'll see file-nr keep on rising, but the
># of fd's indicated as in-use in /proc will be small.
>
>-- g
>
>--
>To unsubscribe: send e-mail to axp-list-request@redhat.com with
>'unsubscribe' as the subject. Do not send it to axp-list@redhat.com
>
>
--
Barrett G. Lyon
Data & Network Security Consultant Fax: 310-737-0196
Network Presence, LLC Email: blyon@netpr.com
--
[-- Attachment #2: Type: application/pgp-signature, Size: 191 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: syslogd problems - fixed?
1998-07-27 15:20 Greg Lindahl
1998-07-27 16:10 ` Barrett G. Lyon
@ 1998-07-27 16:13 ` Paul Tomblin
1 sibling, 0 replies; 6+ messages in thread
From: Paul Tomblin @ 1998-07-27 16:13 UTC (permalink / raw)
To: axp-list
Quoting Greg Lindahl (lindahl@cs.virginia.edu):
> If you cat /proc/sys/kernel/file-nr, do you see the # of fd's in use
> steadily rising? This count seems to represent the size of a data
> structure so it may never shrink, but it's good enough for this
> purpose.
It's been a few hours since I killed syslogd, and /proc/sys/kernel/file-nr is
384. Next time I restart syslogd I'll try and keep an eye on it.
--
Paul Tomblin, ptomblin@xcski.com.
"An appointment is an engagement to see someone, while a morningstar is a
large lump of metal used for viciously crushing skulls. It is important not
to confuse the two, isn't it, Mr. --?" - Terry Pratchett
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~1998-07-27 16:14 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-07-23 19:51 syslogd problems - fixed? Barrett G. Lyon
1998-07-23 23:27 ` Quant-X Alpha Linux Support
1998-07-27 15:00 ` Paul Tomblin
-- strict thread matches above, loose matches on Subject: below --
1998-07-27 15:20 Greg Lindahl
1998-07-27 16:10 ` Barrett G. Lyon
1998-07-27 16:13 ` Paul Tomblin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox