Yahoo Groups archive

Milter-greylist

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

Thread

Re: reproducible crashing

Re: reproducible crashing

2016-11-16 by manu@...

Marcus Schopen <lists@...> wrote:

> regarding to my todays post "weighting blacklists" I can reproducible
> crash milter-greylist with this configuration:

Could you please run milter-greylist in gdb and collect a backtrace?

Make sure you build with -g, then:
# gdb milter-greylist
(gdb) run [options] -D
Once crashed, issue the bt command in gdb.
-- 
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu@...

Re: [milter-greylist] Re: reproducible crashing

2016-11-16 by Marcus Schopen

Hi Emmanuel,

On 2016-11-16 01:33, manu@... [milter-greylist] wrote:
> Marcus Schopen <lists@...> wrote:
> 
>> regarding to my todays post "weighting blacklists" I can reproducible
>> crash milter-greylist with this configuration:
> 
> Could you please run milter-greylist in gdb and collect a backtrace?

Thanks for your time.

> Make sure you build with -g, then:
> # gdb milter-greylist
> (gdb) run [options] -D
> Once crashed, issue the bt command in gdb.d

I've attached the debug, mail.log, greylist.conf and the patches of the 
debian package.

The only patch I provided is in the srs_filter file and it's about our 
"block SRS senders" discussion (03 Sep 2016). All other patches came 
with the official packages (version 4.3.9-1 maintained by Paul Martin), 
which I used as template to build a new upstream release for 4.6.1. This 
upstream package is installed on two of my live servers for about two 
months and running stable. The milter crashes with this packages when 
line "racl continue set $score=1" is part of config and the config is 
changed while running.

System: Ubuntu 14.04 LTS
Kernel: Linux vorlage.testme.com 4.2.0-42-generic #49~14.04.1-Ubuntu SMP 
Wed Jun 29 20:22:11 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

Ciao
Marcus

Attachments

Re: [milter-greylist] Re: reproducible crashing

2016-11-16 by Marcus Schopen

On 2016-11-16 01:33, manu@... [milter-greylist] wrote:
> Marcus Schopen <lists@...> wrote:
> 
>> regarding to my todays post "weighting blacklists" I can reproducible
>> crash milter-greylist with this configuration:
> 
> Could you please run milter-greylist in gdb and collect a backtrace?
> 
> Make sure you build with -g, then:
> # gdb milter-greylist
> (gdb) run [options] -D
> Once crashed, issue the bt command in gdb.

"bt full" attached.

Ciao!

Re: [milter-greylist] Re: reproducible crashing

2016-11-17 by Marcus Schopen

On 2016-11-16 01:33, manu@... [milter-greylist] wrote:
> Marcus Schopen <lists@...> wrote:
> 
>> regarding to my todays post "weighting blacklists" I can reproducible
>> crash milter-greylist with this configuration:
> 
> Could you please run milter-greylist in gdb and collect a backtrace?
> 
> Make sure you build with -g, then:
> # gdb milter-greylist
> (gdb) run [options] -D
> Once crashed, issue the bt command in gdb.

I built a package without striping:

debian/rules:

override_dh_strip:
	dh_strip --exclude=milter-greylist

backtrace with symbol table infos attached.

Ciao
Marcus

Re: [milter-greylist] Re: reproducible crashing

2016-11-17 by manu@...

Marcus Schopen lists-yahoogroups@... [milter-greylist]
<milter-greylist@yahoogroups.com> wrote:

> #5  0x000000000041266c in ?? ()
> No symbol table info available.
> #6  0x000000000041469e in ?? ()
> No symbol table info available.
> #7  0x00000000004153a5 in ?? ()
> No symbol table info available.
> #8  0x00000000004105aa in ?? ()
> No symbol table info available.

Did you build with -g ?

-- 
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu@...

Re: [milter-greylist] Re: reproducible crashing

2016-11-17 by manu@...

Marcus Schopen lists-yahoogroups@... [milter-greylist]
<milter-greylist@yahoogroups.com> wrote:

> I built a package without striping:

As far as I know, that is not enough, you need -g in CFLAGS in order to
have gdb debug symbols.

-- 
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu@...

Re: [milter-greylist] Re: reproducible crashing

2016-11-17 by Marcus Schopen

On 2016-11-17 16:08, manu@... [milter-greylist] wrote:
> Marcus Schopen lists-yahoogroups@... [milter-greylist]
> <milter-greylist@yahoogroups.com> wrote:
> 
>> #5  0x000000000041266c in ?? ()
>> No symbol table info available.
>> #6  0x000000000041469e in ?? ()
>> No symbol table info available.
>> #7  0x00000000004153a5 in ?? ()
>> No symbol table info available.
>> #8  0x00000000004105aa in ?? ()
>> No symbol table info available.
> 
> Did you build with -g ?

Yes, I think so, I saw "-g -O2" while building. Did you see my traceback 
from this afternoon?

Ciao
Marcus

Re: [milter-greylist] Re: reproducible crashing

2016-11-18 by manu@...

Marcus Schopen lists-yahoogroups@... [milter-greylist]
<milter-greylist@yahoogroups.com> wrote:

> Yes, I think so, I saw "-g -O2" while building. Did you see my traceback
> from this afternoon?

Sorry, I missed it. Here we get the offending free() call. I will
investigate from this later today:

*** Error in `/usr/sbin/milter-greylist': double free or corruption '
(...)
#4  _int_free (av=<optimized out>, p=<optimized out>, have_lock=0) at
malloc.c:3840
(...)
#5  0x000000000041266c in acl_free_prop_string (ad=0x685528) at
acl.c:1847


-- 
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu@...

Re: reproducible crashing

2016-11-19 by manu@...

Marcus Schopen <lists@...> wrote:

> regarding to my todays post "weighting blacklists" I can reproducible
> crash milter-greylist 

Hello

Does this patch fixes it? If you can also test a rule with a regex
I am interested too, since the same bug was probably there too.

--- acl.c.orig  2016-11-19 05:58:14.000000000 +0100
+++ acl.c       2016-11-19 05:57:39.000000000 +0100
@@ -1880,9 +1880,9 @@
 void 
 acl_free_prop_string(ad)
        acl_data_t *ad;
 {
-       acl_free_string((void *)&ad->prop->upd_data);
+       acl_free_string((void *)ad->prop->upd_data);
        free(ad->prop->upd_data);
        free(ad->prop->upd_name);
        free(ad->prop);
 
@@ -1914,9 +1914,9 @@
 void 
 acl_free_prop_regex(ad)
        acl_data_t *ad;
 {
-       acl_free_regex((void *)&ad->prop->upd_data);
+       acl_free_regex((void *)ad->prop->upd_data);
        free(ad->prop->upd_data);
        free(ad->prop->upd_name);
        free(ad->prop);
 


-- 
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu@...

Re: [milter-greylist] Re: reproducible crashing

2016-11-19 by Marcus Schopen

Hi Emmanuel,

On 2016-11-19 06:01, manu@... [milter-greylist] wrote:
> Marcus Schopen <lists@...> wrote:
> 
>> regarding to my todays post "weighting blacklists" I can reproducible
>> crash milter-greylist
> 
> Hello
> 
> Does this patch fixes it? If you can also test a rule with a regex
> I am interested too, since the same bug was probably there too.

Thanks a lot for your time. I built a new package with your patch (btw: 
the patched lines are at different line numbers in my acl.c).

The milter still crashes, not after the first change of greylist.conf, 
but for some strange reasons after the third change.

Debug, greylist.conf and my patchfile attached.

Ciao
Marcus

Attachments

Re: [milter-greylist] Re: reproducible crashing [3 Attachments]

2016-11-19 by manu@...

Marcus Schopen lists-yahoogroups@... [milter-greylist]
<milter-greylist@yahoogroups.com> wrote:

> The milter still crashes, not after the first change of greylist.conf,
> but for some strange reasons after the third change.

Because you hit another different bug! That you for digging that out.

Proposedf fix:
https://ftp.espci.fr/shadow/manu/fstring.patch

-- 
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu@...

Re: [milter-greylist] Re: reproducible crashing

2016-11-20 by Marcus Schopen

Hi Emmanuel,

On 2016-11-20 00:54, manu@... [milter-greylist] wrote:
> Marcus Schopen lists-yahoogroups@... [milter-greylist]
> <milter-greylist@yahoogroups.com> wrote:
> 
>> The milter still crashes, not after the first change of greylist.conf,
>> but for some strange reasons after the third change.
> 
> Because you hit another different bug! That you for digging that out.
> 
> Proposedf fix:
> https://ftp.espci.fr/shadow/manu/fstring.patch

No crashes any more, tested for about two hours. :) Will you release a 
new version?

Is that rule set correct?
------
racl continue rset $bl_score=1
racl continue rset $bl_listname=" "
racl continue list "my_bl_1" set $bl_score+=3 set 
$bl_listname="%P{bl_listname}my_bl_1 "
racl continue list "my_bl_2" set $bl_score+=5 set 
$bl_listname="%P{bl_listname}my_bl_2 "
racl continue list "my_bl_3" set $bl_score+=3 set 
$bl_listname="%P{bl_listname}my_bl_3 "
racl "BL_DNSBL" blacklist $bl_score >= 3 msg "Bad reputation - %d [%i] 
listed on too many DNS blacklists:%P{bl_listname}(hit
%P{bl_score})" flushaddr
------

I need to use "rset" to reset the bl_score property variable for each 
new email, right?

And how to I set an empty quoted string (see $bl_listname=" ")?

Ciao
Marcus

Re: [milter-greylist] Re: reproducible crashing

2016-11-20 by manu@...

Marcus Schopen lists-yahoogroups@... [milter-greylist]
<milter-greylist@yahoogroups.com> wrote:

> No crashes any more, tested for about two hours. :) Will you release a
> new version?

Sure.

> Is that rule set correct?

Well, your usage is more advanced than mine :-)

> And how to I set an empty quoted string (see $bl_listname=" ")?

rset $bl_listname="" does not work?

-- 
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu@...

Re: [milter-greylist] Re: reproducible crashing

2016-11-20 by Marcus Schopen

Hi,

On 2016-11-20 17:15, manu@... [milter-greylist] wrote:
> Marcus Schopen lists-yahoogroups@... [milter-greylist]
> <milter-greylist@yahoogroups.com> wrote:
> 
>> No crashes any more, tested for about two hours. :) Will you release a
>> new version?
> 
> Sure.
> 
>> Is that rule set correct?
> 
> Well, your usage is more advanced than mine :-)

I saw some postfix configurations with weighting of black and whitelists 
and was looking for a similar easy way to do that with milter-greylist

postscreen_dnsbl_sites =
    dnsbl.inps.de*4
    zen.spamhaus.org*3
    list.dnswl.org=127.0.0.1*-3
    ....

>> And how to I set an empty quoted string (see $bl_listname=" ")?
> 
> rset $bl_listname="" does not work?

No, "unknown token """ line 156".

Ciao
Marcus

Re: [milter-greylist] Re: reproducible crashing

2016-11-21 by manu@...

Marcus Schopen lists-yahoogroups@... [milter-greylist]
<milter-greylist@yahoogroups.com> wrote:

> > rset $bl_listname="" does not work?
> No, "unknown token """ line 156".

That one could work - or to wreck many existing config.Tell me how it
behaves:

--- conf_lex.l.orig     2016-11-21 01:27:55.000000000 +0100
+++ conf_lex.l  2016-11-21 01:28:09.000000000 +0100
@@ -65,9 +65,9 @@
 command                [Cc][Oo][Mm][Aa][Nn][Dd]
 lazyaw         [Ll][Aa][Zz][Yy][Aa][Ww]
 all            [Aa][Ll][Ll]
 delay          -?[0-9]+[smhdw]?
-qstring                "\""([^"\n]|\\\")+"\""
+qstring                "\""([^"\n]|\\\")*"\""
 regex          "/"([^/\n]|\\"/")+"/"
 dumpfreq       [Dd][Uu][Mm][Pp][Ff][Rr][Ee][Qq]:?
 binddn         [Bb][Ii][Nn][Dd][Dd][Nn]
 bindpw         [Bb][Ii][Nn][Dd][Pp][Ww]

-- 
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu@...

Re: [milter-greylist] Re: reproducible crashing

2016-11-21 by Marcus Schopen

Hi Emmanuel!

On 2016-11-21 01:30, manu@... [milter-greylist] wrote:
> Marcus Schopen lists-yahoogroups@... [milter-greylist]
> <milter-greylist@yahoogroups.com> wrote:
> 
>> > rset $bl_listname="" does not work?
>> No, "unknown token """ line 156".
> 
> That one could work - or to wreck many existing config.Tell me how it
> behaves:

Thanks. In my case it's working with configurations of all my machines. 
:)

Ciao
Marcus

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.