bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#15648: 24.2.50; gnutls SSL connection to IMAP server causes emacs to


From:
Subject: bug#15648: 24.2.50; gnutls SSL connection to IMAP server causes emacs to crash completely
Date: Fri, 18 Oct 2013 14:29:04 -0400

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)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]