Re: [Dovecot] 1.2.6 Spurious pread()/stream errors/index corruption
OK I'm still getting the same errors, so just as a test I tried the same process on an x86_32 build host, it's binaries now give a different error, one which I have also seen mentioned before I think:
banshee-x86-32 / # /NOC4/dovecot/sbin/dovecot -F Error: Missing auth section for server default Fatal: Invalid configuration in /NOC4/etc/dovecot/dovecot.conf
I do notice this though, with x86_64 binaries strace shows calls to pread() with x86_32 binaries strace shows calls to pread64()
this looks round the wrong way? hmm
in both builds file offset bits is 64, with config.h:
---- config.h check... /* Define to 1 if you have the `pread' function. */ /* Defint if pread/pwrite implementation is broken */ #define PREAD_BROKEN 1 /* Define if pread/pwrite needs _XOPEN_SOURCE 500 */
On Thu, 15 Oct 2009 15:33:47 -0400, Timo Sirainen tss@iki.fi wrote:
On Thu, 2009-10-15 at 20:30 +0100, Paul Freeman wrote:
banshee-x86-64 dovecot-1.2.6 # grep -i pread config.h /* Define to 1 if you have the `pread' function. */ /* #undef HAVE_PREAD */ /* Defint if pread/pwrite implementation is broken */ /* #undef PREAD_BROKEN */ /* Define if pread/pwrite needs _XOPEN_SOURCE 500 */ #define PREAD_WRAPPERS /**/
i'll give PREAD_BROKEN a try now
And remove PREAD_WRAPPERS if that doesn't work. It shouldn't matter though.
On Thu, 2009-10-15 at 21:08 +0100, Paul Freeman wrote:
in both builds file offset bits is 64, with config.h:
---- config.h check... /* Define to 1 if you have the `pread' function. */ /* Defint if pread/pwrite implementation is broken */ #define PREAD_BROKEN 1 /* Define if pread/pwrite needs _XOPEN_SOURCE 500 */
This is with Linux defaults: ~/cvs/dovecot-1.2% grep PREAD config.h #define HAVE_PREAD 1 /* #undef PREAD_BROKEN */ #define PREAD_WRAPPERS /**/ ~/cvs/dovecot-1.2/src/master% nm dovecot|grep pread 080685a0 T my_pread U pread64@@GLIBC_2.1 This is with pread() disabled: ~/cvs/dovecot-1.2/% grep PREAD config.h //#define HAVE_PREAD 1 #define PREAD_BROKEN //#define PREAD_WRAPPERS /**/ ~/cvs/dovecot-1.2/src/master% nm dovecot|grep pread 0806ade0 T my_pread Note how there's no pread64@@GLIBC_2.1 symbol at all. What about in your binaries?
#define HAVE_PREAD 1
/* #undef PREAD_BROKEN */
#define PREAD_WRAPPERS /**/
nm dovecot|grep pread
U my_pread@@libmysqlclient_16
//#define HAVE_PREAD 1
#define PREAD_BROKEN
//#define PREAD_WRAPPERS
nm dovecot|grep pread
U my_pread@@libmysqlclient_16
On Thu, 15 Oct 2009 18:02:02 -0400, Timo Sirainen
On Thu, 2009-10-15 at 21:08 +0100, Paul Freeman wrote:
in both builds file offset bits is 64, with config.h:
---- config.h check... /* Define to 1 if you have the `pread' function. */ /* Defint if pread/pwrite implementation is broken */ #define PREAD_BROKEN 1 /* Define if pread/pwrite needs _XOPEN_SOURCE 500 */
This is with Linux defaults:
~/cvs/dovecot-1.2% grep PREAD config.h #define HAVE_PREAD 1 /* #undef PREAD_BROKEN */ #define PREAD_WRAPPERS /**/
~/cvs/dovecot-1.2/src/master% nm dovecot|grep pread 080685a0 T my_pread U pread64@@GLIBC_2.1
This is with pread() disabled:
~/cvs/dovecot-1.2/% grep PREAD config.h //#define HAVE_PREAD 1 #define PREAD_BROKEN //#define PREAD_WRAPPERS /**/
~/cvs/dovecot-1.2/src/master% nm dovecot|grep pread 0806ade0 T my_pread
Note how there's no pread64@@GLIBC_2.1 symbol at all. What about in your binaries?
On Thu, 2009-10-15 at 23:45 +0100, Paul Freeman wrote:
//#define HAVE_PREAD 1 #define PREAD_BROKEN //#define PREAD_WRAPPERS
nm dovecot|grep pread U my_pread@@libmysqlclient_16
Oh! libmysqlclient messes this up. Why is your dovecot binary (and other binaries) linked against libmysqlclient? That's not normal. I did fix this in v2.0 though, the patch probably applies to v1.2 too: http://hg.dovecot.org/dovecot-2.0/rev/910059d94bbc
Great I'm not going MAD! :) I'll get to work!
On Thu, 15 Oct 2009 18:59:50 -0400, Timo Sirainen
On Thu, 2009-10-15 at 23:45 +0100, Paul Freeman wrote:
//#define HAVE_PREAD 1 #define PREAD_BROKEN //#define PREAD_WRAPPERS
nm dovecot|grep pread U my_pread@@libmysqlclient_16
Oh! libmysqlclient messes this up. Why is your dovecot binary (and other binaries) linked against libmysqlclient? That's not normal.
I did fix this in v2.0 though, the patch probably applies to v1.2 too: http://hg.dovecot.org/dovecot-2.0/rev/910059d94bbc
after ensuring that the main dovecot binaries were not linked against
mysqlclient and applying
this patch from 2.0: http://hg.dovecot.org/dovecot-2.0/rev/910059d94bbc
all problems were fixed in 32 & 64bit x86 linux
On Thu, 15 Oct 2009 18:59:50 -0400, Timo Sirainen
On Thu, 2009-10-15 at 23:45 +0100, Paul Freeman wrote:
//#define HAVE_PREAD 1 #define PREAD_BROKEN //#define PREAD_WRAPPERS
nm dovecot|grep pread U my_pread@@libmysqlclient_16
Oh! libmysqlclient messes this up. Why is your dovecot binary (and other binaries) linked against libmysqlclient? That's not normal.
I did fix this in v2.0 though, the patch probably applies to v1.2 too: http://hg.dovecot.org/dovecot-2.0/rev/910059d94bbc
participants (2)
-
Paul Freeman
-
Timo Sirainen