|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
From: Wietse Venema (wietse
porcupine.org)
Date: Tue Mar 06 2007 - 10:26:09 CST
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Justin McAleer:
> Wietse Venema wrote:
> > Ralph Seichter:
> >
> >> Wietse Venema wrote:
> >>
> >>
> >>> As far as I know, postdrop copies stdin to queue file without any
> >>> need for seeking.
> >>>
> >>> It is possible that a buggy file system mis-reports file size errors
> >>> as seek errors.
> >>>
> >>> What file system is this?
> >>>
> >> ReiserFS, on a SuSE Linux 10 machine with Kernel 2.6.13-15.13-default.
> >>
> >
> > No surprise here. Reiserfs has a history of mis-reporting errors.
> >
> > Wietse
> >
> >
> It does the same thing on EXT3:
>
> Mar 6 09:03:36 pfmx0 postfix/postdrop[3768]: warning: uid=0: Illegal seek
> Mar 6 04:03:36 pfmx0 postfix/sendmail[3766]: fatal: root(0): queue file
> write error
As does Solaris.
The plot thickens. This is a postdrop trace:
...
869: write(5, " T11 1 1 7 3 1 9 5 8 8 5".., 4096) = 10
869: write(5, " 8 5 1 9 9 0 8 1 A15 r".., 4086) Err#27 EFBIG
869: Received signal #31, SIGXFSZ [ignored]
869: read(0, " N 5\t : c m = \ E [ % i".., 4096) = 4096
869: read(0, " : a l = 4 0 ~ ^ Z : a m".., 4096) = 4096
...
869: read(0, " A | a m i g a | A m i g".., 4096) = 4096
869: read(0, " 4 ~ : k 5 = \ E [ 1 5 ~".., 4096) = 307
869: lseek(0, 0, SEEK_END) Err#29 ESPIPE
869: close(5) = 0
The ESPIPE error clobbers the EFBIG one.
The seek was introduced with Postfix 2.3 Milter support (skip over
records that Milter clients added after "end" record).
Attached is a workaround.
Wietse
*** ./src/postdrop/postdrop.c- Fri Feb 23 19:24:03 2007
--- ./src/postdrop/postdrop.c Tue Mar 6 11:24:07 2007
***************
*** 229,234 ****
--- 229,235 ----
const char *errstr;
char *junk;
struct timeval start;
+ int saved_errno;
/*
* Be consistent with file permissions.
***************
*** 427,435 ****
--- 428,438 ----
continue;
}
if (REC_PUT_BUF(dst->stream, rec_type, buf) < 0) {
+ saved_errno = errno;
while ((rec_type = rec_get(VSTREAM_IN, buf, var_line_limit)) > 0
&& rec_type != REC_TYPE_END)
/* void */ ;
+ errno = saved_errno;
break;
}
if (rec_type == REC_TYPE_END)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]