On Tue, Jun 12, 2007 at 03:34:06PM +0200, Til Obes wrote:
> Robert Felber schrieb:
> >Despair:
> >use (bz|z)grep "policyd-weight\[" /var/log/* | \
> >    grep -v "(decided|weighted)"
> >Unfortunately there is no strict standard how to log stuff, and each OS logs
> >a little bit different (der Teufel ist ein Eichhoernchen). So grep all your
> >logs which may exist in /var/log (and subdirectories) for policyd-weight
> >messages and grep out (-v) "decided" and "weighted" messages.
> 
> Ok i found something:
> Jun  5 11:20:59 mailhost postfix/policyd-weight[13463]: child: spawned
> Jun  5 11:21:03 mailhost postfix/policyd-weight[13463]: warning: ignoring 
> garbage: TEST
> Jun  5 11:21:04 mailhost postfix/policyd-weight[13463]: fatal_exit: 
> unrecognized request type: ''
> Jun  5 11:21:04 mailhost postfix/policyd-weight[13463]: child: err: fatal: 
> unrecognized request type: '' at 
> /usr/local/bin/policyd-weight line 690, <GEN7> line 2.
> Jun  5 11:21:04 mailhost postfix/policyd-weight[13303]: child 13463 exited

This is normal and not the cause.


Currently I can think only of some situations where a "crash" without
logging could happen:

- Signals like KILL, INT, TERM, QUIT, PIPE (and other sigs which cause
    termination)
    are not logged. In any case - this wouldn't be normal behavior anyways.
    If those signals arive at the master, then someone/something else must
    trigger it.
    SIGSEGV should appear in the kernel log. 
    You could grep for all master PIDs which every appeared in your logs:

    On a FreeBSD with zsh and gnu-bzgrep I do it so:

p=`bzgrep "daemonized" /var/log/mail/maillog* |                \
    perl -pe 'while(<>){s/.*?\[(\d+)\].*/$1/s; push(@o, $_)}   \
    print "\\\(\\\[".join("\\\]\\\|\\\[",@o)."\\\]\\\)" '`;    \
    bzgrep -r -i -e "policyd-weight$p" /var/log/*

    (This probably won't work with your system, I've tested it with zsh and 
    bash, unfortunately they don't behave the same everywhere).

    You will find such stuff then, too:

Jun 12 18:29:14 <console.info> fpsvr1z150 kernel: Jun 12 18:29:14 <kern.info> 
fpsvr1z150 kernel: pid 50216 (perl5.8.8), uid 0: exited on signal 11

    (This was a manually crafted signal)
    As you see, no "policyd-weight" relation, but I have found this via the
    PID, as this was a master process. Works not for other signals though, 
    but you might want to give it a try.


also (to continue the secnarios)

- kernel buggy?

- syslog broken?

- perl broken?


After all, I would like to know whether this is in some form reproduceable.
I am on my way home now. Expect in some hours a version which tries to log
each and every signal caught. As a workaround you could also run policyd-weight
in master.cf mode.



-- 
    Robert Felber (PGP: 896CF30B)
    Munich, Germany

____________________________________________________________
Policyd-weight Mailinglist - http://www.policyd-weight.org/

Reply via email to