Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 432344 - mail-client/mutt-1.5.21-r10 segfaults on startup
Summary: mail-client/mutt-1.5.21-r10 segfaults on startup
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Fabian Groffen
URL: http://prefix.gentooexperimental.org:...
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2012-08-22 19:08 UTC by Constanze Hausner (RETIRED)
Modified: 2012-08-25 12:15 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Sample configuration for segfault (muttrc_segfault,3.63 KB, text/plain)
2012-08-24 08:10 UTC, Constanze Hausner (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Constanze Hausner (RETIRED) gentoo-dev 2012-08-22 19:08:24 UTC
I upgraded to mutt-1.5.21-r10 today and it segfaults on startup. Downgrading to 1.5.21-r1 fixed this issue.
I use mutt with following use-flags:
berkdb crypt gdbm gpg imap mbox nls pop sasl sidebar smime smtp ssl
I use mutt with imaps accounts.

My emerge --info output is:
Portage 2.1.11.9 (default/linux/amd64/10.0, gcc-4.5.4, glibc-2.15-r2, 3.3.8-gentoo x86_64)
=================================================================
System uname: Linux-3.3.8-gentoo-x86_64-Intel-R-_Core-TM-2_Duo_CPU_T7800_@_2.60GHz-with-gentoo-2.1
Timestamp of tree: Wed, 22 Aug 2012 05:30:01 +0000
app-shells/bash:          4.2_p37
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.6.8, 2.7.3-r2, 3.2.3
dev-util/cmake:           2.8.7-r5
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.1-r1
sys-apps/openrc:          0.9.8.4
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.10.3, 1.11.6
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.4.7, 4.5.4
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 3.4-r2 (virtual/os-headers)
sys-libs/glibc:           2.15-r2
Repositories: gentoo sunrise constanze_local
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA dlj-1.1 Q3AEULA PUEL sun-bcla-java-vm Oracle-BCLA-JavaSE google-talkplugin"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=core2 -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -pipe -march=core2 -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles news parallel-fetch parse-eapi-ebuild-head protect-owned sandbox sfperms sign strict unknown-features-warn unmerge-logs unmerge-orphans userfetch xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en_GB en de"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/sunrise /home/superkfr/gentoo_dev/overlay"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 avahi bash-completion berkdb boost bzip2 cairo caps cdda cddb cdinstall chroot cli cracklib crypt cscope cups cxx dbus dc1394 device-mapper djvu dri dts dvb dvd dvi embedded ffmpeg filecaps flac fontconfig foomaticdb fortran gdbm gif gimp git glitz gpg gpm hddtemp hybrid-auth iconv ieee1394 imagemagick imap ipod ipv6 java java6 jpeg jpeg2k kpathsea laptop latex libnotify lilo live llvm-gcc lm_sensors lock mad madwifi maps matroska mbox mdnsresponder-compat mmx mng modules mp3 mp4 mpeg mudflap multilib multiuser ncurses net network nls nptl nsplugin nspr nss ogg opengl openmp openssl pam pcre pdf png pop ppds pppd python qt3support readline sasl sdl sdl-image sdl-sound sdlaudio session sidebar smime smtp sqlite sse sse2 ssl startup-notification stream subversion svg tcpd tcpreplay teamarena threads thunar tiff tools truetype unicode usb v4l vcd vim vim-syntax vorbis x264 xattr xcb xfce xml xulrunner xv xvid zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en_GB en de" PHP_TARGETS="php5-3" PYTHON_TARGETS="python3_2 python2_7" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="nvidia vesa nv fbdev" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 Fabian Groffen gentoo-dev 2012-08-22 20:07:58 UTC
Does it also crash with empty config file?

Please provide a stacktrace or any other clue to reproduce.
Comment 2 Fabian Groffen gentoo-dev 2012-08-23 06:56:17 UTC
I have almost identical USE-flags.  Please throw away your header cache, and see if the problem persists.  A difference between you and me is gdbm over bdb.  (Mutt itself favours gdbm over bdb.)
Comment 3 Constanze Hausner (RETIRED) gentoo-dev 2012-08-23 07:15:11 UTC
I uncommented my muttrc step by step and it segfault only if
set sidebar_visible=yes
is in the config file. So I guess it has something to do with sidebar.
Comment 4 Fabian Groffen gentoo-dev 2012-08-23 07:49:50 UTC
ok, that already narrows it down considerably.
Comment 5 Fabian Groffen gentoo-dev 2012-08-23 16:42:39 UTC
works fine here

How do your mailboxes look like?
Comment 6 Constanze Hausner (RETIRED) gentoo-dev 2012-08-24 07:33:38 UTC
Then it seems to be an configuration error on my side. Since I don't use the sidebar really, I use it without it for now :). Thank you.
Comment 7 Fabian Groffen gentoo-dev 2012-08-24 07:41:19 UTC
Still it would be nice to catch a stack trace + config file that reproduces it, if you can.  If not, there's not much I can do, and RESO/WORKSFORME :(
Comment 8 Constanze Hausner (RETIRED) gentoo-dev 2012-08-24 08:10:06 UTC
Created attachment 322078 [details]
Sample configuration for segfault

Okay, here is a sample config which produces a segfault on my system.
Comment 9 Adam Randall 2012-08-24 08:39:44 UTC
In all cases when mutt hangs, strace always ends with this line:

ioctl(0, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, 0x7fff0c72edc0) = -1 EINVAL (Invalid argument)

The address at the end may change slightly between runs, of course.
Comment 10 Adam Randall 2012-08-24 08:40:26 UTC
Sorry, I commented on the wrong bug. My appologies.
Comment 11 Fabian Groffen gentoo-dev 2012-08-25 07:50:29 UTC
ok, with your config it's reproducible

% gdb --args mutt -F muttrcsegv
...
Program received signal SIGSEGV, Segmentation fault.
0x00000001000a0910 in draw_sidebar (menu=6) at sidebar.c:305
305                                     if (SidebarDelimChars &&
(gdb) l
300                     if ( maildir_is_prefix ) {
301                             char *tmp_folder_name;
302                             int lastsep = 0;
303                             tmp_folder_name = tmp->path + strlen(Maildir);
304                             for (i = 0; i < strlen(tmp->path) - strlen(Maildir) - 2; i++) {
305                                     if (SidebarDelimChars &&
306                                                     strchr(SidebarDelimChars, tmp_folder_name[i]))
307                                     {
308                                             sidebar_folder_depth++;
309                                             lastsep = i + 1;
(gdb) 

in my case Maildir is 1 char shorter than tmp->path, hence i starts negative
Comment 12 Fabian Groffen gentoo-dev 2012-08-25 07:53:21 UTC
this is a breakage introduced by the fix for
https://bugs.gentoo.org/show_bug.cgi?id=373197#c16
Comment 13 Fabian Groffen gentoo-dev 2012-08-25 09:39:30 UTC
ok, fixed, thanks.
Comment 14 Fabian Groffen gentoo-dev 2012-08-25 12:15:21 UTC
fixed in mutt-1.5.21-r11