Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 174080
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Fernando J. Pereda (RETIRED) <ferdy@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: yoshi watanabe <yoshi3@autograf.pl>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 174080 depends on: Show dependency tree
Bug 174080 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2007-04-10 20:12 0000
when i upgraded to mutt 1.5.15 i started experiencing certain lags in the
client. 

e.g. when starting mutt it hangs for 5-10 seconds on checking
/var/spool/mail/<username> file (which is always 0 bytes long on my system).
cpu usage spikes up to 60% at that time (the latter might be normal).

also loading mailboxes and simply going from one unread mesage to another one 
(with TAB key) causes mutt to freeze pretty often, from 0.5 second to even 3-4
seconds at times. cpu usage jumps sometimes to 80% at that time.

i have a couple of large mailboxes in mbox format. more extreme ones have 6000
messages (vim mailing list , for instance). mutt-1.5.14 works with them with
absolutely no problems or lags. mutt 1.5.15 lags very often, even if no mailbox
is opened.

current workaround is to go back to mutt-1.5.14. i have no idea what's wrong.

Reproducible: Always

Steps to Reproduce:
1. launch mutt
2. do usual things, (opening a mailbox, reading messages, even starting mutt
itself)
Actual Results:  
mutt exhibits certain lack of responsiveness, works really slow. going to next
unread message is very slow (even on a mailbox composed of 20 messages).

Expected Results:  
mutt should be more responsive. 1.5.14 is much faster than 1.5.15.

emerge --info 

Portage 2.1.2.3 (default-linux/x86/2006.1/desktop, gcc-4.1.2, glibc-2.5-r1,
2.6.20-gentoo-r5 i686)
=================================================================
System uname: 2.6.20-gentoo-r5 i686 AMD Athlon(tm) 64 Processor 3200+
Gentoo Base System release 1.12.10
Timestamp of tree: Tue, 10 Apr 2007 08:50:01 +0000
ccache version 2.4 [enabled]
dev-java/java-config: 1.3.7, 2.0.31-r3
dev-lang/python:     2.4.4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.4-r6
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.15-r1
sys-devel/libtool:   1.5.23b
virtual/os-headers:  2.6.20-r2
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=athlon-xp -mtune=athlon-xp -O2 -pipe -mfpmath=sse -msse2 -msse3"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config
/usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf
/etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c"
CXXFLAGS="-march=athlon-xp -mtune=athlon-xp -O2 -pipe -mfpmath=sse -msse2
-msse3"
DISTDIR="/home/gentoo/distfiles"
FEATURES="candy ccache distlocks moo sandbox sfperms strict userpriv
usersandbox"
GENTOO_MIRRORS="http://distfiles.gentoo.org
http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="pl_PL.utf8"
LC_ALL="pl_PL.utf8"
LINGUAS="pl en"
MAKEOPTS="-j2"
PKGDIR="/home/gentoo/packages"
PORTAGE_RSYNC_EXTRA_OPTS="--progress -z"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress
--force --whole-file --delete --delete-after --stats --timeout=180
--exclude=/distfiles --exclude=/local --exclude=/
packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/mnt/debian/workdirs/portage"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/home/gentoo/overlays/sunrise /home/gentoo/overlays/yoshi"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext 7zip X a52 aac aalib acct acl acpi ada addbookmarks aiglx
aim akode alias alsa amazon amr amuled ao aoss aotuv apache apache2 ares asf
async atk audacious audiofile autoreplace
 bash-completion bcmath bcp berkdb bitmap-fonts bittorrent bjam bonjour boost
bzip2 cairo calendar caps capslib catalogs ccache cdb cdda cddb cdr cgi chardet
clearcase cli clock-screen colordiff c
onnectionstatus contactnotes contrarius contrib cracklib cran crypt cscope css
ctype cups curl cursors dbus dillo djbfft dmi dnotify dpmod dri dts dvd dvdr
dvi ecc effects emboss emovix enca encod
e esd exif expat extraengine extras fam fame fastcgi fat fbcon fbdev ffmpeg
fftw firefox flac flatfile fontconfig foomaticdb fortran fpx ftp fuse gadu gd
gdbm geoip ggi gif glade glib glibc-omitfp
 glitz glut gmp gnome gnutls gopher gpgme gpm grammar gs gsl gsm gstreamer gvim
gzip hal hash highlight history icons iconv icq id3 idea imagemagick imap imlib
inifile inkjar ipv6 irc irmc isdnlog
 jabber javascript jfs jikes jingle jpeg jpeg2k junit justify kde
kdeenablefinal kdehiddenvisibility key-screen kipi kqemu l7filter lame lapack
largeterminal latex lcms leim lesstif lha l
ibcaca libg++ libnotify libsamplerate libvisual libwww lights lj lm_sensors
logrotate lzo mad maildir mailwrapper math matroska mbox md5sum metalink mhash
midi mikmod mmkeys mmx mmxext mng mod mod
plug mods mouse mp3 mp4 mp4live mpeg mpeg2 mplayer mudflap multiuser musepack
musicbrainz mysql ncurses nethack network nforce2 nls nntp no-old-linux
no-seamonkey nosendmail nowlistening nptl nptl
only nsplugin ntfs ofx ogg on-the-fly-crypt openal opengl oss overlays p2p pam
pango pascal password paste64 pch pcntl pcre pdf pdo perl player plugin pmu png
pop posix ppds pppd python qmax qt3 q
t3support qt4 quicktime rar rdesktop readline real reflection reiser4 reiserfs
remote rle rplay rrdtool rss rtc sametime scenarios sdl sdl-sound search-screen
sensord session sharedext silc simple
xml skins slang sms smtp sndfile sockets source sourceview spamassassin speedo
spell spl sql sqlite sqlite3 srv sse sse2 ssl startup-notification statistics
stroke subtitles subversion svg svga sv
gz sysfs sysvipc t1lib tagwriting tcpd texteffect textures tga theora thesaurus
threads threadsafe thumbnail tidy tiff tokenizer tools tordns transcode
translator trayicon truetype truetype-fonts 
type1 type1-fonts unicode upnp usb userlocales vcd vhosts vidix vim vim-pager
vim-with-x vorbis webpresence win32codecs wma wmf wordperfect x264 x86
xchatdccserver xcomposite xfs xgetdefault xine 
xml xmlreader xmlrpc xmlwriter xorg xpm xrandr xscreensaver xsettings xsl xv
xvid xvmc yahoo yv12 zip zlib" ALSA_CARDS="intel8x0" ALSA_PCM_PLUGINS="adpcm
alaw asym copy dmix dshare dsnoop empty ex
tplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug
rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="mouse keyboard"
KERNEL="linux" LCD_DEVICES="bayrad cfontz
 cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="pl en"
USERLAND="GNU" VIDEO_CARDS="radeon"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, PORTAGE_COMPRESS,
PORTAGE_COMPRESS_FLAGS

------- Comment #1 From Fernando J. Pereda (RETIRED) 2007-04-10 21:15:29 0000 -------
I'm not sure what might be going on there... It certainly works fine here.

The only suggestion I have is to recompile with USE="vanilla" and if it still
happens, take it upstream.

- ferdy

------- Comment #2 From yoshi watanabe 2007-04-11 10:08:53 0000 -------
USE="vanilla" helped. so now i have to find the USE flag/patch that caused it.

maybe that new sidebar patch introduced in 1.5.15 ebuild broke something? (i've
never used it in mutt).

------- Comment #3 From Michal Januszewski 2007-04-11 10:29:26 0000 -------
Same problem here. Doesn't happen with 'vanilla'. Doesn't happen when I remove
the sidebar patch.

------- Comment #4 From Fernando J. Pereda (RETIRED) 2007-04-11 11:49:33 0000 -------
Ok, so the sidebar patch is to blame. Does it happen when you _only_ apply the
sidebar patch ?

- ferdy

------- Comment #5 From arona 2007-04-11 15:47:28 0000 -------
asa

------- Comment #6 From Stéphane Gimenez 2007-04-13 09:39:54 0000 -------
Same here, mutt 1.5.15 takes about one full minute to start with very high cpu
and disk usage. It is absolutely unusable (i reverted to 1.5.14). The mailboxes
(mbox format) i usually open are quite small, but i also have huge ones
alongside. I guess the mentioned patch tries parse them all.

------- Comment #7 From Fernando J. Pereda (RETIRED) 2007-04-13 10:33:43 0000 -------
Do all of you use mbox ? I use maildir and am not seeing this one myself.

- ferdy

------- Comment #8 From Michal Januszewski 2007-04-15 13:09:03 0000 -------
I use mbox. I also don't seem to be able to apply only the sidebar patch, since
it fails when any of the previous patches is removed. Do you have a diff
against vanilla mutt source?

------- Comment #9 From Fernando J. Pereda (RETIRED) 2007-04-15 13:11:16 0000 -------
Yeah, just get it from upstream:
http://lunar-linux.org/index.php?page=mutt-sidebar

I sent upstream an email, but got no answer.

- ferdy

------- Comment #10 From Michal Januszewski 2007-04-15 13:19:26 0000 -------
Tested with the patch from upstream -- looks like the problem is caused by the
sidebar patch alone.

------- Comment #11 From Michal Januszewski 2007-04-15 13:34:40 0000 -------
OK, so I actually had a look at the patch. The problem is in the following
piece of code:

    90 !         int msgcount = 0;
    91 !         int msg_unread = 0;
    92 !         /* parse the mailbox, to see how much mail there is */
    93 !         ctx = mx_open_mailbox( tmp->path, M_READONLY | M_QUIET |
M_NOSORT | M_PEEK, NULL);
    94 !         if(ctx)
    95 !         {
    96 !             msgcount = ctx->msgcount;
    97 !           msg_unread = ctx->unread;
    98 !           mx_close_mailbox(ctx, 0);
    99 !         }

As you can see, it tries to parse all mailboxes to count the emails (regardless
of whether one is using the sidebar or not). I'm sure this is fine when you
have maybe 10M of email in a few mboxes, but it really doesn't scale when the
amount of data is of the order of 100M or 1G.

------- Comment #12 From Fernando J. Pereda (RETIRED) 2007-04-26 09:54:54 0000 -------
Indeed... I informed upstream and he didn't answer. I'll drop him another
email. I really don't know how to cleanly solve this one.

- ferdy

------- Comment #13 From Petr Baudis 2007-04-26 16:18:25 0000 -------
Actually, here that makes mutt totally unusable, since I have 5G worth of
mailboxes here with some very large mailboxes with high activity, and by the
time it is over the first iteration of parsing, it goes back to re-parse the
mailboxes that received another mail, and so on, essentially looping infinitely
without actually ever showing anything. (Furthermore, all this happens while
"Sorting mailbox" is shown on the screen, which is something it is not doing
for certain.)

------- Comment #14 From Fernando J. Pereda (RETIRED) 2007-04-26 16:54:45 0000 -------
If I don't get a fix from upstream in a couple of days I'm going to take the
patch out of our patchset and _only_ apply it if USE=sidebar.

Sorry all for the troubles caused, guys.

- ferdy

------- Comment #15 From petre rodan (RETIRED) 2007-06-09 10:25:37 0000 -------
do you by any chance use the 'noatime' mount option for the partition that has
the mailboxes? if yes, please try
http://www.mutt.org/doc/devel/manual.html#check-mbox-size with version 1.5.15
and report back.

------- Comment #16 From Michal Januszewski 2007-06-09 14:14:10 0000 -------
I do in fact have the fs mounted with the noatime flag. Setting check_mbox_size
to 'yes' didn't seem to have any effect on the extremely long startup time.

------- Comment #17 From Fernando J. Pereda (RETIRED) 2007-08-08 09:45:22 0000 -------
The sidebar patch is now turned on with USE=sidebar and is ONLY applied on a
vanilla tree. People that want the sidebar patch can still use it and it
doesn't affect anybody else.

This is all in mail-client/mutt-1.5.16

Thanks for the reports and sorry about the big delay.

- ferdy

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug