Yahoo Groups archive

Milter-greylist

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

Message

Re: [milter-greylist] Cannot write dumpfile

2006-12-11 by Joel Reicher

> manu@... wrote:
>  > Joel Reicher wrote:
>  > 
>  > > >   Dec 10 02:17:57  milter-greylist: [ID 525239 mail.error] cannot writ
> e dum=
>  > > > pfile "/var/milter-greylist/greylist.db-XXiSa4
>  > > >   EM": Bad file number
>  > > >   Dec 10 02:17:57  milter-greylist: [ID 525239 mail.error] cannot writ
> e dum=
>  > > > pfile "/var/milter-greylist/greylist.db-XXiSa4
>  > > >   EM": Bad file number
>  > > 
>  > > Did this message really appear twice? I'm guessing, but perhaps you're
>  > > seeing a threading problem. I doubt it's healthy for more than one
>  > > thread to use the same tempfile name. Perhaps you had three threads
>  > > generate the same name, and when one of them closed the file descriptor
>  > > you got this message from the other two.
>  > 
>  > Same message ID but different thread? It looks odd...
> 
> It could simply be a configuration issue with his syslog.
> In fact it's pretty easy to mess up the config so you get
> duplicate messages to the same file.  I don't think it's
> related to the actual problem.

You might be right, but the problem seems very strange to me.

I assume the OP is using the latest stable release, and that
code reads

        if ((dumpfd = mkstemp(newdumpfile)) == -1) {
                mg_log(LOG_ERR, "mkstemp(\"%s\") failed: %s",
                    newdumpfile, strerror(errno));
                exit(EX_OSERR);
        }

        if ((dump = fdopen(dumpfd, "w")) == NULL) {
                mg_log(LOG_ERR, "cannot write dumpfile \"%s\": %s",
                    newdumpfile, strerror(errno));
                exit(EX_OSERR);
        }

So the fdopen() is failing, but it's preceded by a mkstemp() that
succeeds.

What are the possible explanations for such a situation?

Cheers,

	- Joel

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.