FAM causes courier-imap to hang

Bug #6996 reported by Debian Bug Importer
This bug report is a duplicate of:  Bug #6903: courier-imap: CLOSE failed. Edit Remove
4
Affects Status Importance Assigned to Milestone
courier (Debian)
Fix Released
Unknown
courier (Ubuntu)
Invalid
Medium
Unassigned
Nominated for Intrepid by Murilo Rabelo

Bug Description

Automatically imported from Debian bug report #258445 http://bugs.debian.org/258445

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-Id: <email address hidden>
Date: Fri, 09 Jul 2004 14:21:56 -0400
From: Stephen Touset <email address hidden>
To: Debian Bug Tracking System <email address hidden>
Subject: FAM causes courier-imap to hang

Package: courier-imap
Version: 3.0.3-1
Severity: important

I'm not quite sure whether or not to file this bug against FAM or
against courier-imap, but here goes.

When I first installed courier-imap, I started getting log messages
saying to install FAM. So I did. However, it seems that after a few
hours, courier-imap starts to hang. Any time a request would be sent to
the IMAP server, responses would never come. I traced the problem back
to FAM--when I restart FAM, courier-imap starts working again. However,
I now have to do this every few hours.

This could be a problem with FAM not responding to requests, but it's
probably also a bug with courier-imap in that it doesn't time out
the request after a reasonably short period of time (3-5 seconds max).

-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.6-1-686
Locale: LANG=C, LC_CTYPE=C

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

-- debconf information:
  courier-imap/moveconfig: true

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-Id: <email address hidden>
Date: Sat, 10 Jul 2004 14:59:56 +0200
From: Stefan Hornburg <email address hidden>
To: <email address hidden>

severity 258445 serious
merge 253304 258445
thanks

--
LinuXia Systems => http://www.linuxia.de/
Expert Interchange Consulting and System Administration
ICDEVGROUP => http://www.icdevgroup.org/
Interchange Development Team

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Marking as duplicate based on debbugs merge (253304,258445)

This bug has been marked as a duplicate of bug 6903.

Revision history for this message
Debian Bug Importer (debzilla) wrote :
Download full text (6.5 KiB)

Message-Id: <email address hidden>
Date: Sun, 11 Jul 2004 12:35:48 +0200
From: Stefan Hornburg <email address hidden>
To: <email address hidden>, <email address hidden>, <email address hidden>,
 <email address hidden>, <email address hidden>, <email address hidden>
Cc: <email address hidden>, <email address hidden>
Subject: Courier Debian Packaging Problem (IMAP + FAM)

--Multipart=_Sun__11_Jul_2004_12_35_48_+0200_o6OBYd=gyCWXBfy5
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

Hello,

I need your help and advice for the courier packaging problem described
below. Please read on.

Situation:
Courier can be compiled with or without FAM support. If FAM support is
included but FAM isn't running, this message is repeatedly written to
syslog:

Jul 10 23:31:44 turtle imaplogin: Failed to create cache file: maildirwatch (<email address hidden>)
Jul 10 23:31:44 turtle imaplogin: Error: Input/output error
Jul 10 23:31:44 turtle imaplogin: Check for proper operation and configuration
Jul 10 23:31:44 turtle imaplogin: of the File Access Monitor daemon (famd).

This is fine for source builds, but leads to problems for packagers.
Either we need to depend on the FAM daemon package or logs get filled
with the messages above. Both scenarios doesn't have a great appeal to me
(see also Debian bugs #191007, #204405, #206626, #238990, #242837
for reference).

Steve Langasek was so kind to write a patch to cope with this situation,
but unfortunately this patch leads to memory corruption like that:

Program received signal SIGSEGV, Segmentation fault.
0x400d2219 in malloc () from /lib/libc.so.6
(gdb) backtrace
#0 0x400d2219 in malloc () from /lib/libc.so.6
#1 0x400d2074 in malloc () from /lib/libc.so.6
#2 0x0806cd0a in maildir_info_imap_find (info=0xbfffb2ac, path=0x81872e0 "INBOX.Trash",
    myId=0xbffffebe "<email address hidden>") at maildirinfo.c:179
#3 0x0804d02b in decode_valid_mailbox (p=0x81872e0 "INBOX.Trash", autosubscribe=1) at imapd.c:327
#4 0x0804d651 in parse_mailbox_error (tag=0xbfffb5b8 "19", curtoken=0x8182780, ok_hierarchy=0,
    autosubscribe=1) at imapd.c:572
#5 0x080538d2 in do_imap_command (tag=0xbfffb5b8 "19") at imapd.c:4773
#6 0x0805eae3 in mainloop () at mainloop.c:93
#7 0x08056516 in main (argc=2, argv=0xbffff6a4) at imapd.c:6354

See Debian bugs #253304, #254731, #255069, #256460, #257006, #258445 for reference.

Solution:

1. Resolve the memory corruption in the patch (see attachment). If you want to
   compile for debugging with the debian/rules file,
   change CFLAGS=-lcrypt to LDFLAGS=-lcrypt and uncomment dh_strip

2. New scenario to solve the problem:

   * test whether FAM is available in the courier-imap init script
  and set an environment variable accordingly (like FAMIGNORE)

   * change the source code to test this environment variable and
  skip FAM access if environment variable if set

Any advice or further help would be appreciated immensely.

With regards
 Racke

--
LinuXia Systems => http://www.linuxia.de/
Expert Interchange Consulting and System Administration
ICDEVGROUP => http://www.icdevgroup.org/
Interchange Development Team

--Multipart=_Sun__11_...

Read more...

Revision history for this message
Debian Bug Importer (debzilla) wrote :
Download full text (7.3 KiB)

Message-Id: <email address hidden>
Date: Mon, 12 Jul 2004 10:32:07 -0400
From: Stefan Hornburg (Racke) <email address hidden>
To: <email address hidden>
Subject: Bug#253304: fixed in courier 0.45.6-1

Source: courier
Source-Version: 0.45.6-1

We believe that the bug you reported is fixed in the latest version of
courier, which is due to be installed in the Debian FTP archive:

courier-authdaemon_0.45.6-1_i386.deb
  to pool/main/c/courier/courier-authdaemon_0.45.6-1_i386.deb
courier-authmysql_0.45.6-1_i386.deb
  to pool/main/c/courier/courier-authmysql_0.45.6-1_i386.deb
courier-authpostgresql_0.45.6-1_i386.deb
  to pool/main/c/courier/courier-authpostgresql_0.45.6-1_i386.deb
courier-base_0.45.6-1_i386.deb
  to pool/main/c/courier/courier-base_0.45.6-1_i386.deb
courier-doc_0.45.6-1_all.deb
  to pool/main/c/courier/courier-doc_0.45.6-1_all.deb
courier-faxmail_0.45.6-1_i386.deb
  to pool/main/c/courier/courier-faxmail_0.45.6-1_i386.deb
courier-imap-ssl_3.0.5-1_i386.deb
  to pool/main/c/courier/courier-imap-ssl_3.0.5-1_i386.deb
courier-imap_3.0.5-1_i386.deb
  to pool/main/c/courier/courier-imap_3.0.5-1_i386.deb
courier-ldap_0.45.6-1_i386.deb
  to pool/main/c/courier/courier-ldap_0.45.6-1_i386.deb
courier-maildrop_0.45.6-1_i386.deb
  to pool/main/c/courier/courier-maildrop_0.45.6-1_i386.deb
courier-mlm_0.45.6-1_i386.deb
  to pool/main/c/courier/courier-mlm_0.45.6-1_i386.deb
courier-mta-ssl_0.45.6-1_i386.deb
  to pool/main/c/courier/courier-mta-ssl_0.45.6-1_i386.deb
courier-mta_0.45.6-1_i386.deb
  to pool/main/c/courier/courier-mta_0.45.6-1_i386.deb
courier-pcp_0.45.6-1_i386.deb
  to pool/main/c/courier/courier-pcp_0.45.6-1_i386.deb
courier-pop-ssl_0.45.6-1_i386.deb
  to pool/main/c/courier/courier-pop-ssl_0.45.6-1_i386.deb
courier-pop_0.45.6-1_i386.deb
  to pool/main/c/courier/courier-pop_0.45.6-1_i386.deb
courier-ssl_0.45.6-1_i386.deb
  to pool/main/c/courier/courier-ssl_0.45.6-1_i386.deb
courier-webadmin_0.45.6-1_i386.deb
  to pool/main/c/courier/courier-webadmin_0.45.6-1_i386.deb
courier_0.45.6-1.diff.gz
  to pool/main/c/courier/courier_0.45.6-1.diff.gz
courier_0.45.6-1.dsc
  to pool/main/c/courier/courier_0.45.6-1.dsc
courier_0.45.6.orig.tar.gz
  to pool/main/c/courier/courier_0.45.6.orig.tar.gz
sqwebmail_0.45.6-1_i386.deb
  to pool/main/c/courier/sqwebmail_0.45.6-1_i386.deb

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to <email address hidden>,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Stefan Hornburg (Racke) <email address hidden> (supplier of updated courier package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing <email address hidden>)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Mon, 12 Jul 2004 00:14:44 +0200
Source: courier
Binary: courier-authpostgresql courier-ldap courier-faxmail courier-pcp courier-authmysql courier-imap courier-authdaemon courier-base sqwebmail courier-ssl cour...

Read more...

Changed in courier:
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.