procmail
[Top] [All Lists]

Re: This tiny script causes a segmentation fault..

2004-08-12 13:57:57

MAILDIR=./
DEFAULT=$MAILDIR/default_box
LOGFILE=$MAILDIR/procmail.log

Btw, not that it matters much, but you are setting DEFAULT and
LOGFILE so that there will be double-slashes in the path.  (Double-
slashes are ignored -- treated as a single slash -- but I
thought I'd point that out.  I noticed it from reading the log
excerpts you provided that employed my INCLUDERC.)

Yes, I noticed that in the output too.  I was just using the original file as
Justin wrote it.

On a system running SuSE's SLES9, which has procmail 3.22, 
the first time the variables are dumped does show an overflow 
has occurred, but the segfault still occurs and the 2nd 
INCLUDERC is never reached.

Interestingly, if I rebuild the source RPM for procmail 3.22 
from SLES9 on an old RedHat 7.1 system, it doesn't segfault and 
shows an overflow both times like it ought to.  However, testing 
with the original file (i.e. without the INCLUDERC lines) does 
segfault as does procmail 3.14 and procmail 3.21 on that
same system (with either rc file).  The older procmail 
versions do NOT show that an overflow has occurred when they 
dump their variables.

Again, interesting.


I did go ahead and look into the C code a bit (procmail 3.22) 
and the segfault is happening inside the C library's realloc() 
call (called by frealloc() in procmail when it is called by 
elog(), which is invoked by the logqnl(buf2) call in 
conditions()).

I've attached the various logs.

BTW, the original problem I was seeing with messages with 
long To: lines failing was happening on a Solaris mail 
server, so the segfaults aren't linux-specific.

Anyway, I've just bumped up my LINEBUF to a much larger value 
so I should be okay for now.

Good.

Something else I noticed looking at the output from my rc that
you included: you are running procmail under the C-shell.
I don't think that's such a wunnerful idea.  I have no idea
if that is the key to invoking this problem when LINEBUF is
deficient; but humor me and stuff

   SHELL=/bin/sh

in up-top and see if you get the same results.  If the
shell is related, then I'd ask Justin Gombos the same thing.

It's not shell related.  For my normal procmail environment, I already set
SHELL=/bin/sh, but since I use tcsh as my interactive shell and was just
running this one rc file through procmail, it was getting that shell.
I just inserted a SHELL=/bin/sh on the first line of the rc file and it
still segfaults.



____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>