From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#15648: 24.2.50; gnutls SSL connection to IMAP server causes emacs to crash completely Date: Mon, 04 Nov 2013 19:06:48 +0200 Message-ID: <83ppqg85av.fsf@gnu.org> References: <21089.32240.198931.971000@consult.pretender> <87fvrun1pw.fsf@flea.lifelogs.com> <21093.32992.278229.646703@consult.pretender> <877gd5mo5x.fsf@flea.lifelogs.com> <21094.39055.449629.706850@consult.pretender> <21094.40085.664080.69561@consult.pretender> <21094.52645.645440.977584@consult.pretender> <21094.64459.131668.849138@consult.pretender> <21095.19949.639350.970770@consult.pretender> <83wql4hvam.fsf@gnu.org> <21096.920.835718.562924@consult.pretender> <83hac7j2a2.fsf@gnu.org> <21097.58066.940940.323995@consult.pretender> <83iowlh27q.fsf@gnu.org> <87eh79ico2.fsf_-_@flea.lifelogs.com> <83a9hxgpt1.fsf@gnu.org> <8738ncru9y.fsf@flea.lifelogs.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1383584896 1321 80.91.229.3 (4 Nov 2013 17:08:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 4 Nov 2013 17:08:16 +0000 (UTC) Cc: emacs@kosowsky.org, 15648@debbugs.gnu.org To: Ted Zlatanov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Nov 04 18:08:19 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VdNdQ-0000NL-16 for geb-bug-gnu-emacs@m.gmane.org; Mon, 04 Nov 2013 18:08:16 +0100 Original-Received: from localhost ([::1]:51132 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VdNdP-0005nX-JQ for geb-bug-gnu-emacs@m.gmane.org; Mon, 04 Nov 2013 12:08:15 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33093) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VdNdH-0005nR-NN for bug-gnu-emacs@gnu.org; Mon, 04 Nov 2013 12:08:12 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VdNdC-0006zj-Rw for bug-gnu-emacs@gnu.org; Mon, 04 Nov 2013 12:08:07 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:48628) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VdNdC-0006zf-Pr for bug-gnu-emacs@gnu.org; Mon, 04 Nov 2013 12:08:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VdNdC-0000Ba-72 for bug-gnu-emacs@gnu.org; Mon, 04 Nov 2013 12:08:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 04 Nov 2013 17:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15648 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 15648-submit@debbugs.gnu.org id=B15648.1383584823643 (code B ref 15648); Mon, 04 Nov 2013 17:08:02 +0000 Original-Received: (at 15648) by debbugs.gnu.org; 4 Nov 2013 17:07:03 +0000 Original-Received: from localhost ([127.0.0.1]:34414 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VdNcF-0000AI-6f for submit@debbugs.gnu.org; Mon, 04 Nov 2013 12:07:03 -0500 Original-Received: from mtaout21.012.net.il ([80.179.55.169]:55843) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VdNcC-00009l-MF for 15648@debbugs.gnu.org; Mon, 04 Nov 2013 12:07:01 -0500 Original-Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0MVR003000NPRC00@a-mtaout21.012.net.il> for 15648@debbugs.gnu.org; Mon, 04 Nov 2013 19:06:54 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MVR003010VGUJ00@a-mtaout21.012.net.il>; Mon, 04 Nov 2013 19:06:53 +0200 (IST) In-reply-to: <8738ncru9y.fsf@flea.lifelogs.com> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:79977 Archived-At: > From: Ted Zlatanov > Cc: emacs@kosowsky.org, 15648@debbugs.gnu.org > Date: Mon, 04 Nov 2013 11:44:41 -0500 > > EZ> If so, perhaps the problem is that we leave the process object > EZ> marked as a GnuTLS process, but with a NULL state? Should we remove > EZ> the mark, or maybe delete the process object in gnutls-negotiate? > >> > >> I would abort with a message like any other error. > > EZ> Maybe you should install a change that does that, and see if it solves > EZ> the problem. > > You mean like this? Something like that, yes. > Should I have a special check for "gnutls_p is set but gnutls_state > is NULL"? That's what this patch does, doesn't it? Or did I misunderstand you? > EZ> We _begin_ by setting gnutls_state to NULL. What could possibly > EZ> happen is that we somehow let the process object with a NULL state > EZ> escape from the initialization step, and then > EZ> wait_reading_process_output stumbles on it and tries to use it, > EZ> because the gnutls_p flag is also set right at the beginning. > > EZ> How about if we set the gnutls_p flag only when the whole > EZ> initialization succeeds completely? It's only then that the process > EZ> is ready to be used in conjunction with GnuTLS, isn't it? > > You're absolutely right. Can you check if this patch is good? It looks > OK to me. It compiles fine. But since I cannot reproduce the original problem, I'd ask the OP to please see if this fixes that problem. Thanks.