[Mimedefang] MIME::Parser: can't open tmpfile

Juergen Georgi georgi at belwue.de
Fri Feb 6 11:35:58 EST 2004


On Tue 2004-02-03 (12:06), David F. Skoll wrote:
> On Tue, 3 Feb 2004, Juergen Georgi wrote:
> 
> > What baffles me is that three servers with the same software
> > installation and identical filter rules behave differently:
> > One is ok and two are not.
> 
> Something must be different.  Kernel limits on open files?
> Some difference in C library "tmpfile" or "tmpnam" routines?

I'm coming back with some more data. Beside the MIME::Parser
messages there are additional errors logged only on the "bad"
servers:

mimedefang-multiplexor: Slave 5 stderr: cannot write to 
/var/spool/spamassassin/bayes_journal, Bayes db update ignored

The next difference is the size of the bayes_* db files: 
around 40/20 MB (seen/toks) on the "good" server, and 20/85 MB
on the "bad" ones. I recall that I once created the bayes db
from scratch on one of the machines. The big db filess were 
carried over from old SA versions - so maybe they were broken.

Then I did some process tracing of dying mimedefang slaves.
The bayes_journal write erros looked like this

  open64("/var/spool/spamassassin/bayes_journal", O_WRONLY|O_APPEND|O_CREAT, 0666) = 258
  close(258)                                      = 0
  write(2, " c a n n o t   w r i t e".., 79)      = 79

and the MIME::Parser errors just before exitus:

  open64("/var/tmp/ywkVayE3", O_RDWR|O_CREAT|O_EXCL, 0600) = 256
  unlink("/var/tmp/ywkVayE3")                     = 0
  umask(0777)                                     = 077
  umask(077)                                      = 0777
  fchmod(256, 0600)                               = 0
  close(256)                                      = 0
  getcontext(0xFFBEF410)
  write(2, " M I M E : : P a r s e r".., 51)      = 51
  getcontext(0xFFBEF5A8)
  setcontext(0xFFBEF5A8)
  getcontext(0xFFBEF6D8)
  getcontext(0xFFBEF6D8)
  getcontext(0xFFBEF730)
  getcontext(0xFFBEF5D0)
  getcontext(0xFFBEF5D0)
  llseek(0, 0, SEEK_CUR)                          Err#29 ESPIPE
  llseek(255, 0xFFFFFFFFFFFFFD65, SEEK_CUR)       = 803
  _exit(22)

Hmm. All errors happened when the FD numbers where hitting the
256 ceiling. On the good server, the FD number never grew this 
large.

I copied the bayes db files from the good server over to the bad 
ones and - guess what? - the error log messages disappeared. 
It seems that the overly large bayes db files mande MD/SA 
consume more file descriptors. 

But: there is a "ulimit -n 1024" in my mimedefang start script,
so there should be no shortage of file descriptors. Btw,
"mimedefang -C" didn't help either. I'm afraid that my Perl 
installation is broken.

And: why is MD/SA using /var/tmp for creating temp files?
How can I change this to /tmp, which is memory mapped?
Setting TMPDIR has no effect.

Apologizing for the long posting.

Regards,

-Juergen



More information about the MIMEDefang mailing list