Ticket #2902 (assigned defect)

Opened 18 months ago

Last modified 6 months ago

Segmentation fault with IMAP/"The message index is incorrect. Try reopening the mailbox."

Reported by: neteler Owned by: brendan
Priority: major Milestone: 1.6
Component: IMAP Version: 1.5.16
Keywords: Cc: silpaoli@…

Description

Mutt regularly crashes for me. I am using an IMAP box (Microsoft IMAP server), in parallel also thunderbird is listening to auto-filter selected messages into IMAP folders. This happens:

---Mutt: imap://neteler@ntmail/INBOX [Msgs:1126 New:169 30M]---(reverse-date-received/date)------(3%)---
Sorting mailbox...
---Type <return> to continue, or q <return> to quit---
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 182894227392 (LWP 9617)]
0x000000000047c3c9 in imap_cache_del (idata=0x6035d0, h=0x8aeba0) at message.c:919
919       snprintf (id, sizeof (id), "%u-%u", idata->uid_validity, HEADER_DATA(h)->uid);
(gdb) bt

0x000000000047c3c9 in imap_cache_del (idata=0x6035d0, h=0x8aeba0) at message.c:919
919       snprintf (id, sizeof (id), "%u-%u", idata->uid_validity, HEADER_DATA(h)->uid);
(gdb) bt
#0  0x000000000047c3c9 in imap_cache_del (idata=0x6035d0, h=0x8aeba0) at message.c:919
#1  0x000000000047cd28 in imap_fetch_message (msg=0x8af110, ctx=0x5fe130, msgno=Variable "msgno" is not available.
) at message.c:539
#2  0x000000000043bcaf in mx_open_message (ctx=0x5fe130, msgno=0) at mx.c:1407
#3  0x000000000044632b in mutt_pattern_exec (pat=0x602680, flags=Variable "flags" is not available.
) at pattern.c:170
#4  0x0000000000419a5c in mutt_set_header_color (ctx=0x5fe130, curhdr=0x8aeba0) at curs_main.c:2193
#5  0x00000000004228fd in _mutt_set_flag (ctx=0x5fe130, h=0x8aeba0, flag=Variable "flag" is not available.
) at flags.c:246
#6  0x000000000047c732 in imap_set_flags (idata=Variable "idata" is not available.
) at message.c:978
#7  0x00000000004782f1 in imap_cmd_step (idata=0x6035d0) at command.c:597
#8  0x00000000004784de in imap_exec (idata=0x6035d0, cmdstr=Variable "cmdstr" is not available.
) at command.c:265
#9  0x0000000000479c93 in imap_check_mailbox (ctx=Variable "ctx" is not available.
) at imap.c:1385
#10 0x000000000041a267 in mutt_index_menu () at curs_main.c:485
#11 0x0000000000432746 in main (argc=1, argv=0x7fbffff658) at main.c:985
(gdb)


mutt -v
Mutt 1.5.15 (2007-04-06)
Copyright (C) 1996-2007 Michael R. Elkins and others.
Mutt comes with ABSOLUTELY NO WARRANTY; for details type `mutt -vv'.
Mutt is free software, and you are welcome to redistribute it
under certain conditions; type `mutt -vv' for details.

System: Linux 2.6.9-55.ELsmp (x86_64)
ncurses: ncurses 5.4.20040724 (compiled with 5.4)
libidn: 0.5.6 (compiled with 0.5.6)
Compile options:
-DOMAIN
-DEBUG
+HOMESPOOL  -USE_SETGID  +USE_DOTLOCK  -DL_STANDALONE
+USE_FCNTL  -USE_FLOCK   -USE_INODESORT
+USE_POP  +USE_IMAP  -USE_SMTP  +USE_GSS  +USE_SSL_OPENSSL  -USE_SSL_GNUTLS  +USE_SASL  +HAVE_GETADDRINFO
+HAVE_REGCOMP  -USE_GNU_REGEX
+HAVE_COLOR  +HAVE_START_COLOR  +HAVE_TYPEAHEAD  +HAVE_BKGDSET
+HAVE_CURS_SET  +HAVE_META  +HAVE_RESIZETERM
+CRYPT_BACKEND_CLASSIC_PGP  +CRYPT_BACKEND_CLASSIC_SMIME  -CRYPT_BACKEND_GPGME
-EXACT_ADDRESS  -SUN_ATTACHMENT
+ENABLE_NLS  -LOCALES_HACK  +HAVE_WC_FUNCS  +HAVE_LANGINFO_CODESET  +HAVE_LANGINFO_YESEXPR
+HAVE_ICONV  -ICONV_NONTRANS  +HAVE_LIBIDN  +HAVE_GETSID  -USE_HCACHE
ISPELL="/usr/bin/ispell"
SENDMAIL="/usr/sbin/sendmail"
MAILPATH=".INBOX"
PKGDATADIR="/usr/local/share/mutt"
SYSCONFDIR="/usr/local/etc"
EXECSHELL="/bin/sh"
-MIXMASTER
To contact the developers, please mail to <mutt-dev@mutt.org>.
To report a bug, please visit http://bugs.mutt.org/.

uname -a
Linux bartok 2.6.9-55.ELsmp #1 SMP Fri Apr 20 16:36:54 EDT 2007 x86_64 x86_64 x86_64 GNU/Linux

cat /etc/issue
Red Hat Enterprise Linux WS release 4 (Nahant Update 5)

Regards, Markus

Change History

Changed 18 months ago by neteler

I run it again, and after less than one our it crashes with

-*-Mutt: imap://neteler@ntmail/INBOX [Msgs:1120 New:2 Old:153 Del:8 30M]---(reverse-date-received/date)-
Fetching message headers... 1740/1740
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 182894227392 (LWP 3480)]
mx_update_context (ctx=0x7f5100, new_messages=9897728) at mx.c:1566
1566          h->security = crypt_query (h->content);
(gdb)

(gdb) bt
#0  mx_update_context (ctx=0x7f5100, new_messages=9897728) at mx.c:1566
#1  0x000000000047d64f in imap_read_headers (idata=0x6035d0, msgbegin=9897728, msgend=1739)
    at message.c:338
#2  0x000000000047aac2 in imap_open_mailbox (ctx=0x7f5100) at imap.c:748
#3  0x000000000043a827 in mx_open_mailbox (path=0x7fbfffe780 "imap://neteler@ntmail/grassuser",
    flags=0, pctx=Variable "pctx" is not available.
) at mx.c:697
#4  0x000000000041d349 in mutt_index_menu () at curs_main.c:1124
#5  0x0000000000432746 in main (argc=1, argv=0x7fbffff658) at main.c:985
(gdb)

Changed 18 months ago by neteler

... and one more (last for today):

Connecting to ntmail...[Thread debugging using libthread_db enabled]
[New Thread 182894227392 (LWP 7578)]
Fetching message headers... 1120/1123
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 182894227392 (LWP 7578)]
0x0000000000477cae in imap_cmd_step (idata=0x6035d0) at command.c:561
561           if (h && h->active && h->index+1 == msgno)
(gdb) bt
#0  0x0000000000477cae in imap_cmd_step (idata=0x6035d0) at command.c:561
#1  0x000000000047d380 in imap_read_headers (idata=0x6035d0, msgbegin=8313776, msgend=1122)
    at message.c:249
#2  0x000000000047aac2 in imap_open_mailbox (ctx=0x5fe130) at imap.c:748
#3  0x000000000043a827 in mx_open_mailbox (path=0x7fbffff450 "imap://neteler@ntmail/INBOX", flags=0,
    pctx=Variable "pctx" is not available.
) at mx.c:697
#4  0x000000000043272d in main (argc=1, argv=0x7fbffff658) at main.c:982
(gdb)

Changed 17 months ago by brendan

  • status changed from new to assigned
  • milestone set to 1.6

Can you reproduce this with 1.5.16?

Changed 17 months ago by neteler

A first test with 1.5.16 gives following message after less than 5 minutes:

The message index is incorrect. Try reopening the mailbox.

With CTRL-Z I can still get back to the command line and kill the mutt process :-(

Changed 17 months ago by neteler

Forgot to mention that after this message

The message index is incorrect. Try reopening the mailbox.

mutt is actually frozen.

Changed 17 months ago by neteler

  • version changed from 1.5.15 to 1.5.16

Also segfault confirmed...:

Bounce message to Markus Neteler <netelerxxxxxxxxx>? ([yes]/no): yesDetaching after fork from child process 7497.
Sorting mailbox...
Program received signal SIGSEGV, Segmentation fault.
---Type <return> to continue, or q <return> to quit---
[Switching to Thread 182894230368 (LWP 7275)]
0x000000000047e3c9 in imap_cache_del (idata=0x6041a0, h=0x848140) at message.c:904
904       snprintf (id, sizeof (id), "%u-%u", idata->uid_validity, HEADER_DATA(h)->uid);
(gdb) bt
#0  0x000000000047e3c9 in imap_cache_del (idata=0x6041a0, h=0x848140) at message.c:904
#1  0x000000000047ee18 in imap_fetch_message (msg=0x845600, ctx=0x5fed00, msgno=Variable "msgno" is not available.
) at message.c:547
#2  0x000000000043c36f in mx_open_message (ctx=0x5fed00, msgno=0) at mx.c:1407
#3  0x0000000000446a0f in mutt_pattern_exec (pat=0x603250, flags=Variable "flags" is not available.
) at pattern.c:170
#4  0x0000000000419cdc in mutt_set_header_color (ctx=0x5fed00, curhdr=0x848140) at curs_main.c:2211
#5  0x0000000000422ccc in _mutt_set_flag (ctx=0x5fed00, h=0x848140, flag=Variable "flag" is not available.
) at flags.c:262
#6  0x000000000047e87e in imap_set_flags (idata=Variable "idata" is not available.
) at message.c:997
#7  0x000000000047a211 in imap_cmd_step (idata=0x6041a0) at command.c:594
#8  0x000000000047a3fe in imap_exec (idata=0x6041a0, cmdstr=Variable "cmdstr" is not available.
) at command.c:262
#9  0x000000000047c14d in imap_sync_mailbox (ctx=0x5fed00, expunge=1, index_hint=Variable "index_hint" is not available.
) at imap.c:1138
#10 0x000000000043bc49 in mx_sync_mailbox (ctx=0x5fed00, index_hint=0x7fbfffe34c) at mx.c:1164
#11 0x000000000041beda in mutt_index_menu () at curs_main.c:1023
#12 0x0000000000432b1e in main (argc=1, argv=0x7fbffff728) at main.c:989
(gdb)

Changed 17 months ago by neteler

The "The message index is incorrect. Try reopening the mailbox." freeze happens here:

(gdb) bt #0 0x00000037ba5b9a92 in read_nocancel () from /lib64/tls/libc.so.6 #1 0x00000000004741a1 in raw_socket_read (conn=0x651db0, buf=Variable "buf" is not available. ) at mutt_socket.c:395 #2 0x0000000000473d9e in mutt_socket_readchar (conn=0x651db0, c=0x7fbfffd0ff "")

at mutt_socket.c:165

#3 0x0000000000473e6d in mutt_socket_readln_d (buf=0x6529e0 "a0167 OK FETCH completed.", buflen=Variable "buflen" is not available. )

at mutt_socket.c:195

#4 0x0000000000479800 in imap_cmd_step (idata=0x6041a0) at command.c:146 #5 0x000000000047eac8 in imap_fetch_message (msg=0x8cbfc0, ctx=0x5fed00, msgno=Variable "msgno" is not available. ) at message.c:429 #6 0x000000000043c36f in mx_open_message (ctx=0x5fed00, msgno=231) at mx.c:1407 #7 0x0000000000446a0f in mutt_pattern_exec (pat=0x603250, flags=Variable "flags" is not available. ) at pattern.c:170 #8 0x0000000000419cdc in mutt_set_header_color (ctx=0x5fed00, curhdr=0x838020) at curs_main.c:2211 #9 0x0000000000419d36 in index_color (index_no=Variable "index_no" is not available. ) at curs_main.c:184 #10 0x00000000004352ae in menu_redraw_index (menu=0x6545a0) at menu.c:243 #11 0x000000000041cb2f in mutt_index_menu () at curs_main.c:558 #12 0x0000000000432b1e in main (argc=1, argv=0x7fbffff728) at main.c:989 (gdb)

Changed 14 months ago by neteler

  • cc silpaoli@… added

Changed 6 months ago by myon

  • summary changed from Segmentation fault with IMAP to Segmentation fault with IMAP/"The message index is incorrect. Try reopening the mailbox."
Note: See TracTickets for help on using tickets.