git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Roger Pau Monné" <roger.pau@citrix.com>
To: <git@vger.kernel.org>
Subject: Re: Issues with git send-email and msmtp
Date: Wed, 22 Mar 2017 09:47:11 +0000	[thread overview]
Message-ID: <20170322094711.g53e2ok72cxg27ab@dhcp-3-128.uk.xensource.com> (raw)
In-Reply-To: <20170321154921.3jgn4ktcop4shct2@dhcp-3-128.uk.xensource.com>

On Tue, Mar 21, 2017 at 03:49:21PM +0000, Roger Pau Monné wrote:
> Hello,
> 
> I'm trying to use git send-email with msmtp, and I have added the following to
> my .gitconfig:
> 
> [sendemail]
> 	smtpserver = "/usr/local/bin/msmtp"
> 
> This seems to work fine, except that sometimes git dies unexpectedly after
> queuing a patch to msmtp:
> 
> Died at /usr/local/Cellar/git/2.12.0/libexec/git-core/git-send-email line 1350, <FIN> line 3.
> 
> I'm guessing there's some kind of race, because this is not 100% reproducible,
> sometimes succeeds while others simply dies with the above message. As you can
> imagine, this is specially annoying when sending patch series.
> 
> Has someone seen similar issues when using send-email and msmtp? Am I missing
> something in my .gitconfig?

(switched to my @citrix.com address to prevent further bounces)

Hello,

Thanks for the help, and sorry to reply here (as some of you noted the
forwarding from address with SPF was broken and messages bounced). It seems
like this is a msmtp issue, more exactly msmtp doesn't handle SIGPIPE, and
AFAICT this leads to crashes when the server closes the connection before msmtp
does:

* thread #1: [...] stop reason = signal SIGPIPE
    frame #0: 0x00007fffd5c4d00a libsystem_kernel.dylib`__sendmsg + 10
libsystem_kernel.dylib`__sendmsg:
[...]
(lldb) bt
* thread #1: tid = 0x87c0f4, 0x00007fffd5c4d00a libsystem_kernel.dylib`__sendmsg + 10, queue = 'com.apple.main-thread', stop reason = signal SIGPIPE
  * frame #0: 0x00007fffd5c4d00a libsystem_kernel.dylib`__sendmsg + 10
    frame #1: 0x0000000101e5c69c libgnutls.30.dylib`system_writev + 41
    frame #2: 0x0000000101e3d1ba libgnutls.30.dylib`_gnutls_io_write_flush + 428
    frame #3: 0x0000000101e37689 libgnutls.30.dylib`_gnutls_send_tlen_int + 1222
    frame #4: 0x0000000101e5b78a libgnutls.30.dylib`gnutls_alert_send + 124
    frame #5: 0x0000000101e36f4f libgnutls.30.dylib`gnutls_bye + 86
    frame #6: 0x0000000101e1e8bc msmtp`tls_close([...]) + 28 at tls.c:1736 [opt]
    frame #7: 0x0000000101e1c382 msmtp`smtp_close([...]) + 34 at smtp.c:1905 [opt]
    frame #8: 0x0000000101e136ab msmtp`msmtp_sendmail [inlined] msmtp_endsession([...]) + 53 at msmtp.c:555 [opt]
    frame #9: 0x0000000101e13676 msmtp`msmtp_sendmail([...]) + 1558 at msmtp.c:1913 [opt]
    frame #10: 0x0000000101e183e6 msmtp`main([...]) + 5094 at msmtp.c:4157 [opt]
    frame #11: 0x00007fffd5b1e255 libdyld.dylib`start + 1
(lldb) c
Process 70391 resuming
Process 70391 exited with status = 0 (0x00000000) Terminated due to signal 13

This has nothing to do with git, I probably didn't realize before because I
guess mutt ignores this completely. I already sent a patch upstream.

Roger.

      parent reply	other threads:[~2017-03-22  9:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-21 15:49 Issues with git send-email and msmtp Roger Pau Monné
2017-03-21 16:50 ` Jeff King
2017-03-21 19:23   ` Eric Wong
2017-03-22  9:47 ` Roger Pau Monné [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170322094711.g53e2ok72cxg27ab@dhcp-3-128.uk.xensource.com \
    --to=roger.pau@citrix.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).