Hello!

We're using (locally compiled) imapd and the mailutil that comes with it on
several Red Hat Advanced Server 2.1 systems.  These systems serve thousands
of IMAP mail accounts, using mbx format folders.  We have several local
scripts that depend on mailutil.  In particular, we use mailutil when we
shuffle users between imap hosts, to balance the load on our systems.

I recently had mailutil from the imap-2002e distribution segfault when
doing a move for two separate folders, both owned by the same user.  I've
tried the move with the 2002e version on both RH AS 2.1 and on my Tru64
UNIX 5.1b workstation, and I've also tried the move on RH AS 2.1 with
the 2004a mailutil.  In all cases, mailutil coredumps in the same place.

Here's a little example:

$pwd
/local/src/RPM/BUILD/imap-2004a/mailutil
$ls -al ~/folders/
total 838
drwx------    2 mooney   sysadmin     1024 Aug 30 19:28 ./
drwxr-x---   15 mooney   sysadmin     1024 Aug 30 19:26 ../
-rw-------    1 mooney   sysadmin   370479 Aug 27 15:36 MiscSaved
-rw-------    1 mooney   sysadmin   479202 Aug 27 14:50 auser
$file  ~/folders/*
/home/mooney/folders/MiscSaved: MBX mail folder
/home/mooney/folders/auser:     MBX mail folder
$./mailutil check folders/MiscSaved
No new messages, 46 total in folders/MiscSaved
$./mailutil check folders/auser
No new messages, 127 total in folders/auser


$gdb mailutil GNU gdb Red Hat Linux (5.3.90-0.20030710.41.2.1rh) Copyright 2003 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-redhat-linux"...Using host libthread_db library "/lib/libthread_db.so.1".

(gdb) set args move folders/MiscSaved MiscSaved
(gdb) run
Starting program: /usr/local/src/RPM/BUILD/imap-2004a/mailutil/mailutil
move folders/MiscSaved MiscSaved

Program received signal SIGSEGV, Segmentation fault.
0x0804ce2d in mm_append (stream=0x8115790, data=0xbffeaa90,
flags=0xbffe98f0,
     date=0xbffe98f4, message=0xbffe98f8) at mailutil.c:488
488           if ((MAILTMPLEN - ((t += strlen (t)) - tmp)) > (long)
(gdb) where
#0  0x0804ce2d in mm_append (stream=0x8115790, data=0xbffeaa90,
     flags=0xbffe98f0, date=0xbffe98f4, message=0xbffe98f8) at
mailutil.c:488
#1  0x0808db7e in mbx_append (stream=0x0, mailbox=0xbffed8f8 "MiscSaved",
     af=0x804cc7c <mm_append>, data=0xbffeaa90) at mbx.c:1074
#2  0x0805e594 in mail_append_multiple (stream=0x0,
     mailbox=0xbffed8f8 "MiscSaved", af=0x804cc7c <mm_append>,
data=0xbffeaa90)
     at mail.c:2486
#3  0x0804cb66 in mbxcopy (source=0x80f3a48, dest=0x0,
     dst=0xbffed8f8 "MiscSaved", create=1, del=1, mode=0) at mailutil.c:435
#4  0x0804c076 in main (argc=4, argv=0xbffeb7d4) at mailutil.c:245

(gdb) print u
$1 = 0
(gdb) print elt
$2 = (MESSAGECACHE *) 0x8115100
(gdb) print *elt
$3 = {msgno = 32, lockcount = 1, rfc822_size = 2593, private = {uid = 33,
     special = {offset = 328743, text = {data = 0x0, size = 55}}, msg = {
       env = 0x0, body = 0x0, full = {offset = 0, text = {data = 0x0,
           size = 0}}, lines = 0x0, header = {offset = 0, text = {data =
0x0,
           size = 0}}, text = {offset = 0, text = {data = 0x0, size = 0}}},
     sequence = 0, dirty = 0, filter = 0, data = 0}, day = 4, month = 2,
   year = 33, hours = 8, minutes = 14, seconds = 57, zoccident = 1, zhours
= 6,
   zminutes = 0, seen = 1, deleted = 0, flagged = 0, answered = 0, draft =
0,
   recent = 0, valid = 1, searched = 0, sequence = 1, spare = 0, spare2 =
0,
   spare3 = 0, spare4 = 0, spare5 = 0, spare6 = 0, spare7 = 0, spare8 = 0,
   sparep = 0x0, user_flags = 1}
(gdb)
(gdb) print t
$4 = 0xbffe9486 ""
(gdb) print tmp
$5 = " \\Seen", '\0' <repeats 1017 times>



The other core dump, on the `auser' folder, is very very similar:

(gdb) set args move folders/auser auser
(gdb) run
Starting program: /usr/local/src/RPM/BUILD/imap-2004a/mailutil/mailutil
move folders/auser auser

Program received signal SIGSEGV, Segmentation fault.
0x0804ce2d in mm_append (stream=0x8117af8, data=0xbffec710,
flags=0xbffeb570,
     date=0xbffeb574, message=0xbffeb578) at mailutil.c:488
488           if ((MAILTMPLEN - ((t += strlen (t)) - tmp)) > (long)
(gdb) print t
$1 = 0xbffeb110 ""
(gdb) print tmp
$2 = " \\Seen \\Answered", '\0' <repeats 1007 times>




Other than providing a copy of the folders themselves, is there any additional information I could provide that would be useful in diagnosing what's going wrong here?

Thanks,

Tim
--
Tim Mooney [EMAIL PROTECTED]
Information Technology Services (701) 231-1076 (Voice)
Room 242-J6, IACC Building (701) 231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164
--
------------------------------------------------------------------
For information about this mailing list, and its archives, see: http://www.washington.edu/imap/c-client-list.html
------------------------------------------------------------------

Reply via email to