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

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

[debbugs-tracker] bug#15648: closed (24.2.50; gnutls SSL connection to I


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#15648: closed (24.2.50; gnutls SSL connection to IMAP server causes emacs to crash completely)
Date: Mon, 11 Nov 2013 20:12:02 +0000

Your message dated Mon, 11 Nov 2013 22:11:19 +0200
with message-id <address@hidden>
and subject line Re: bug#15648: 24.2.50; gnutls SSL connection to IMAP server 
causes emacs to crash completely
has caused the debbugs.gnu.org bug report #15648,
regarding 24.2.50; gnutls SSL connection to IMAP server causes emacs to crash 
completely
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
15648: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=15648
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 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)

--- End Message ---
--- Begin Message --- Subject: Re: bug#15648: 24.2.50; gnutls SSL connection to IMAP server causes emacs to crash completely Date: Mon, 11 Nov 2013 22:11:19 +0200
> From: <address@hidden>
> Date: Mon, 11 Nov 2013 14:40:29 -0500
> Cc: Alp Aker <address@hidden>, address@hidden,
>       address@hidden
> 
> I tested it against the November 6th build.
> 
> It seems to work in the sense that now instead of crashing emacs,
> gnutls just throws me into the emacs debugger:
> 
> Debugger entered--Lisp error: (gnutls-error #<process tls> -64)
>   signal(gnutls-error (#<process tls> -64))
>   gnutls-negotiate(:process #<process tls> :type gnutls-x509pki
>   :hostname "imap.gmail.com")
>   open-gnutls-stream("tls" "tls-buffer" "imap.gmail.com" "imaps")
>   eval-region(19 83 t #[257 "\300\242b\210\301\207" [(83)
>   (open-gnutls-stream "tls" "tls-buffer" "imap.gmail.com" "imaps")] 2
>   "\n\n(fn IGNORE)"])  ; Reading at buffer position 83
>   eval-defun-2()
>   eval-defun(nil)
>   call-interactively(eval-defun nil nil)
>   command-execute(eval-defun)

Thank you.  So I consider this bug resolved, and I'm closing it.

> Presumably, this error is due to the fact that
> "/usr/ssl/certs/ca-bundle.crt" is not a valid file on Cygwin (despite
> the comment in gnutls.el implying that it is!)

No, this is because "/usr/ssl/certs/ca-bundle.crt" _is_ a valid Cygwin
file name, but you are not running a Cygwin build of Emacs, where it
would be valid.

> Of course, it all works fine with the elisp patch that I had
> previously submitted.

You are free to use that patch, if it suits your needs.  This is Free
Software.

> So, now that the bug that crashes the emacs process has been fixed,
> perhaps it's time to make gnutls-trustfiles actually work under
> cygwin.

They already work under Cygwin.  You probably mean cygwin-mount.el,
which is an incomplete and imperfect way of sneaking Cygwin file names
into a native Windows build of Emacs and pretending they work.

> So, there remains a fundamental incompatibility between cygwin-mount
> and gnutls.el.

Actually, there's a fundamental incompatibility between cygwin-mount
and a native build of Emacs.  Just say no.


--- End Message ---

reply via email to

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