[Dovecot] another Dovecot problem
Hi All--
First, thanks to Timo for solving my last issue. I got dovecot up and running on one of my machines, and it does exactly what I want. Now I'm trying to install dovecot on an older box (glibc 2.0.7 Linux kernel 2.0.36), and encountering some problems:
-- firstly autoconf/automake does not seem to correctly deal with the madvise function on this system. It detects that we don't have madvise, yet it's prototyped in /usr/include/sys/mman.h. This causes the compilation to fail when dovecot tries to redefine this function.
-- I attempted to solve this problem by renaming the function dovecot prototypes to dc_madvise and then changed all the calls in the code (and the implementation) from madvise to dc_madvise. This allows the code to compile correctly.
-- However, once the server is installed, it does not appear to work correctly. I can login, but when I try to list my folders or select any folder (one that exists or one that doesn't exist) the connection times out and the following entry is written to the log file:
dovecot: Oct 03 05:38:56 Error: login: received another "not listening" notification (if you can't login at all, see src/lib/fdpass.c)
I tracked this message down in the source, but didn't see any obvious way to trace back the problem.
Does anyone have experience building on this older configuration (the glibc is a Red Hat version, if it makes any difference)? Any ideas on what might be causing this issue?
Best, Tim Miller
On Thu, 2003-10-02 at 20:57, Tim Miller wrote:
First, thanks to Timo for solving my last issue. I got dovecot up and running on one of my machines, and it does exactly what I want. Now I'm trying to install dovecot on an older box (glibc 2.0.7 Linux kernel 2.0.36), and encountering some problems:
-- firstly autoconf/automake does not seem to correctly deal with the madvise function on this system. It detects that we don't have madvise, yet it's prototyped in /usr/include/sys/mman.h. This causes the compilation to fail when dovecot tries to redefine this function.
-- I attempted to solve this problem by renaming the function dovecot prototypes to dc_madvise and then changed all the calls in the code (and the implementation) from madvise to dc_madvise. This allows the code to compile correctly.
Well, I fixed it in a bit easier way :) diff -u -r1.4 -r1.5 --- mmap-util.h 28 Oct 2002 09:00:25 -0000 1.4 +++ mmap-util.h 3 Oct 2003 14:50:48 -0000 1.5 @@ -15,7 +15,8 @@ #endif #ifndef HAVE_MADVISE -int madvise(void *start, size_t length, int advice); +# define madvise my_madvise +int my_madvise(void *start, size_t length, int advice); # ifndef MADV_NORMAL # define MADV_NORMAL 0 # define MADV_RANDOM 0
-- However, once the server is installed, it does not appear to work correctly. I can login, but when I try to list my folders or select any folder (one that exists or one that doesn't exist) the connection times out and the following entry is written to the log file:
dovecot: Oct 03 05:38:56 Error: login: received another "not listening" notification (if you can't login at all, see src/lib/fdpass.c)
I tracked this message down in the source, but didn't see any obvious way to trace back the problem.
Linux 2.0.x kernels requires changes in the source to work. I didn't think anyone would really bother trying Dovecot with 2.0 kernels anymore so there was only a comment about it there. Apply the included patch and compile with -DLINUX20 and it should work.
On Fri, 3 Oct 2003, Timo Sirainen wrote:
-- However, once the server is installed, it does not appear to work correctly. I can login, but when I try to list my folders or select any folder (one that exists or one that doesn't exist) the connection times out and the following entry is written to the log file:
dovecot: Oct 03 05:38:56 Error: login: received another "not listening" notification (if you can't login at all, see src/lib/fdpass.c)
I tracked this message down in the source, but didn't see any obvious way to trace back the problem.
Linux 2.0.x kernels requires changes in the source to work. I didn't think anyone would really bother trying Dovecot with 2.0 kernels anymore so there was only a comment about it there. Apply the included patch and compile with -DLINUX20 and it should work.
Hi Timo,
I can't seem to apply your patch -- doing patch -p1 < fdpass.patch tells me it can't find input file on line 15. Looking at the diff, I think your line numbers are off (at least they don't seem to quite match the ones in my fdpass.c) -- I've tried this both on the dovecot-0.99.10 available on the web site and the version checked out of CVS.
I could hack the source myself, but I want to make sure I don't break something else.
Thanks again for all your help with this.
Best, Tim
On Fri, 2003-10-03 at 20:15, Tim Miller wrote:
I can't seem to apply your patch -- doing patch -p1 < fdpass.patch tells me it can't find input file on line 15.
It'd be patch -p0 this time.. :) I'll try to keep the -p0 format from now on.
Looking at the diff, I think your line numbers are off (at least they don't seem to quite match the ones in my fdpass.c)
That itself doesn't really matter. patch is able to fix the line numbers.
-- I've tried this both on the dovecot-0.99.10 available on the web site and the version checked out of CVS.
The patch is already committed to CVS.
On Fri, 3 Oct 2003, Timo Sirainen wrote:
On Fri, 2003-10-03 at 20:15, Tim Miller wrote:
I can't seem to apply your patch -- doing patch -p1 < fdpass.patch tells me it can't find input file on line 15.
It'd be patch -p0 this time.. :) I'll try to keep the -p0 format from now on.
Thanks -- I feel really silly now. Unfortunately, something still seems to be amiss. I compile dovecot with the patch, but the server refuses to start with:
dovecot: Oct 04 07:37:01 Info: Dovecot starting up dovecot: Oct 04 07:37:03 Error: login: Authentication process 0 doesn't exist dovecot: Oct 04 07:37:03 Fatal: fcntl(F_GETFD, 0) failed: Bad file descriptor imap-login: Oct 04 07:37:03 Fatal: Master sent reply with unknown tag 0 imap-login: Oct 04 07:37:03 Warning: Error sending handshake to auth process: Broken pipe imap-login: Oct 04 07:37:03 Fatal: fd_send(-1) failed: Broken pipe
This is from the Website version with the patch applied. I doubt it would help, but I'd like to try the CVS version (with all the patches), but it doesn't appear to have a configure or install.sh script when I check it out of the CVS. Shall I use these scripts from the released version, or is there another way to build the CVS version?
Thanks again for all the help with this.
Best, Tim
On Fri, 2003-10-03 at 22:52, Tim Miller wrote:
dovecot: Oct 04 07:37:03 Error: login: Authentication process 0 doesn't exist dovecot: Oct 04 07:37:03 Fatal: fcntl(F_GETFD, 0) failed: Bad file descriptor
Some fd_close_on_exec(0, ..) call failed. I checked them all through, I can't think of a reason why it should ever return "bad file descriptor".
Maybe it's some glibc/linux 2.0 bugginess..
You could try commenting those fd_close_on_exec calls from src/master/*.c and seeing which one does it.
imap-login: Oct 04 07:37:03 Fatal: Master sent reply with unknown tag 0
Maybe related to above but can't be sure. Shouldn't really happen.
This is from the Website version with the patch applied. I doubt it would help, but I'd like to try the CVS version (with all the patches), but it doesn't appear to have a configure or install.sh script when I check it out of the CVS. Shall I use these scripts from the released version, or is there another way to build the CVS version?
Run autogen.sh first.
participants (2)
-
Tim Miller
-
Timo Sirainen