Package: courier-imap
Version: 3.0.8-4
Followup-For: Bug #294656

I saw these malloc: Input/output error messages in my syslog... I was
pretty worried because... er... malloc's not meant to return EIO. I did
some stracing to find what was going on, and found like the original
reporter that it was to do with IDLE (I'm also using Thunderbird).

I've done some digging in the code, looking for things that might log
mallocs, and found this in imapenhancedidle() in imap/imapd.c:1387:

if ((w=maildirwatch_alloc(current_mailbox)) == NULL)
{
                perror("malloc");
                return (-1);
}

Which is incredibly misleading, it's not doing a malloc at all! At the
very least this should be changed to say what's actually been attempted.

In maildirwatch_alloc() in maildir/maildirwatch.c:64, if you have FAM
support compiled in, failure of the FAMOpen function causes EIO to be
returned:

if (FAMOpen(&maildirwatch_currentfam->fc) < 0)
{
        errno=EIO;
        free(maildirwatch_currentfam);
        maildirwatch_currentfam=NULL;
}

Which is also incredibly misleading. It should at the very least log a
message about failing to connect to FAM, or perhaps just silently fall
back to normal maildir watching if so configured.

I note that I had to strace /all/ the imapds on a busy server to work
out which imapd was actually causing the error. Logging the PID might
be handy, but I'm not quite sure where that would be feasible.

These problems all seem to exist in CVS courier, as well as the version
in sarge.

Regards,
Rob

-- System Information:
Debian Release: 3.1
Architecture: i386 (i686)
Kernel: Linux 2.4.29-rc1-exec-shield-light1
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)

Versions of packages courier-imap depends on:
ii  courier-authdaemon          0.47-4       Courier Mail Server - Authenticati
ii  courier-base                0.47-4       Courier Mail Server - Base system
ii  libc6                       2.3.2.ds1-22 GNU C Library: Shared libraries an
ii  libfam0c102                 2.7.0-6      client library to control the FAM 
ii  libgdbm3                    1.8.3-2      GNU dbm database routines (runtime
ii  postfix [mail-transport-age 2.1.5-9      A high-performance mail transport 

-- debconf information excluded


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to