Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

segfault in command line mutt with ssmtp on cygwin

120 views
Skip to first unread message

Janak Ramakrishnan

unread,
May 16, 2004, 5:19:50 PM5/16/04
to
I'm running mutt 1.4.2.1 on cygwin (Windows XP) with ssmtp as my MTA,
and I've found that sending messages on the command line with mutt gives
a segmentation fault if ssmtp is unable to send the message:

$ mutt -s test te...@address.com < test
Error sending message, child exited 1 ().
Segmentation fault (core dumped)

However, ssmtp does not crash given the same input:

$ /usr/sbin/ssmtp te...@address.com < test
ssmtp: Cannot open fake.smtp.edu:25

Also, if smtp can successfully send the mail (if I give it a real smtp
server), then mutt does not crash. Mutt does not crash in interactive
mode, whether or not ssmtp is successful. Finally, if I set the
sendmail parameter in mutt to be a dummy program that just returns 1,
then mutt gives the expected:

$ mutt -s test ja...@janak.org < test
Error sending message, child exited 1 ().
Could not send the message.

This problem is annoying because ssmtp can fail for many legitimate
reasons, including the connection being down. I've noticed one other
post complaining of this problem, but it seems to have been brushed off.
Does anyone know of a reason for the crash, or a workaround? Thanks.

Janak

Paul Walker

unread,
May 22, 2004, 9:05:28 PM5/22/04
to
On Sun, 16 May 2004 21:19:50 +0000 (UTC), Janak Ramakrishnan wrote:

Sorry for the delayed response!

> I'm running mutt 1.4.2.1 on cygwin (Windows XP) with ssmtp as my MTA, and
> I've found that sending messages on the command line with mutt gives a
> segmentation fault if ssmtp is unable to send the message:
>
> $ mutt -s test te...@address.com < test
> Error sending message, child exited 1 ().
> Segmentation fault (core dumped)

There are a few things we can start with, maybe.

First of all, could you maybe try building the latest devel mutt
(ftp://ftp.mutt.org/mutt/devel/) ? As of writing it's 1.5.6.

Does the Cygwin mutt have any patches applied? (Should be shown up with mutt
-v)

Lastly, since it dumps core, could you use gdb to do a backtrace and see
where the problem occurred? (If that's Greek to you then let the newsgroup
know and someone will explain how to do it :)

That should help to start narrowing it down. There've been quite a lot of
people lately complaining of Cygwin crashes, so either Cygwin have broken
something, or the last stable release of mutt accidentally broke something
for Windows.

(It would be *really* useful if you could try and reproduce the problem
on a Unix machine, if you have one...)

Thanks,

--
Paul

"He teaches like Speedy Gonzalez on a caffeine high."
-- Comments from MIT course evaluation guide

Janak Ramakrishnan

unread,
Jun 15, 2004, 2:15:56 PM6/15/04
to
Sorry for the late reply.

Paul Walker <use...@blacksun.org.uk> wrote:
> On Sun, 16 May 2004 21:19:50 +0000 (UTC), Janak Ramakrishnan wrote:
> > I'm running mutt 1.4.2.1 on cygwin (Windows XP) with ssmtp as my MTA, and
> > I've found that sending messages on the command line with mutt gives a
> > segmentation fault if ssmtp is unable to send the message:

...


> First of all, could you maybe try building the latest devel mutt
> (ftp://ftp.mutt.org/mutt/devel/) ? As of writing it's 1.5.6.

I've built and run it, with only the following line added in muttrc:
set sendmail="d:/bin/cygwin/usr/sbin/ssmtp.exe "
the result is the same:

$ ./mutt -F ./muttrc -s test te...@address.com < test


Error sending message, child exited 1 ().
Segmentation fault (core dumped)

> Does the Cygwin mutt have any patches applied? (Should be shown up with mutt
> -v)
I assume this isn't relevant, since I'm using the devel mutt, compiled
with no options. I've included the result of ./mutt -v below, but everything
should be the default.

> Lastly, since it dumps core, could you use gdb to do a backtrace and see
> where the problem occurred? (If that's Greek to you then let the newsgroup
> know and someone will explain how to do it :)

I don't know very much about gdb. I tried running it on
mutt.exe.stackdump, and it said that mutt.exe.stackdump was not a core
dump. mutt doesn't appear to be producing a core file, just a
stackdump. I've included the contents below. I'm unable to run mutt in
gdb because saying "run < test" in gdb doesn't appear to actually
redirect mutt's standard input, so it becomes a normal invocation, and
thus doesn't crash. I don't know if this is a cygwin problem. Any
suggestions? Thanks.

Janak

$ ./mutt -v
Mutt 1.5.6i (2004-02-01)
Copyright (C) 1996-2002 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: CYGWIN_NT-5.1 1.5.10(0.116/4/2) (i686) [using ncurses 5.3]
[using libico
nv 1.9]
Compile options:
-DOMAIN
-DEBUG
-HOMESPOOL -USE_SETGID -USE_DOTLOCK -DL_STANDALONE
+USE_FCNTL -USE_FLOCK
-USE_POP -USE_IMAP -USE_GSS -USE_SSL -USE_SASL -USE_SASL2
+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
-BUFFY_SIZE -EXACT_ADDRESS -SUN_ATTACHMENT
+ENABLE_NLS -LOCALES_HACK +HAVE_WC_FUNCS +HAVE_LANGINFO_CODESET
+HAVE_LANGIN
FO_YESEXPR
+HAVE_ICONV -ICONV_NONTRANS -HAVE_LIBIDN +HAVE_GETSID
-HAVE_GETADDRINFO
-ISPELL
SENDMAIL="/usr/sbin/sendmail"
MAILPATH="/var/mail"
PKGDATADIR="/usr/local/share/mutt"
SYSCONFDIR="/usr/local/etc"
EXECSHELL="/bin/sh"
-MIXMASTER
To contact the developers, please mail to <mutt...@mutt.org>.
To report a bug, please use the flea(1) utility.

$ cat mutt.exe.stackdump
Exception: STATUS_ACCESS_VIOLATION at eip=005B3BB4
eax=00000000 ebx=00000000 ecx=00000005 edx=00000005 esi=0022D860
edi=00000000
ebp=0022D718 esp=0022D700
program=d:\bin\cygwin\usr\src\mutt-1.5.6\mutt.exe, pid
3092, thread main
cs=001B ds=0023 es=0023 fs=0038 gs=0000 ss=0023
Stack trace:
Frame Function Args
0022D718 005B3BB4 (00000000, 0022DA60, 0022DE78, 0044232B)
0022D728 0041604E (00000000, 00000100, 00442092, 0022D860)
0022DE78 0044232B (0045E4E0, 10102608, 00000001, 00000000)
0022DFA8 00415D0F (0045E4E0, 10102608, 00000000, 00000000)
0022E058 0045E7F3 (10102198, 10102100, 00000000, 00000000)
0022E198 00458BA1 (10102798, 000000FF, 0022E208, 10102AA0)
0022E788 004597A4 (00000020, 10102798, 00000000, 00000000)
0022F068 00434EEF (00000006, 616D2CA8, 101000A8, 0022F0C0)
0022F0A8 61005F54 (0022F0C0, 77F56BB3, 77DD0000, 77F5BCD4)
0022FF88 6100616B (00000000, 00000000, 00000000, 00000000)
End of stack trace

0 new messages