Yahoo Groups archive

Milter-greylist

Index last updated: 2026-04-28 23:32 UTC

Thread

milter-greylist 2.0.1 crash on amd64

milter-greylist 2.0.1 crash on amd64

2005-10-05 by Andreas Unterkircher

Hello!

I'm using milter-greylist with sendmail (8.13.5) on a dual amd
opteron server with debian sid (gcc 4.0.2).

Version 2.0 runs perfectly. This morning I wanted to give 2.0.1
a try, but it now crash always after some hours. No traces in
the logs.

Only dmesg show's me the following:

milter-greylist[28955]: segfault at 000000000057c000 rip 00002aaaab1a1ecd rsp
0000000042803698 error 6

Some debugging which I can turn on to find out where this happens?

Cheers,
Andreas

Re: [milter-greylist] milter-greylist2.0.1 crash on amd64

2005-10-05 by Emmanuel Dreyfus

On Wed, Oct 05, 2005 at 04:13:35PM +0200, Andreas Unterkircher wrote:
> I'm using milter-greylist with sendmail (8.13.5) on a dual amd
> opteron server with debian sid (gcc 4.0.2).
> 
> Version 2.0 runs perfectly. This morning I wanted to give 2.0.1
> a try, but it now crash always after some hours. No traces in
> the logs.
(gdb)
> Some debugging which I can turn on to find out where this happens?

Rebuild milter-greylist with -g in CFLAGS (change the Makefile for that), 
and run it within gdb:
# gdb milter-greylist
(gdb) run

When you'll get a crash, report the result of the bt command.

-- 
Emmanuel Dreyfus
manu@...

Re: [milter-greylist] milter-greylist2.0.1 crash on amd64

2005-10-05 by Andreas Unterkircher

Hi

Like you said. Recompiled with -g

CFLAGS=         -g -O2 -Wall -Iyes/include -D_XOPEN_SOURCE=500 -D_BSD_SOURCE

and used -D so it doesn't fork into background. Following output I get 
from gdb:

orko:/# gdb --args /usr/local/bin/milter-greylist -D -P 
/var/run/greylist.pid -u smmsp -p /var/run/milter-greylist/greylist.sock
GNU gdb 6.3-debian
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain 
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "x86_64-linux"...Using host libthread_db 
library "/lib/libthread_db.so.1".

(gdb) run
Starting program: /usr/local/bin/milter-greylist -D -P 
/var/run/greylist.pid -u smmsp -p /var/run/milter-greylist/greylist.sock
[Thread debugging using libthread_db enabled]
[New Thread 46912505297632 (LWP 14732)]
[New Thread 1082132832 (LWP 14735)]
[New Thread 1090525536 (LWP 14736)]
[New Thread 1098918240 (LWP 14737)]
[New Thread 1107310944 (LWP 14738)]
[New Thread 1115703648 (LWP 14740)]
milter-greylist: greylist: sigwait returned error: 0
milter-greylist: j95HGnqq014739: skipping greylist because address 
209.132.176.167 is whitelisted, 
(from==40netshadow.at-S1030268AbVJERQJ@...>, 
rcpt=<unki@...>, addr=209.132.176.167)
[Thread 1115703648 (LWP 14740) exited]
milter-greylist: greylist: sigwait returned error: 0
[New Thread 1115703648 (LWP 14932)]
milter-greylist: greylist: sigwait returned error: 0
milter-greylist: j95HKKQ1014928: skipping greylist because address 
209.132.176.167 is whitelisted, 
(from==40netshadow.at-S1030272AbVJERTm@...>, 
rcpt=<unki@...>, addr=209.132.176.167)
[Thread 1115703648 (LWP 14932) exited]
milter-greylist: greylist: sigwait returned error: 0
[New Thread 1115703648 (LWP 14972)]
milter-greylist: greylist: sigwait returned error: 0
milter-greylist: j95HLDRf014971: skipping greylist because address 
209.132.176.167 is whitelisted, 
(from==40netshadow.at-S1030275AbVJERUG@...>, 
rcpt=<unki@...>, addr=209.132.176.167)
[Thread 1115703648 (LWP 14972) exited]
milter-greylist: greylist: sigwait returned error: 0
[New Thread 1115703648 (LWP 14999)]
milter-greylist: greylist: sigwait returned error: 0
[Thread 1115703648 (LWP 14999) exited]
milter-greylist: greylist: sigwait returned error: 0
[New Thread 1115703648 (LWP 15002)]
milter-greylist: greylist: sigwait returned error: 0
milter-greylist: j95HLmWW015001: skipping greylist because address 
209.132.176.167 is whitelisted, 
(from==40netshadow.at-S1030274AbVJERVK@...>, 
rcpt=<unki@...>, addr=209.132.176.167)
[Thread 1115703648 (LWP 15002) exited]
milter-greylist: greylist: sigwait returned error: 0
[New Thread 1115703648 (LWP 15024)]
milter-greylist: greylist: sigwait returned error: 0
[Thread 1115703648 (LWP 15024) exited]
milter-greylist: greylist: sigwait returned error: 0
[New Thread 1115703648 (LWP 15045)]
milter-greylist: greylist: sigwait returned error: 0
milter-greylist: j95HMpUk015044: skipping greylist because address 
209.132.176.167 is whitelisted, 
(from==40netshadow.at-S1030276AbVJERWM@...>, 
rcpt=<unki@...>, addr=209.132.176.167)
[Thread 1115703648 (LWP 15045) exited]
milter-greylist: greylist: sigwait returned error: 0
[New Thread 1115703648 (LWP 15055)]
milter-greylist: greylist: sigwait returned error: 0
[Thread 1115703648 (LWP 15055) exited]
milter-greylist: greylist: sigwait returned error: 0
[New Thread 1115703648 (LWP 15214)]
milter-greylist: greylist: sigwait returned error: 0
[Thread 1115703648 (LWP 15214) exited]
milter-greylist: greylist: mi_stop=2
milter-greylist: Final database dump: no change to dump
milter-greylist: Exiting

Program exited normally.
(gdb)

The backtrace only says:

(gdb) bt
No stack.

That isn't very helpful I guess...?

Andreas


Emmanuel Dreyfus wrote:
Show quoted textHide quoted text
>On Wed, Oct 05, 2005 at 04:13:35PM +0200, Andreas Unterkircher wrote:
>  
>
>>I'm using milter-greylist with sendmail (8.13.5) on a dual amd
>>opteron server with debian sid (gcc 4.0.2).
>>
>>Version 2.0 runs perfectly. This morning I wanted to give 2.0.1
>>a try, but it now crash always after some hours. No traces in
>>the logs.
>>    
>>
>(gdb)
>  
>
>>Some debugging which I can turn on to find out where this happens?
>>    
>>
>
>Rebuild milter-greylist with -g in CFLAGS (change the Makefile for that), 
>and run it within gdb:
># gdb milter-greylist
>(gdb) run
>
>When you'll get a crash, report the result of the bt command.
>
>  
>

Re: [milter-greylist] milter-greylist2.0.1 crash on amd64

2005-10-05 by Emmanuel Dreyfus

On Wed, Oct 05, 2005 at 07:35:53PM +0200, Andreas Unterkircher wrote:
> milter-greylist: j95HMpUk015044: skipping greylist because address 
> 209.132.176.167 is whitelisted, 
> (from==40netshadow.at-S1030276AbVJERWM@...>, 
> rcpt=<unki@...>, addr=209.132.176.167)
> [Thread 1115703648 (LWP 15045) exited]
> milter-greylist: greylist: sigwait returned error: 0
> [New Thread 1115703648 (LWP 15055)]
> milter-greylist: greylist: sigwait returned error: 0
> [Thread 1115703648 (LWP 15055) exited]
> milter-greylist: greylist: sigwait returned error: 0
> [New Thread 1115703648 (LWP 15214)]
> milter-greylist: greylist: sigwait returned error: 0
> [Thread 1115703648 (LWP 15214) exited]
> milter-greylist: greylist: mi_stop=2
> milter-greylist: Final database dump: no change to dump
> milter-greylist: Exiting

It doesn't look like it have crashed. I was expecting a SIGSEGV. 
Anyone has an idea?

-- 
Emmanuel Dreyfus
manu@...

Re: [milter-greylist] milter-greylist2.0.1 crash on amd64

2005-10-05 by Andreas Unterkircher

I also disabled spf now, because with milter-greylist v2.0 I wasn't 
using spf. My libspf2 version (1.2.5)
wasn't supported till 2.0.1. But the problem still occurs.

Emmanuel Dreyfus wrote:
Show quoted textHide quoted text
>On Wed, Oct 05, 2005 at 07:35:53PM +0200, Andreas Unterkircher wrote:
>  
>
>>milter-greylist: j95HMpUk015044: skipping greylist because address 
>>209.132.176.167 is whitelisted, 
>>(from==40netshadow.at-S1030276AbVJERWM@...>, 
>>rcpt=<unki@...>, addr=209.132.176.167)
>>[Thread 1115703648 (LWP 15045) exited]
>>milter-greylist: greylist: sigwait returned error: 0
>>[New Thread 1115703648 (LWP 15055)]
>>milter-greylist: greylist: sigwait returned error: 0
>>[Thread 1115703648 (LWP 15055) exited]
>>milter-greylist: greylist: sigwait returned error: 0
>>[New Thread 1115703648 (LWP 15214)]
>>milter-greylist: greylist: sigwait returned error: 0
>>[Thread 1115703648 (LWP 15214) exited]
>>milter-greylist: greylist: mi_stop=2
>>milter-greylist: Final database dump: no change to dump
>>milter-greylist: Exiting
>>    
>>
>
>It doesn't look like it have crashed. I was expecting a SIGSEGV. 
>Anyone has an idea?
>
>  
>

RE: [milter-greylist] milter-greylist2.0.1 crash on amd64

2005-10-05 by attila.bruncsak@itu.int

> 
> It doesn't look like it have crashed. I was expecting a SIGSEGV. 
> Anyone has an idea?
> 

Hello,

Andreas, have you linked the milter-greylist-2.0.1 with the same libmilter version as the milter-greylist-2.0?

Bests,
Attila

Re: [milter-greylist] milter-greylist2.0.1 crash on amd64

2005-10-06 by Andreas Unterkircher

Hi,

Yes - Yesterday I recompiled also 2.0 so I can exclude an issue with 
sendmail/libmilter (8.13.5).
2.0 runs without problems since yesterday.

One thing - something changed from 2.0 to 2.0.1 with mxsync, right? I 
have in summary 3 hosts
which are configured as "peer" in greylist.conf. But one of them is 
down. Perhaps this makes
problems? to many queued events of course connection timeout?

I setuped now 2.0.1 again and removed this host from config. Waiting...

Cheers,
Andreas

attila.bruncsak@... wrote:
Show quoted textHide quoted text
>>It doesn't look like it have crashed. I was expecting a SIGSEGV. 
>>Anyone has an idea?
>>
>>    
>>
>
>Hello,
>
>Andreas, have you linked the milter-greylist-2.0.1 with the same libmilter version as the milter-greylist-2.0?
>
>Bests,
>Attila
>
>
>
> 
>Yahoo! Groups Links
>
>
>
> 
>
>
>
>
>  
>

Re: [milter-greylist] milter-greylist2.0.1 crash on amd64

2005-10-06 by Andreas Unterkircher

So - it looks like my suspicion on the unreachable host was correct.

On x86 v2.0.1 has no problem with a unreachable host as mx peer in the 
config.
On x64 v2.0.1 exits after some random time with a unreachable host as mx 
peer in the config.
(like showed in the mails before).

Andreas

Andreas Unterkircher wrote:
Show quoted textHide quoted text
>Hi,
>
>Yes - Yesterday I recompiled also 2.0 so I can exclude an issue with 
>sendmail/libmilter (8.13.5).
>2.0 runs without problems since yesterday.
>
>One thing - something changed from 2.0 to 2.0.1 with mxsync, right? I 
>have in summary 3 hosts
>which are configured as "peer" in greylist.conf. But one of them is 
>down. Perhaps this makes
>problems? to many queued events of course connection timeout?
>
>I setuped now 2.0.1 again and removed this host from config. Waiting...
>
>Cheers,
>Andreas
>
>attila.bruncsak@... wrote:
>
>  
>
>>>It doesn't look like it have crashed. I was expecting a SIGSEGV. 
>>>Anyone has an idea?
>>>
>>>   
>>>
>>>      
>>>
>>Hello,
>>
>>Andreas, have you linked the milter-greylist-2.0.1 with the same libmilter version as the milter-greylist-2.0?
>>
>>Bests,
>>Attila
>>    
>>

Re: [milter-greylist] milter-greylist2.0.1 crash on amd64

2005-10-06 by Emmanuel Dreyfus

On Thu, Oct 06, 2005 at 07:57:30PM +0200, Andreas Unterkircher wrote:
> So - it looks like my suspicion on the unreachable host was correct.
> 
> On x86 v2.0.1 has no problem with a unreachable host as mx peer in the 
> config.
> On x64 v2.0.1 exits after some random time with a unreachable host as mx 
> peer in the config.
> (like showed in the mails before).

An unreachable peer should trigger an error message in the log. Can you 
add some printf around the connect calls in sync.c and run milter-greylist
in the foreground so that we know what happen when connect fails because the
host is unreachable?

-- 
Emmanuel Dreyfus
manu@...

Re: [milter-greylist] milter-greylist2.0.1 crash on amd64

2005-10-07 by Andreas Unterkircher

Hello!

I inserted some debug output into the peer_connect() function:

Entering peer_connect()
In function: peer_connect(), before fdopen()
In function: peer_connect(), before sync_waitdata()
Leaving function: peer_connect()
milter-greylist: Connection to 217.116.182.106 established
Entering peer_connect()
[Thread 1115703648 (LWP 29460) exited]
milter-greylist: greylist: sigwait returned error: 0
[New Thread 1115703648 (LWP 29520)]
milter-greylist: greylist: sigwait returned error: 0
[Thread 1115703648 (LWP 29520) exited]
milter-greylist: greylist: sigwait returned error: 0
milter-greylist: cannot sync with peer 213.235.245.178: Connection timed out
(0 entries queued)
[New Thread 1115703648 (LWP 29681)]
milter-greylist: greylist: sigwait returned error: 0
milter-greylist: j977DUrl029673: skipping greylist because address
209.132.176.167 is whitelisted,
(from==40netshadow.at-S1750704AbVJGHKi@...>,
rcpt=<unki@...>, addr=209.132.176.167)
[Thread 1115703648 (LWP 29681) exited]
milter-greylist: greylist: sigwait returned error: 0
[New Thread 1115703648 (LWP 29776)]
milter-greylist: greylist: sigwait returned error: 0
milter-greylist: j977FXel029775: addr 66.35.250.225 from
<havp-users-admin@...> rcpt <unki@...>:
autowhitelisted for more 2160:00:00
Entering peer_connect()
[Thread 1115703648 (LWP 29776) exited]
milter-greylist: greylist: sigwait returned error: 0
milter-greylist: cannot sync with peer 213.235.245.178: Connection timed out
(1 entries queued)
[New Thread 1115703648 (LWP 30060)]
milter-greylist: greylist: sigwait returned error: 0
[Thread 1107310944 (LWP 28481) exited]
milter-greylist: greylist: mi_stop=2
milter-greylist: Final database dump: no change to dump
milter-greylist: Exiting

The first try to connect 213.235.245.178 didn't make problems. But after the
second one, milter-greylist exits.

So this happens somewhere around line 399 in sync.c, where peer_connect()
return -1.

Emmanuel Dreyfus (manu@...) schrieb:
Show quoted textHide quoted text
>
> On Thu, Oct 06, 2005 at 07:57:30PM +0200, Andreas Unterkircher wrote:
> > So - it looks like my suspicion on the unreachable host was correct.
> >
> > On x86 v2.0.1 has no problem with a unreachable host as mx peer in the
> > config.
> > On x64 v2.0.1 exits after some random time with a unreachable host as mx
> > peer in the config.
> > (like showed in the mails before).
>
> An unreachable peer should trigger an error message in the log. Can you
> add some printf around the connect calls in sync.c and run milter-greylist
> in the foreground so that we know what happen when connect fails because the
> host is unreachable?
>
> --
> Emmanuel Dreyfus
> manu@...
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
>
>

Re: [milter-greylist]milter-greylist2.0.1 crash on amd64

2005-10-07 by Emmanuel Dreyfus

On Fri, Oct 07, 2005 at 09:41:15AM +0200, Andreas Unterkircher wrote:
> The first try to connect 213.235.245.178 didn't make problems. But after the
> second one, milter-greylist exits.
> 
> So this happens somewhere around line 399 in sync.c, where peer_connect()
> return -1.

So you exit from the function, and then what happens? You need more
printf...

-- 
Emmanuel Dreyfus
manu@...

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.