Yahoo Groups archive

Milter-greylist

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

Message

Re: [milter-greylist] crash on db dump (FIX, MAYBE)

2007-09-04 by Jeff A. Earickson

On Mon, 3 Sep 2007, Matthieu Herrb wrote:

> Date: Mon, 03 Sep 2007 12:26:10 +0200
> From: Matthieu Herrb <matthieu.herrb@...>
> Reply-To: milter-greylist@yahoogroups.com
> To: milter-greylist@yahoogroups.com
> Subject: Re: [milter-greylist] crash on db dump (still)
> 
> manu@... wrote:
>> Jeff A. Earickson <jaearick@...> wrote:
>> 
>>> I now get this with 4.0b1:
>>>
>>>     cannot write dumpfile "/var/milter-greylist/greylist.db-XXn4aOmb":
>>>     Error 0
>> 
>> Hum... errno was not set after a failed fdopen? Any Solaris expert that
>> could explain what is going on?
>> 
> Sun has now released a "patch" for this issue. See 
> <http://developers.sun.com/solaris/articles/stdio_256.html> for details   and 
> possible solutions.
> -- 
> Matthieu Herrb

Matthieu,

Thank you, this webpage was most interesting reading.

Emmanuel,

I have reworked 4.0b1 per the "Programming Solutions" part of this
webpage.  Basically I added to "F" option to calls to fopen(), fdopen(),
and popen(), and a I surrounded the changes with "ifdef __sun" blocks.
Attached is my makepatch output of my changes.  I recompiled with gcc
4.2 and reinstalled and I am running this code at my site now.
I will see how it performs and write back.

I have a feature suggestion too.  It would be nice if one could send
a "kill" signal to milter-greylist (like HUP or SIGUSR1) to have the
process dump the greylist.db file.  Then the startup/shutdown script
could be modified so that the db file was dumped right before 
milter-greylist was shut down, eg:

   stop)
         # Stop daemons.
         echo "Dump greylist.db and shut down milter-greylist: ... \c"
 		/usr/bin/pkill -HUP milter greylist
         /usr/bin/pkill milter-greylist
         echo "done."

Jeff Earickson
Colby College

Attachments

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.