Bug#836339: [Pkg-mutt-maintainers] Bug#836339: mutt: segfaults shortly after tls_socket_read error on imaps

2016-12-13 Thread Stefanos Boglou
I think I am affected by the same bug (not sure tho).

Every time I suspend my laptop and resume on a different internet
connection mutt crashes. Its easily reproducible (at least on my end)
I used gdb to get a backtrace. -d 2 does not seem to do anything?

Attached are both a backtrace and a full backtrace

Starting program: /usr/bin/mutt -d 2
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Program received signal SIGPIPE, Broken pipe.
0x75a1aa97 in __libc_sendmsg (fd=4, msg=msg@entry=0x7fffc710,
flags=flags@entry=0)
at ../sysdeps/unix/sysv/linux/sendmsg.c:28
28../sysdeps/unix/sysv/linux/sendmsg.c: No such file or directory.
Already logging to gdb.txt
.
= Backtrace =
#0  0x75a1aa97 in __libc_sendmsg (fd=4, msg=msg@entry=0x7fffc710,
flags=flags@entry=0)
at ../sysdeps/unix/sysv/linux/sendmsg.c:28
#1  0x76d1265c in _system_writev (flags=0, iovec_cnt=, iovec=,
ptr=) at system/sockets.c:103
#2  system_writev (ptr=, iovec=,
iovec_cnt=) at system/sockets.c:120
#3  0x76cf29e4 in _gnutls_writev (total=31, giovec_cnt=1,
giovec=0x7fffc780, session=0x559dd600)
at buffers.c:499
#4  _gnutls_io_write_flush (session=session@entry=0x559dd600) at
buffers.c:698
#5  0x76cf2dcc in _gnutls_io_write_buffered
(session=session@entry=0x559dd600,
bufel=,
mflag=mflag@entry=1) at buffers.c:654
#6  0x76ced059 in _gnutls_send_tlen_int
(session=session@entry=0x559dd600,
type=type@entry=GNUTLS_ALERT,
htype=htype@entry=4294967295, epoch_rel=epoch_rel@entry=70001,
_data=_data@entry=0x7fffca50,
data_size=data_size@entry=2, min_pad=0, mflags=1) at record.c:539
#7  0x76d113a8 in _gnutls_send_int (mflags=1, data_size=2,
_data=0x7fffca50, epoch_rel=70001,
htype=4294967295, type=GNUTLS_ALERT, session=0x559dd600) at
./record.h:43
#8  gnutls_alert_send (session=session@entry=0x559dd600,
level=level@entry=GNUTLS_AL_WARNING,
desc=desc@entry=GNUTLS_A_CLOSE_NOTIFY) at alert.c:165
#9  0x76ceef7c in gnutls_bye (session=0x559dd600,
how=how@entry=GNUTLS_SHUT_WR)
at record.c:297
#10 0x5561c812 in tls_socket_close (conn=0x559cea30) at
../../mutt_ssl_gnutls.c:497
#11 0x5561ef4b in mutt_sasl_conn_close (conn=0x559cea30) at
../../mutt_sasl.c:502
#12 0x5561bba9 in mutt_socket_close (conn=conn@entry=0x559cea30)
at ../../mutt_socket.c:81
#13 0x5561bf65 in mutt_socket_readchar (conn=conn@entry=0x559cea30,
c=c@entry=0x7fffcb27 "")
at ../../mutt_socket.c:186
#14 0x5561bfdc in mutt_socket_readln_d (buf=0x55e3d9b0 "a1067
OK NOOP completed.", buflen=512,
conn=0x559cea30, dbg=dbg@entry=2) at ../../mutt_socket.c:202
#15 0x556247d9 in imap_cmd_step (idata=idata@entry=0x559cf010)
at ../../../imap/command.c:114
#16 0x55625f98 in imap_cmd_idle (idata=idata@entry=0x559cf010)
at ../../../imap/command.c:320
#17 0x5562845c in imap_check_mailbox (ctx=ctx@entry=0x55997210,
index_hint=index_hint@entry=0x7fffcc64, force=force@entry=0) at
../../../imap/imap.c:1432
#18 0x55628bfe in imap_check_mailbox_reopen (ctx=0x55997210,
index_hint=0x7fffcc64)
at ../../../imap/imap.c:1478
#19 0x55588abe in mutt_index_menu () at ../../curs_main.c:893
#20 0x5556ccb0 in main (argc=1, argv=) at
../../main.c:883

= Full Backtrace =
#0  0x75a1aa97 in __libc_sendmsg (fd=4, msg=msg@entry=0x7fffc710,
flags=flags@entry=0)
at ../sysdeps/unix/sysv/linux/sendmsg.c:28
resultvar = 18446744073709551584
sc_ret = 
#1  0x76d1265c in _system_writev (flags=0, iovec_cnt=, iovec=,
ptr=) at system/sockets.c:103
hdr = {msg_name = 0x0, msg_namelen = 0, msg_iov = 0x7fffc780,
msg_iovlen = 1, msg_control = 0x0,
  msg_controllen = 0, msg_flags = 0}
#2  system_writev (ptr=, iovec=,
iovec_cnt=) at system/sockets.c:120
No locals.
#3  0x76cf29e4 in _gnutls_writev (total=31, giovec_cnt=1,
giovec=0x7fffc780, session=0x559dd600)
at buffers.c:499
i = 
no_writev = 0
fd = 0x4
is_dtls = false
#4  _gnutls_io_write_flush (session=session@entry=0x559dd600) at
buffers.c:698
msg = {data = 0x0, size = 0}
send_buffer = 0x559de300
ret = 
sent = 0
tosend = 31
iovec = {{iov_base = 0x55e3fcf3, iov_len = 31}, {iov_base =
0x0, iov_len = 140737488341248}, {
iov_base = 0x55997180, iov_len = 140737313642640},
{iov_base = 0x7fffc8e0,
iov_len = 140737317219192}, {iov_base = 0x0, iov_len =
140737334859080}, {iov_base = 0x55e26ac0,
iov_len = 0}, {iov_base = 0x2, iov_len = 2}, {iov_base =
0x55e3fd00, iov_len = 140737334859441}, {
iov_base = 0x7fffc8e0, iov_len = 140737488341248},
{iov_base = 0x55890001,
iov_len 

Bug#836339: [Pkg-mutt-maintainers] Bug#836339: mutt: segfaults shortly after tls_socket_read error on imaps

2016-09-14 Thread Antonio Radici
On Wed, Sep 14, 2016 at 11:07:44PM +0200, Samuel Hym wrote:
> reopen -1
> notfixed -1 1.7.0-4
> notfixed -1 1.7.0-5
> thanks
> 
> Hi Antonio
> 
> I reopen this bug because it was only partially fixed (or maybe I
> should open a different very similar bug?): the bug is indeed fixed
> when I’m in the index of the mailbox; but if I am in the pager,
> viewing a message, mutt still segfaults some time after
> tls_socket_read error. It is not happening right after the error,
> exactly as the mailbox was actually closed only some time after the
> error in the versions of mutt which were not segfaulting, which is why
> I think it is the same bug.

OK no problem, I also saw some reports about a segfault during IMAP sessions.



Bug#836339: [Pkg-mutt-maintainers] Bug#836339: mutt: segfaults shortly after tls_socket_read error on imaps

2016-09-14 Thread Samuel Hym
reopen -1
notfixed -1 1.7.0-4
notfixed -1 1.7.0-5
thanks

Hi Antonio

I reopen this bug because it was only partially fixed (or maybe I
should open a different very similar bug?): the bug is indeed fixed
when I’m in the index of the mailbox; but if I am in the pager,
viewing a message, mutt still segfaults some time after
tls_socket_read error. It is not happening right after the error,
exactly as the mailbox was actually closed only some time after the
error in the versions of mutt which were not segfaulting, which is why
I think it is the same bug.

Best regards
Sam



Bug#836339: [Pkg-mutt-maintainers] Bug#836339: mutt: segfaults shortly after tls_socket_read error on imaps

2016-09-01 Thread Antonio Radici
On Thu, Sep 01, 2016 at 10:48:41PM +0200, Samuel Hym wrote:
> Package: mutt
> Version: 1.7.0-1
> Severity: normal
> 
> Dear Maintainer,
> 
> I use mutt with imaps servers which like to impolitely break up
> the connexion, yielding tls_socket_read errors.
> Since the update to mutt/1.7.0-1, mutt now segfaults shortly after the
> error (after the message "Mailbox closed").
> 
> I tried to launch "mutt -d 1", "mutt -d 2", ... without any muttdebug
> file showing up so I’m fairly clueless on the best way to debug this.
> Any test I could try?

This is not good, don't worry for the debug, from your description it should be
easily reproducible.

I'll update this bug once I'm able to reproduce it