Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 432562 - mail-client/mutt-1.5.21-r10 hangs in scripts/ssh
Summary: mail-client/mutt-1.5.21-r10 hangs in scripts/ssh
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-24 08:37 UTC by Adam Randall
Modified: 2012-08-25 12:15 UTC (History)
2 users (show)

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


Attachments
strace of mutt called through ssh (mutt-strace.txt,9.53 KB, text/plain)
2012-08-24 08:38 UTC, Adam Randall
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Randall 2012-08-24 08:37:52 UTC
Since upgrading to mail-client/mutt-1.5.21-r10 mutt hangs indefinitely when called inside of scripts (via cron) as well as calling it directly though a conduit such as SSH. This only seems to affect AMD64 and not x86. Reverting back to mail-client/mutt-1.5.21-r1 resolves the issue.

Reproducible: Always

Steps to Reproduce:
ssh root@myserver echo test \| mutt -s test -- root@localhost
Actual Results:  
Hang, no output.

Expected Results:  
No output, exit code of 0.

Portage 2.1.11.9 (default/linux/amd64/10.0, gcc-4.5.4, glibc-2.15-r2, 3.2.12-gentoo x86_64)
=================================================================
System uname: Linux-3.2.12-gentoo-x86_64-Intel-R-_Xeon-TM-_CPU_3.00GHz-with-gentoo-2.1
Timestamp of tree: Fri, 24 Aug 2012 04:15:01 +0000
app-shells/bash:          4.2_p37
dev-lang/python:          2.7.3-r2, 3.2.3
dev-util/cmake:           2.8.8-r3
dev-util/pkgconfig:       0.27
sys-apps/baselayout:      2.1-r1
sys-apps/openrc:          0.9.8.4
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.68
sys-devel/automake:       1.11.6
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            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
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps=y"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fail-clean fixlafiles news parallel-fetch parse-eapi-ebuild-head protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://gentoo.osuosl.org/ http://gentoo.cs.uni.edu/ http://mirror.usu.edu/mirrors/gentoo/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j5"
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=""
SYNC="rsync://rsync.us.gentoo.org/gentoo-portage"
USE="acl amd64 apache2 bash-completion berkdb bzip2 cli corefonts cracklib crypt ctype cups curl cxx djvu dri filter fontconfig fortran fpx gcj gd gdbm gif gnutls gpm graphviz gs hash hdri iconv imagemagick ipv6 jbig jpeg jpeg2k lcms ldap-sasl lzma mmx modules mudflap multilib ncurses nls nptl nptlonly openexr openmp pam pcntl pcre pdf png posix pppd readline samba sasl session simplexml smtp snmp soap sockets sse sse2 ssh ssl svg tcpd threads tiff truetype unicode vim-syntax webp wmf xml zip zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" 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 auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so 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="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" PHP_TARGETS="php5-3" PYTHON_TARGETS="python3_2 python2_7" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga neomagic nouveau nv r128 radeon savage sis tdfx trident vesa via vmware dummy v4l" 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, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 Adam Randall 2012-08-24 08:38:38 UTC
Created attachment 322086 [details]
strace of mutt called through ssh
Comment 2 Adam Randall 2012-08-24 08:41:14 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 3 Adam Randall 2012-08-24 08:42:27 UTC
Muttrc:

# Some minimal Mutt settings, Gentoo-style.  These reflect the Gentoo
# predilection for maildir folders.
#
# Please don't add settings to this file to change other user
# preferences (such as colors), since those can be hard for a user to
# undo if their preference doesn't match yours!  For example, it is
# *impossible* currently in mutt to remove color settings from objects
# other than the index.

set mbox_type=Maildir
set folder=~/.maildir
set spoolfile=~/.maildir/
set record=~/.maildir-sent/
set move=no

# Maybe we shouldn't set index_format here, but this is a recommended
# one for maildir-style folders.

set index_format="%4C %Z %{%b %d} %-16.16L  %s"
Comment 4 Adam Randall 2012-08-24 08:44:32 UTC
USE flags for mutt:

# emerge -qvp =mail-client/mutt-1.5.21-r10
[ebuild   R   ] mail-client/mutt-1.5.21-r10  USE="berkdb crypt gdbm gnutls nls sasl smtp ssl -debug -doc -gpg -idn -imap -mbox -nntp -pop -qdbm (-selinux) -sidebar -smime -tokyocabinet"
Comment 5 Adam Randall 2012-08-24 16:33:12 UTC
One final piece of information on this is that when mutt hangs, it pegs the CPU.
Comment 6 Fabian Groffen gentoo-dev 2012-08-25 10:22:21 UTC
It's one of the feature patches, without them it works fine.  I think it's the xterm titles patch, since some ncurses function is being called when it hangs.
Comment 7 Fabian Groffen gentoo-dev 2012-08-25 11:27:09 UTC
mutt_ts_capability calls tigetstr, which needs a tty.  When you'd call ssh with -t, you'll see it works, since ssh allocates a pseudo tty in that case.  I think the fix is to simply stop trying to do terminal title stuff when mutt has no tty.
Comment 8 Fabian Groffen gentoo-dev 2012-08-25 12:15:14 UTC
fixed in mutt-1.5.21-r11