Yahoo Groups archive

Milter-greylist

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

Thread

Cannot write dumpfile

Cannot write dumpfile

2006-12-10 by aNguyen

I have these errors.
Any one have seen this before?
Thanks!
;
Dec 10 02:17:57 milter-greylist: [ID 525239 mail.error] cannot write dumpfile "/var/milter-greylist/greylist.db-XXiSa4
EM": Bad file number
Dec 10 02:17:57 milter-greylist: [ID 525239 mail.error] cannot write dumpfile "/var/milter-greylist/greylist.db-XXiSa4
EM": Bad file number
Dec 10 02:17:57 sendmail[8374]: [ID 801593 mail.error] kBAAHtte008374: Milter (greylist): write(D) returned -1, expect
ed 105: Broken pipe
Dec 10 02:17:57 sendmail[8374]: [ID 801593 mail.info] kBAAHtte008374: Milter (greylist): to error state
Dec 10 02:17:57 sendmail[8374]: [ID 801593 mail.error] kBAAHtte008374: Milter (greylist): write(D) returned -1, expect

Re: [milter-greylist] Cannot write dumpfile

2006-12-11 by aNguyen

My milter-greylist ran fine for one hour then crashed after these errors.
This is a serious problem and I could not find any clue through google search so far...
Thanks!
Show quoted textHide quoted text
----- Original Message -----
From: aNguyen
Sent: Sunday, December 10, 2006 10:18 AM
Subject: [milter-greylist] Cannot write dumpfile

I have these errors.
Any one have seen this before?
Thanks!
Dec 10 02:17:57 milter-greylist: [ID 525239 mail.error] cannot write dumpfile "/var/milter-greylist/greylist.db-XXiSa4
EM": Bad file number
Dec 10 02:17:57 milter-greylist: [ID 525239 mail.error] cannot write dumpfile "/var/milter-greylist/greylist.db-XXiSa4
EM": Bad file number
Dec 10 02:17:57 sendmail[8374]: [ID 801593 mail.error] kBAAHtte008374: Milter (greylist): write(D) returned -1, expect
ed 105: Broken pipe
Dec 10 02:17:57 sendmail[8374]: [ID 801593 mail.info] kBAAHtte008374: Milter (greylist): to error state
Dec 10 02:17:57 sendmail[8374]: [ID 801593 mail.error] kBAAHtte008374: Milter (greylist): write(D) returned -1, expect

Re: [milter-greylist] Cannot write dumpfile

2006-12-11 by Joel Reicher

>   Dec 10 02:17:57  milter-greylist: [ID 525239 mail.error] cannot write dum=
> pfile "/var/milter-greylist/greylist.db-XXiSa4
>   EM": Bad file number
>   Dec 10 02:17:57  milter-greylist: [ID 525239 mail.error] cannot write 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.

Cheers,

	- Joel

Re: [milter-greylist] Cannot write dumpfile

2006-12-11 by manu@netbsd.org

Joel Reicher <joel@...> wrote:

> >   Dec 10 02:17:57  milter-greylist: [ID 525239 mail.error] cannot write dum=
> > pfile "/var/milter-greylist/greylist.db-XXiSa4
> >   EM": Bad file number
> >   Dec 10 02:17:57  milter-greylist: [ID 525239 mail.error] cannot write 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...

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

Re: [milter-greylist] Cannot write dumpfile

2006-12-11 by Oliver Fromme

manu@... wrote:
 > Joel Reicher wrote:
 > 
 > > >   Dec 10 02:17:57  milter-greylist: [ID 525239 mail.error] cannot write dum=
 > > > pfile "/var/milter-greylist/greylist.db-XXiSa4
 > > >   EM": Bad file number
 > > >   Dec 10 02:17:57  milter-greylist: [ID 525239 mail.error] cannot write 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.

Best regards
   Oliver

-- 
Oliver Fromme,  secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing
Dienstleistungen mit Schwerpunkt FreeBSD: http://www.secnetix.de/bsd
Any opinions expressed in this message may be personal to the author
and may not necessarily reflect the opinions of secnetix in any way.

(On the statement print "42 monkeys" + "1 snake":)  By the way,
both perl and Python get this wrong.  Perl gives 43 and Python
gives "42 monkeys1 snake", when the answer is clearly "41 monkeys
and 1 fat snake".        -- Jim Fulton

Re: [milter-greylist] Cannot write dumpfile

2006-12-11 by aNguyen

I think the problem is fixed. These errors do not show up and milter-greylist does not die ... yet (in 5 hours so far...)
I took over the system built by a previous sysadmin who left before I came in... It runs milter-greylist version 1.6 and it is started using this command:
/usr/local/bin/milter-greylist -u smmsp -p /var/milter-greylist/milter-greylist.sock;
These errors shows up after I upgraded to the latest version - 3.1.1
What I did was to start milter-greylist using the supplied rc-solaris scripts and it works fine now.
I had trouble compiling version 3.1.1 on the running box (solaris 8) so I compiled it fine on Solaris 10. It seems to run fine on Solaris 8 which only requires one missing lib.so file wich I copied from Solaris 10...
Thanks,
An Nguyen

Show quoted textHide quoted text
----- Original Message -----
Sent: Sunday, December 10, 2006 11:42 PM
Subject: Re: [milter-greylist] Cannot write dumpfile


manu@netbsd.org wrote:
> Joel Reicher wrote:
>
> > > Dec 10 02:17:57 milter-greylist: [ID 525239 mail.error] cannot write dum=
> > > pfile "/var/milter-greylist/greylist.db-XXiSa4
> > > EM": Bad file number
> > > Dec 10 02:17:57 milter-greylist: [ID 525239 mail.error] cannot write 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.

Best regards
Oliver

--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing
Dienstleistungen mit Schwerpunkt FreeBSD: http://www.secnetix.de/bsd
Any opinions expressed in this message may be personal to the author
and may not necessarily reflect the opinions of secnetix in any way.

(On the statement print "42 monkeys" + "1 snake":) By the way,
both perl and Python get this wrong. Perl gives 43 and Python
gives "42 monkeys1 snake", when the answer is clearly "41 monkeys
and 1 fat snake". -- Jim Fulton

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

Re: [milter-greylist] Cannot write dumpfile

2006-12-11 by Oliver Fromme

Joel Reicher wrote:
 > [...]
 > So the fdopen() is failing, but it's preceded by a mkstemp() that
 > succeeds.
 > 
 > What are the possible explanations for such a situation?

A libc that doesn't match the operating system.  :-)

If I read his latest mail correctly, he has linked the
program with a libc from Sol10 and is trying to run that
under Sol8.  I'm not surprised that such a setup breaks
in strange ways.

Best regards
   Oliver

-- 
Oliver Fromme,  secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing
Dienstleistungen mit Schwerpunkt FreeBSD: http://www.secnetix.de/bsd
Any opinions expressed in this message may be personal to the author
and may not necessarily reflect the opinions of secnetix in any way.

I suggested holding a "Python Object Oriented Programming Seminar",
but the acronym was unpopular.
        -- Joseph Strout

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.