* stochastic syslogging (!!)
@ 1998-02-12 5:00 Mark Bartelt
1998-02-12 5:00 ` It's DUnix's fault (I think) [ was: stochastic syslogging (!!) ] Mark Bartelt
0 siblings, 1 reply; 5+ messages in thread
From: Mark Bartelt @ 1998-02-12 5:00 UTC (permalink / raw)
Here's one of the weirdest things I've come up against in quite a
while, hence the rather peculiar collection of newsgroups. I've
included comp.sys.sun.admin just in the off chance that SunOS4 is
involved, even though I doubt that it is ...
Recently, I decided to send all our syslog info (from all of our
machines) to a central loghost machine, in addition to the local
logfiles. So my syslog.conf looks like this:
kern.debug;[...];local3.debug @loghost
kern.debug /var/log/syslog/kern.log
user.debug /var/log/syslog/user.log
mail.debug /var/log/syslog/mail.log
daemon.debug /var/log/syslog/daemon.log
auth.debug /var/log/syslog/auth.log
syslog.debug /var/log/syslog/syslog.log
lpr.debug /var/log/syslog/lpr.log
news.debug /var/log/syslog/news.log
uucp.debug /var/log/syslog/uucp.log
local1.debug /var/log/syslog/local1.log
local2.debug /var/log/syslog/local2.log
local3.debug /var/log/syslog/local3.log
[ other stuff ]
... where "[...]" are all those other facility.severity fields
which appear in the lines below, and "[ other stuff ]" differs
on different platforms.
Everything works as expected, in that things get logged where
they should on both the local machine and on loghost, with one
and only one exception:
When sendmail logs an entry from a Digital UNIX system, the log
message goes to the correct place (mail.log) on the local host,
but goes to a seemingly random logfile on loghost! I've found
stuff from sendmail in auth.log, daemon.log, kern.log, lpr.log,
and syslog.log!
When sendmail runs on our IRIX or SunOS systems, sendmail's log
info *always* goes to mail.log on both the local machine and on
loghost. Furthermore, every other program's syslog info always
goes to the correct logfile on both the local host and loghost,
no matter what system it's run on (including Digital UNIX).
My first inclination might be to suspect sendmail, but the fact
that the log entries always go to mail.log on the local machine
and go to the wrong place only on loghost make one suspect that
Digital UNIX is screwing up.
But on the other hand, if I do something like
logger -p mail.somepriority "some test message"
... the message *always* ends up in mail.log on loghost, even in
cases where I do this on a DUnix system. So it seems that this
syslog problem occurs only with messages emitted by sendmail and
only when sendmail is running under Digital UNIX.
Has anyone else encountered anything like this, and/or are there
any guesses as to whether it's a DUnix problem or a sendmail bug
(or, perhaps, bugs in both)?
The details:
-- Digital UNIX 3.2c and 4.0b
-- loghost is a Sparc running SunOS 4.1.4
-- sendmail 8.6.13 (yeah, yeah, I know I should
upgrade to 8.8.8; someday ...)
As usual, many thanks in advance.
PS: DEC's manpage for "logger" is wrong. It describes the "-p"
flag as "-p priority[.facility]", but in fact the correct usage
is "-p facility.priority". The command itself complains if one
uses "-p priority.facility". On the manpage, one example uses
the correct syntax, while another uses the incorrect one. Sigh.
Mark Bartelt 416/978-5619
Canadian Institute for mark@cita.utoronto.ca
Theoretical Astrophysics http://www.cita.utoronto.ca/~mark
"Nur eine Waffel taugt!" -- Parsifal, in an Eggo commercial
^ permalink raw reply [flat|nested] 5+ messages in thread
* It's DUnix's fault (I think) [ was: stochastic syslogging (!!) ]
1998-02-12 5:00 stochastic syslogging (!!) Mark Bartelt
@ 1998-02-12 5:00 ` Mark Bartelt
1998-02-12 5:00 ` SUMMARY: stochastic syslogging (!!) Mark Bartelt
0 siblings, 1 reply; 5+ messages in thread
From: Mark Bartelt @ 1998-02-12 5:00 UTC (permalink / raw)
Well, as is frequently the case, the mere act of posting something
started some different brain gears turning, so I decided to do some
more poking around. In my previous post, I said ...
>> But on the other hand, if I do something like
>>
>> logger -p mail.somepriority "some test message"
>>
>> ... the message *always* ends up in mail.log on loghost, even in
>> cases where I do this on a DUnix system. So it seems that this
>> syslog problem occurs only with messages emitted by sendmail and
>> only when sendmail is running under Digital UNIX.
As it turns out, the test messages I was using were short. Figuring
that maybe something about the *length* of the messages just may be
relevant, I tried using "logger" with a copy of a message which was
actually logged by sendmail. Bingo! Here's what I've found:
-- When using "logger" to log a message longer than a certain length
(sorry, I haven't yet quantified what that length is), the message is
split into multiple messages. If possible, the split is made between
two consecutive argv elements. Otherwise, it just makes the split at
some other point.
In other words, if I do
x="Some incredibly long message including whitespace"
then
logger -p mail.debug $x
and
logger -p mail.debug "$x"
get split differently, with the first making the split at a whitespace,
and the latter making it elsewhere.
-- When a long message is logged this way, sometimes the first chunk
gets logged to the wrong file on loghost; the second chunk seems to be
logged to the correct file every time.
-- This chopping of the message seems to be getting done by "logger"
itself, not by anything in the deeper-down innards of the syslogging
stuff, since messages logged by sendmail via syslog(3) appear as one
single long message (albeit to the wrong logfile most of the time).
However, something really peculiar is going in with long messages in
both cases.
So my suspicion (though, short of grabbing the syslog packets that are
being sent from the DUnix system to the syslogd on loghost, it's hard
to verify my hypothesis) is that the problem is related to whatever it
is that DUnix is doing when a message exceeds some threshold. It does
appear that loghost's syslogd is doing what it's supposed to, but that
it's getting incorrect information from the DUnix system.
Does anyone know of reports of problems of this sort? Is there a patch
out that fixes it?
In any case, I'll keep bashing away at it until I can categorize things
a bit more accurately (e.g. what message length makes things break) and
will report back.
Mark Bartelt 416/978-5619
Canadian Institute for mark@cita.utoronto.ca
Theoretical Astrophysics http://www.cita.utoronto.ca/~mark
"Clothes not busy being worn are busy drying." -- Dylan, on laundry day
[ singing "It's all right, ma (I'm only bleaching)" ]
^ permalink raw reply [flat|nested] 5+ messages in thread* SUMMARY: stochastic syslogging (!!)
1998-02-12 5:00 ` It's DUnix's fault (I think) [ was: stochastic syslogging (!!) ] Mark Bartelt
@ 1998-02-12 5:00 ` Mark Bartelt
1998-02-12 5:00 ` Mark Bartelt
0 siblings, 1 reply; 5+ messages in thread
From: Mark Bartelt @ 1998-02-12 5:00 UTC (permalink / raw)
Well, that was fast! A number of replies have arrived already. The first,
and (thus far) most helpful came from Debra Alpert <alpert@fas.harvard.edu>,
who writes ...
>> We've seen precisely the same problem at our site, where we're running
>> Digital Unix 4.0B. Our loghost is an alphastation 255/300, and we're
>> running sendmail 8.8.8. We also noticed, however, that on the loghost, the
>> random placement of messages can occur for any facility, not just mail. We
>> placed a call with DEC support, and they said that this is in fact a bug.
>> It is supposed to be fixed (for 4.0B) in patch_kits 5 and 6. We just
>> installed patch_kit 6 on some of our hosts yesterday, so I can't confirm
>> whether the patch resolves the problem or not.
... and ...
>> We installed the jumbo patch on only 6 of about 70 systems at our
>> site, but after we collect some data from those few machines, I'll email
>> you back with results. DEC claims the patch_kit is the cure. You should
>> probably go straight to patch_kit 6; patch_kit 5 opens a number of
>> security loopholes involving setuid functions and core files. I was able
>> to hack root using two of these exploits. These problems are addressed in
>> the later patch_kit.
So it looks as if this is the solution. One last question, if anyone knows:
Is this particular bugfix bundled into 4.0d, or if not, is there a patchkit
out for 4.0d which fixes the problem?
Mark Bartelt 416/978-5619
Canadian Institute for mark@cita.utoronto.ca
Theoretical Astrophysics http://www.cita.utoronto.ca/~mark
"Sheep not busy being shorn are busy frying" -- Dylan, at a NZ lamb barbecue
[ singing "It's all right, ma (I'm only bleating)" ]
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: SUMMARY: stochastic syslogging (!!)
1998-02-12 5:00 ` SUMMARY: stochastic syslogging (!!) Mark Bartelt
@ 1998-02-12 5:00 ` Mark Bartelt
1998-02-12 5:00 ` Mark Bartelt
0 siblings, 1 reply; 5+ messages in thread
From: Mark Bartelt @ 1998-02-12 5:00 UTC (permalink / raw)
A short while ago, I wrote ...
>> Well, that was fast! A number of replies have arrived already. The first,
>> and (thus far) most helpful came from Debra Alpert <alpert@fas.harvard.edu>,
>> [ ... ]
And actually, the ever helpful Ms. Alpert has written again, to let me know that
>> I've looked through the latest logs, and I haven't seen any misplaced
>> messages on our loghost coming from the patched machines. Such messages
>> usually occur about 10% of the time. It can't be just coincidence; the
>> patch_kit works as advertised for this problem.
So that, as they say, seems to pretty much wrap this one up (aside from the issue
of whether 4.0d includes the fix). Thanks again to all who replied.
Mark Bartelt 416/978-5619
Canadian Institute for mark@cita.utoronto.ca
Theoretical Astrophysics http://www.cita.utoronto.ca/~mark
"Sheep not busy being shorn are busy frying" -- Dylan, at a NZ lamb barbecue
[ singing "It's all right, ma (I'm only bleating)" ]
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: SUMMARY: stochastic syslogging (!!)
1998-02-12 5:00 ` Mark Bartelt
@ 1998-02-12 5:00 ` Mark Bartelt
0 siblings, 0 replies; 5+ messages in thread
From: Mark Bartelt @ 1998-02-12 5:00 UTC (permalink / raw)
OK, this will be the last submission (on this topic, anyway); promise. Regarding the
question of ...
>> So that, as they say, seems to pretty much wrap this one up (aside from the issue
>> of whether 4.0d includes the fix).
... I got a message from Alan Davis of Digital, who reports that ...
>> It is fixed in the 006 patch kit for v4.0b, it's not in v4.0d.
>> The initial patch kit for v4.0d will have it and it's due out in March.
>>
>> The v4.0b patch id is 174.0
So that really *does* wrap things up (at least until the first 4.0d patchkit arrives).
Mark Bartelt 416/978-5619
Canadian Institute for mark@cita.utoronto.ca
Theoretical Astrophysics http://www.cita.utoronto.ca/~mark
"Sheep not busy being shorn are busy frying" -- Dylan, at a NZ lamb barbecue
[ singing "It's all right, ma (I'm only bleating)" ]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~1998-02-12 5:00 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-02-12 5:00 stochastic syslogging (!!) Mark Bartelt
1998-02-12 5:00 ` It's DUnix's fault (I think) [ was: stochastic syslogging (!!) ] Mark Bartelt
1998-02-12 5:00 ` SUMMARY: stochastic syslogging (!!) Mark Bartelt
1998-02-12 5:00 ` Mark Bartelt
1998-02-12 5:00 ` Mark Bartelt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox