unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#15648: 24.2.50; gnutls SSL connection to IMAP server causes emacs to crash completely
@ 2013-10-18 18:29 emacs
  2013-10-18 19:38 ` Glenn Morris
  0 siblings, 1 reply; 80+ messages in thread
From: emacs @ 2013-10-18 18:29 UTC (permalink / raw)
  To: 15648

This bug report will be sent to the Bug-GNU-Emacs mailing list
and the GNU bug tracker at debbugs.gnu.org.  Please check that
the From: line contains a valid email address.  After a delay of up
to one day, you should receive an acknowledgment at that address.

Please write in English if possible, as the Emacs maintainers
usually do not have translators for other languages.

Please describe exactly what actions triggered the bug, and
the precise symptoms of the bug.  If you can, give a recipe
starting from `emacs -Q':

I am using gnutls within the vm (viewmail) mail reader (vm-version
8.2.0b) to read email over IMAP-SSL under nt Emacs 24.2.50.1 in
Windows 7

Emacs gives me the following error in the message line before immediately
crashing the entire emacs process:
GnuTLS error: #<proces IMAP over SSL>, -64

The Windows crash both then gives me the following error:
Problem signature:
  Problem Event Name:	APPCRASH
  Application Name:		emacs.exe
  Application Version:	24.2.50.0
  Application Timestamp:		5037d090
  Fault Module Name:			libgnutls-28.dll
  Fault Module Version:			0.0.0.0
  Fault Module Timestamp:		501d8392
  Exception Code:				c0000005
  Exception Offset:				0000657e
  OS Version:					6.1.7601.2.1.0.768.3
  Locale ID:					1033
  Additional Information 1:		0a9e
  Additional Information 2:		0a9e372d3b4ad19135b953a78882e789
  Additional Information 3:		0a9e
  Additional Information 4:		0a9e372d3b4ad19135b953a78882e789

I do not believe this is a problem with vm (viewmail) since all works
well when I use an external program (stunnel) to create the SSL
tunnel. The problem only happens when I use the internal GNUtls
capability to create the SSL tunnel.

Even so, it is surprising to me that the entire Emacs app crashes - I
have beena heavy Emacs user since 1984 and I don't believe I have ever
had it crash! (kudos to emacs for reliability)


Debugging wasn't easy since I needed to 'catch' it right before the
crash and set a breakpoint there. It turns out that it crashes when
evaluating the declared c-function "gnutls-boot" which is an argument
to "gnutls-message-maybe" called from the function gnutls-negotiate in
gnutls.el

  (gnutls-boot process type params)
where:
		process = #<process IMAP over SSL>
		type    = gnutls-x509pki
		params = (:priority "NORMAL" :hostname "imap.mydomain.org" :loglevel 0 :min-prime-bits 256 :trustfiles ("/usr/ssl/certs/ca-bundle.crt") :crlfiles nil :keylist nil :verify-flags nil :verify-error nil :verify-hostname-error nil :callbacks nil)
  
  (gnutls-boot gnutls-x509pki

Here is what I got from the Emacs debugger:

* (gnutls-boot process type params)
* (setq ret (gnutls-boot process type params))
* (gnutls-message-maybe (setq ret (gnutls-boot process type params)) "boot: %s" params)
  (let* ((type (or type (quote gnutls-x509pki))) (trustfiles (or trustfiles (delq nil (mapcar (lambda (f) (and f ... f)) (if (functionp gnutls-trustfiles) (funcall gnutls-trustfiles) gnutls-trustfiles))))) (priority-string (or priority-string (cond ((eq type (quote gnutls-anon)) "NORMAL:+ANON-DH:!ARCFOUR-128") ((eq type (quote gnutls-x509pki)) (if gnutls-algorithm-priority (upcase gnutls-algorithm-priority) "NORMAL"))))) (min-prime-bits (or min-prime-bits gnutls-min-prime-bits)) (params (\` (:priority (\, priority-string) :hostname (\, hostname) :loglevel (\, gnutls-log-level) :min-prime-bits (\, min-prime-bits) :trustfiles (\, trustfiles) :crlfiles (\, crlfiles) :keylist (\, keylist) :verify-flags (\, :min-prime-bits (\, min-prime-bits) :trustfiles (\, trustfiles) :crlfiles (\, crlfiles) :keylist (\, keylist) :verify-flags (\, verify-flags) :verify-error (\, verify-error) :verify-hostname-error (\, verify-hostname-error) :callbacks nil))) ret) (edebug) (gnutls-message-maybe (setq ret (gnutls-boot process type params)) "boot: %s" params) (when (gnutls-errorp ret) (signal (quote gnutls-error) (list process ret))) process))
  (cl--block-wrapper (catch (quote --cl-block-gnutls-negotiate--) (let* ((type (or type (quote gnutls-x509pki))) (trustfiles (or trustfiles (delq nil (mapcar ... ...)))) (priority-string (or priority-string (cond (... "NORMAL:+ANON-DH:!ARCFOUR-128") (... ...)))) (min-prime-bits (or min-prime-bits gnutls-min-prime-bits)) (params (\` (:priority (\, priority-string) :hostname (\, hostname) :loglevel (\, gnutls-log-level) :min-prime-bits (\, min-prime-bits) :trustfiles (\, trustfiles) :crlfiles (\, crlfiles) :keylist (\, keylist) :verify-flags (\, verify-flags) :verify-error (\, verify-error) :verify-hostname-error (\, verify-hostname-error) :callbacks nil))) ret) (edebug) (gnutls-message-maybe (setq ret (gnutls-boot process type params)) "boot: %s" params) (when (gnutls-errorp ret) (signal (quote gnutls-error) (list process ret))) process)))
  (cl-block gnutls-negotiate (let* ((type (or type (quote gnutls-x509pki))) (trustfiles (or trustfiles (delq nil (mapcar (lambda ... ...) (if ... ... gnutls-trustfiles))))) (priority-string (or priority-string (cond ((eq type ...) "NORMA spec)))) (hostname (car (cdr (memq (quote :hostname) spec)))) (priority-string (car (cdr (memq (quote :priority-string) spec)))) (trustfiles (car (cdr (memq (quote :trustfiles) spec)))) (crlfiles (car (cdr (memq (quote :crlfiles) spec)))) (keylist (car (cdr (memq (quote :keylist) spec)))) (min-prime-bits (car (cdr (memq (quote :min-prime-bits) spec)))) (verify-flags (car (cdr (memq (quote :verify-flags) spec)))) (verify-error (car (cdr (memq (quote :verify-error) spec)))) (verify-hostname-error (car (cdr (memq (quote :verify-hostname-error) spec))))) (cl-block gnutls-negotiate (let* ((type (or  gnutls-negotiate(:process #<process IMAP over SSL> :type gnutls-x509pki :hostname "imap.mydomain.org")
  open-gnutls-stream("IMAP over SSL" #<buffer trace of IMAP over SSL session to imap.mydomain.org at 14:12:31> "imap.mydomain.org" 993)
  funcall(open-gnutls-stream "IMAP over SSL" #<buffer trace of IMAP over SSL session to ko  (  (  (with-  network-stream-open-tls("IMAP over SSL" #<buffer trace of IMAP over SSL session to imap.mydomain.org at 14:12:31> "imap.mydomain.org" 993 (:type tls))
  funcall(network-stream-open-tls "IMAP over SSL" #<buffer trace of IMAP over SSL session   (unwind-pr  (let ((work-buffer (or buffer (generate-new-buffer " *stream buffer*"))) (fun (cond ((and (e  (if (and (not return-list) (or (eq  (let ((type (plist-get parameters :type)) (return-list (plist-get parameters :return-list))) (if (and (not return-list) (or (eq type (quote plain)) (an  open-network-stream("IMAP over SSL" #<buffer trace of IMAP over SSL session to imap.mydomain.org at 14:12:31> "  byte-code("203+L:+ANON-DH:!ARCFOUR-128") ((eq type ...) (if gnutls-algorithm-priority ... "NORMAL"))))) (min-prime-bits (or min-prime-bits gnutls-min-prime-bits)) (params (\` (:priority (\, priority-string) :hostname (\, hostname) :loglevel (\, gnutls-log-level) :min-prime-bits (\, min-prime-bits) :trustfiles (\, trustfiles) :crlfiles (\, crlfiles) :keylist (\, keylist) :verify-flags (\, verify-flags) :verify-error (\, verify-error) :verify-hostname-error (\, verify-hostname-error) :callbacks nil))) ret) (edebug) (gnutls-message-maybe (setq ret (gnutls-boot process type params)) "boot: %s" params) (when (gnutls-errorp ret) (signal (quote gnutls-error) (list process ret))) process))
  (let* ((process (car (cdr (memq (quote :process) spec)))) (type (car (cdr (memq (quote :type) verify-flags) :verify-error (\, verify-error) :verify-hostname-error (\, verify-hostname-error) :callbacks nil))) ret) (edebug) (gnutls-message-maybe (setq ret (gnutls-boot process type params)) "boot: %s" params) (when (gnutls-errorp ret) (signal (quote gnutls-error) (list process ret))) process)
  (catch (quote --cl-block-gnutls-negotiate--) (let* ((type (or type (quote gnutls-x509pki))) (trustfiles (or trustfiles (delq nil (mapcar (lambda ... ...) (if ... ... gnutls-trustfiles))))) (priority-string (or priority-string (cond ((eq type ...) "NORMAL:+ANON-DH:!ARCFOUR-128") ((eq type ...) (if gnutls-algorithm-priority ... "NORMAL"))))) (min-prime-bits (or min-prime-bits gnutls-min-prime-bits)) (params (\` (:priority (\, priority-string) :hostname (\, hostname) :loglevel (\, gnutls-log-level)

----------------------------------

If Emacs crashed, and you have the Emacs process in the gdb debugger,
please include the output from the following gdb commands:
    `bt full' and `xbacktrace'.
For information about debugging Emacs, please read the file
c:/MyPrograms/Emacs/etc/DEBUG.


In GNU Emacs 24.2.50.1 (i386-mingw-nt6.1.7601)
 of 2012-08-24 on YAMALOK
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --with-gcc (4.7) --cflags -m32 -O2 -g0 -march=prescott
 -mtune=prescott -pipe -IC:/gnuwin32/emacs/include
 -IC:/gnuwin32/emacs/lib -IC:/gnuwin32/src -IC:/gnutls/include
 -IC:/gnutls/lib -IC:/gnutls/bin -IC:/libxml2/include -IC:/libxml2/lib
 -IC:/libxml2/bin --ldflags '

Important settings:
  value of $LANG: ENU
  locale-coding-system: cp1252
  default enable-multibyte-characters: t

Major mode: VM Summary

Minor modes in effect:
  display-time-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
<help-echo> <escape> x r e p <tab> o r <tab> <return> 
s t u n n e l SPC <backspace> <backspace> <backspace> 
<backspace> <backspace> <backspace> <backspace> <backspace> 
<backspace> <backspace> SPC <backspace> <backspace> 
<down-mouse-1> <mouse-1> C-h f g n u t <tab> <tab> 
<tab> a v a i <tab> <return> <help-echo> <help-echo> 
<down-mouse-1> <mouse-2> C-h C-g <escape> x C-g <C-down-mouse-1> 
<drag-mouse-1> <escape> x v m <return> C-g C-h f v 
m <backspace> m <backspace> m - - s t <tab> u <tab> 
<tab> C-g C-h v v m - s t <tab> u <tab> p <tab> <return> 
C-p <escape> x e m a c s = r <backspace> <backspace> 
- r e p <tab> <backspace> <backspace> <backspace> <backspace> 
<backspace> <backspace> <backspace> <backspace> <backspace> 
r e p o <tab> r t - e m <tab> <return>

Recent messages:
c:/myname/bin/qp-decode.exe exited non-zero (code 123)
Parsing BBDB... (frobnicating...done)
inbox: Checking for new mail...
Decrypting c:/myname/emacs/.authinfo.gpg...0%
Opening input file: Can't decrypt, Cancelled; Exit
Making completion list... [2 times]
Quit
Making completion list...
Type "q" in help window to restore its previous buffer.
Making completion list...

Load-path shadows:
None found.

Features:
(shadow sort pp vm-save tapestry vm-crypto vm-imap jjk-vm dired
vm-mime-display-internal-application vm-ps-print bbdb-vm vm-autoload
bbdb-snarf mail-extr bbdb-autoloads bbdb-hooks bbdb-com cl cl-lib vcard
vm-vcard vm-pine smtpmail bbdb timezone vm-rfaddons vm-menu vm-window
vm-toolbar vm-folder vm-mime vm-undo vm-virtual vm-summary-faces
vm-summary vm-mouse vm-page vm-motion vm-minibuf vm-message vm-misc
vm-macro vm-autoloads vm-vars vm-version vm find-func emacsbug message
idna format-spec rfc822 mml mml-sec mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047
rfc2045 ietf-drums mail-utils help-mode easymenu jjk-comments jjk-load
ps-print ps-def lpr jjk-print ibm-keymaps jjk-frames jjk-hooks
jjk-keymaps ehelp electric uniquify warnings arc-mode archive-mode
jjk-lib epa-file epa derived epg epg-config advice help-fns
advice-preload auth-source eieio byte-opt bytecomp byte-compile cconv
macroexp gnus-util mm-util mail-prsvr password-cache cygwin-mount
ange-ftp comint ansi-color ring server time time-date tooltip ediff-hook
vc-hooks lisp-float-type mwheel dos-w32 disp-table ls-lisp w32-win
w32-vars tool-bar dnd fontset image regexp-opt fringe tabulated-list
newcomment lisp-mode register page menu-bar rfn-eshadow timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham
georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese hebrew greek romanian slovak czech european ethiopic
indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple
abbrev minibuffer button faces cus-face files text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process multi-tty emacs)

^ permalink raw reply	[flat|nested] 80+ messages in thread

end of thread, other threads:[~2013-11-12 18:08 UTC | newest]

Thread overview: 80+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-18 18:29 bug#15648: 24.2.50; gnutls SSL connection to IMAP server causes emacs to crash completely emacs
2013-10-18 19:38 ` Glenn Morris
2013-10-20 20:24   ` emacs
2013-10-21 14:22   ` bug#15648: 24.2.50; gnutls SSL connection to IMAP server causes emacs to crash completely, " Ted Zlatanov
2013-10-21 19:30     ` emacs
2013-10-22 13:27       ` Ted Zlatanov
2013-10-22 15:23         ` emacs
2013-10-22 15:41           ` emacs
2013-10-22 19:10             ` emacs
2013-10-22 20:06               ` Ted Zlatanov
2013-10-22 20:22                 ` emacs
2013-10-22 20:34                   ` Eli Zaretskii
2013-10-22 22:27               ` emacs
2013-10-23  2:51                 ` Eli Zaretskii
2013-10-23  4:17                 ` emacs
2013-10-23 14:52                   ` Ted Zlatanov
2013-10-23 17:25                     ` emacs
2013-10-23 18:07                       ` Eli Zaretskii
2013-10-23 18:58                         ` Ted Zlatanov
2013-10-23 23:45                           ` emacs
2013-10-24  0:13                             ` emacs
2013-10-24 10:59                             ` Ted Zlatanov
2013-10-24 14:10                               ` emacs
2013-10-24 15:48                                 ` Ted Zlatanov
2013-10-24 17:02                                   ` emacs
2013-10-24 17:57                                 ` Stefan Monnier
2013-10-24 18:42                                   ` emacs
2013-10-25  0:59                                     ` Stefan Monnier
2013-10-25 13:59                                       ` emacs
2013-10-26  1:52                                         ` Stefan Monnier
2013-10-29  5:13                                           ` emacs
2013-11-03 11:42                                           ` Ted Zlatanov
2013-11-03 15:12                                             ` emacs
2013-11-03 17:32                                               ` Eli Zaretskii
2013-11-03 19:12                                                 ` emacs
2013-11-04 16:28                                                 ` Ted Zlatanov
2013-11-04 16:58                                                   ` Eli Zaretskii
2013-11-11 19:12                                                     ` emacs
2013-11-11 19:42                                                       ` Ted Zlatanov
2013-11-11 20:00                                                         ` emacs
2013-11-11 20:00                                                         ` Achim Gratz
2013-11-11 23:58                                                           ` Ted Zlatanov
2013-11-12  0:45                                                             ` emacs
2013-11-11 20:06                                                       ` Eli Zaretskii
2013-11-11 21:53                                                         ` emacs
2013-11-12  3:56                                                           ` Eli Zaretskii
2013-11-12 15:19                                                             ` emacs
2013-11-12 17:42                                                               ` Eli Zaretskii
     [not found]                                                               ` <<83ppq51pq8.fsf@gnu.org>
2013-11-12 18:08                                                                 ` Drew Adams
2013-11-03 21:37                                             ` Stefan Monnier
2013-10-23 15:16                   ` bug#15648: 24.2.50; gnutls SSL connection to IMAP server causes emacs to crash completely, " Eli Zaretskii
2013-10-23 17:12                     ` emacs
2013-10-23 18:00                       ` Eli Zaretskii
2013-10-23 19:49                         ` emacs
2013-10-24  2:46                           ` Eli Zaretskii
2013-10-25  3:17                         ` emacs
2013-10-25 14:09                           ` Eli Zaretskii
2013-10-25 15:38                             ` Ted Zlatanov
2013-10-25 18:37                               ` Eli Zaretskii
2013-11-03 17:30                                 ` Eli Zaretskii
2013-11-04 16:44                                 ` Ted Zlatanov
2013-11-04 17:06                                   ` Eli Zaretskii
2013-11-04 18:05                                     ` Ted Zlatanov
2013-11-04 22:14                                       ` emacs
2013-11-05  2:30                                         ` Ted Zlatanov
2013-11-05 23:11                                           ` emacs
2013-11-05 23:16                                             ` Alp Aker
2013-11-05 23:54                                               ` emacs
2013-11-11 15:53                                                 ` Ted Zlatanov
2013-11-11 19:40                                                   ` emacs
2013-11-11 20:11                                                     ` Eli Zaretskii
2013-11-11 21:56                                                       ` emacs
2013-11-12  3:58                                                         ` Eli Zaretskii
2013-11-12 15:23                                                           ` emacs
2013-11-06  3:51                                             ` Eli Zaretskii
2013-11-06  5:45                                               ` emacs
2013-10-22 15:43         ` bug#15648: 24.2.50; gnutls SSL connection to IMAP server causes emacs to crash completely, " Eli Zaretskii
2013-10-22 20:03           ` Ted Zlatanov
2013-10-22 20:35           ` Andy Moreton
2013-10-22 20:45             ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.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).