Re: Issues with git send-email and msmtp

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]