Subject: bug#16161: 24.3.50; gnutls connections from Gnus no longer work after r115526

From: Nix <[email-masked]>
Date: Mon, 16 Dec 2013 12:33:38 +0000

Start Emacs with a Gmail mailbox as a foreign server (though I also see
failures with e.g. my work mailbox, so I suspect any SSL connection will
fail).

You are told 'cannot open server due to (wrong-type-argument listp
nil))'. Editing out the condition-case in gnus-open-server reveals the
backtrace below. I suspect the problem is the CHECK_LIST_CONS() in
gnutls-boot, which demands that verify-error is a cons, thus non-nil,
but I'm too unfamiliar with the code to be sure. I'll try diking it out
and see what happens.

gnutls-boot(#<process *nnimap*<1>> gnutls-x509pki (:priority "NORMAL" :hostname "imap.gmail.com" :loglevel 0 :min-prime-bits 256 :trustfiles ("/etc/ssl/ca-bundle.pem") :crlfiles nil :keylist nil :verify-flags nil :verify-error nil :callbacks nil))
  gnutls-negotiate(:process #<process *nnimap*<1>> :type gnutls-x509pki :hostname "imap.gmail.com")
  open-gnutls-stream("*nnimap*" #<buffer  *nnimap imap.gmail.com nil  *nntpd**-651747> "imap.gmail.com" "993")
  network-stream-open-tls("*nnimap*" #<buffer  *nnimap imap.gmail.com nil  *nntpd**-651747> "imap.gmail.com" "993" (:type ssl :return-list t :shell-command "ssh %s imapd" :capability-command "1 CAPABILITY\n" :end-of-command "\n" :success " OK " :starttls-function #[(capabilities) "\302\303\304\305#)\266\203\205\306\207" [capabilities inhibit-changing-match-data "STARTTLS" nil t string-match "1 STARTTLS\n"] 7]))
  open-protocol-stream("*nnimap*" #<buffer  *nnimap imap.gmail.com nil  *nntpd**-651747> "imap.gmail.com" "993" :type ssl :return-list t :shell-command "ssh %s imapd" :capability-command "1 CAPABILITY\n" :end-of-command "\n" :success " OK " :starttls-function #[(capabilities) "\302\303\304\305#)\266\203\205\306\207" [capabilities inhibit-changing-match-data "STARTTLS" nil t string-match "1 STARTTLS\n"] 7])
  nnimap-open-connection-1(#<buffer  *nntpd*>)
  nnimap-open-connection(#<buffer  *nntpd*>)
  nnimap-open-server("imap.gmail.com" ((nnimap-inbox "INBOX") (nnimap-stream ssl) (nnimap-fetch-partial-articles "text/")))
  funcall(nnimap-open-server "imap.gmail.com" ((nnimap-inbox "INBOX") (nnimap-stream ssl) (nnimap-fetch-partial-articles "text/")))
  (let* ((open-server-function (gnus-get-function gnus-command-method (quote open-server))) (result (funcall open-server-function (nth 1 gnus-command-method) (nthcdr 2 gnus-command-method))) open-offline) (if elem nil (setq elem (list gnus-command-method nil) gnus-opened-servers (cons elem gnus-opened-servers))) (setcar (cdr elem) (cond (result (if (eq open-server-function (quote nnagent-open-server)) (quote offline) (quote ok))) ((and gnus-agent (gnus-agent-method-p gnus-command-method)) (cond (gnus-server-unopen-status (setq open-offline (eq gnus-server-unopen-status ...)) gnus-server-unopen-status) ((not gnus-batch-mode) (setq open-offline t) (quote offline)) (t (quote denied)))) (t (quote denied)))) (if open-offline (let ((gnus-server-unopen-status (quote denied))) (gnus-open-server gnus-command-method)) (if (and (eq (cadr elem) (quote ok)) gnus-agent (gnus-agent-method-p gnus-command-method)) (progn (save-excursion (gnus-agent-possibly-synchronize-flags-server gnus-command-method)))) (gnus-backend-trace :opened gnus-command-method) result))
  (if (eq (nth 1 elem) (quote denied)) (progn (gnus-message 1 "Server %s previously determined to be down; not retrying" server) nil) (let* ((open-server-function (gnus-get-function gnus-command-method (quote open-server))) (result (funcall open-server-function (nth 1 gnus-command-method) (nthcdr 2 gnus-command-method))) open-offline) (if elem nil (setq elem (list gnus-command-method nil) gnus-opened-servers (cons elem gnus-opened-servers))) (setcar (cdr elem) (cond (result (if (eq open-server-function (quote nnagent-open-server)) (quote offline) (quote ok))) ((and gnus-agent (gnus-agent-method-p gnus-command-method)) (cond (gnus-server-unopen-status (setq open-offline ...) gnus-server-unopen-status) ((not gnus-batch-mode) (setq open-offline t) (quote offline)) (t (quote denied)))) (t (quote denied)))) (if open-offline (let ((gnus-server-unopen-status (quote denied))) (gnus-open-server gnus-command-method)) (if (and (eq (cadr elem) (quote ok)) gnus-agent (gnus-agent-method-p gnus-command-method)) (progn (save-excursion (gnus-agent-possibly-synchronize-flags-server gnus-command-method)))) (gnus-backend-trace :opened gnus-command-method) result)))
  (let ((elem (assoc gnus-command-method gnus-opened-servers)) (server (gnus-method-to-server-name gnus-command-method))) (if (eq (nth 1 elem) (quote denied)) (progn (gnus-message 1 "Server %s previously determined to be down; not retrying" server) nil) (let* ((open-server-function (gnus-get-function gnus-command-method (quote open-server))) (result (funcall open-server-function (nth 1 gnus-command-method) (nthcdr 2 gnus-command-method))) open-offline) (if elem nil (setq elem (list gnus-command-method nil) gnus-opened-servers (cons elem gnus-opened-servers))) (setcar (cdr elem) (cond (result (if (eq open-server-function ...) (quote offline) (quote ok))) ((and gnus-agent (gnus-agent-method-p gnus-command-method)) (cond (gnus-server-unopen-status ... gnus-server-unopen-status) (... ... ...) (t ...))) (t (quote denied)))) (if open-offline (let ((gnus-server-unopen-status (quote denied))) (gnus-open-server gnus-command-method)) (if (and (eq (cadr elem) (quote ok)) gnus-agent (gnus-agent-method-p gnus-command-method)) (progn (save-excursion (gnus-agent-possibly-synchronize-flags-server gnus-command-method)))) (gnus-backend-trace :opened gnus-command-method) result))))
  gnus-open-server((nnimap "imap.gmail.com" (nnimap-inbox "INBOX") (nnimap-stream ssl) (nnimap-fetch-partial-articles "text/")))
  gnus-get-unread-articles(nil nil nil)
  gnus-group-get-new-news(nil)
  call-interactively(gnus-group-get-new-news nil nil)
  command-execute(gnus-group-get-new-news)

In GNU Emacs 24.3.50.1 (x86_64-unknown-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2013-12-16 on spindle
Bzr revision: 115543 [email-masked]
Windowing system distributor `The X.Org Foundation', version 11.0.11402902
System LSB Version:	:core-4.1-amd64:core-4.1-noarch

Configured using:
 `configure --without-pop --without-kerberos --without-hesiod
 --without-mmdf --with-x-toolkit=lucid --with-wide-int
 --with-file-notification=inotify NO_FAST_MATH=t
 'CFLAGS=-Wstrict-overflow=1 -g -gdwarf-4 -feliminate-dwarf2-dups
 -feliminate-unused-debug-types -fvar-tracking-assignments -O2
 -D__NO_STRING_INLINES -D__NO_MATH_INLINES -D_LARGEFILE64_SOURCE'
 'CPPFLAGS=-D__NO_STRING_INLINES -D__NO_MATH_INLINES
 -D_LARGEFILE64_SOURCE' 'LDFLAGS=-Wl,--enable-new-dtags
 -Wl,--hash-style=gnu -Wl,-O1 -Wl,-z,relro ''

Important settings:
  value of $LC_COLLATE: C
  value of $LANG: en_GB.UTF-8
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Group

Minor modes in effect:
  semantic-minor-modes-format: ((:eval (if (or semantic-highlight-edits-mode semantic-show-unmatched-syntax-mode)  S)))
  gnus-topic-mode: t
  gnus-undo-mode: t
  icicle-mode: t
  minibuffer-depth-indicate-mode: t
  savehist-mode: t
  show-paren-mode: t
  global-semantic-mru-bookmark-mode: t
  global-semanticdb-minor-mode: t
  global-semantic-decoration-mode: t
  global-semantic-idle-scheduler-mode: t
  global-semantic-idle-local-symbol-highlight-mode: t
  global-semantic-idle-summary-mode: t
  global-srecode-minor-mode: t
  global-ede-mode: t
  global-auto-complete-mode: t
  global-cwarn-mode: t
  global-semantic-highlight-func-mode: t
  global-semantic-stickyfunc-mode: t
  semantic-mode: t
  compile-bookmarks-mode: t
  global-git-gutter-mode: t
  icomplete-mode: t
  Info-breadcrumbs-in-mode-line-mode: t
  global-undo-tree-mode: t
  recentf-mode: t
  mv-shell-mode: t
  timeclock-mode-line-display: t
  shell-dirtrack-mode: t
  which-function-mode: t
  winner-mode: t
  desktop-save-mode: t
  display-time-mode: t
  image-diredx-async-mode: t
  tooltip-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  column-number-mode: t
  line-number-mode: t

Recent input:
SPC C-a C-u C-SPC C-s M U S T <right> <S-up> <S-up> 
<S-up> <S-up> <S-up> <S-up> <S-up> <S-up> <S-up> <S-up> 
<S-up> <S-up> <S-up> <S-up> <S-up> <S-up> <S-up> <S-up> 
<S-up> <S-up> <S-up> <S-up> <S-up> <up> <up> <up> <up> 
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> 
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> 
<up> <up> <up> <up> <up> <up> <up> <up> <down> <down> 
<tab> C-/ <up> <up> C-c j C-e <backspace> <down> <tab> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <up> <up> <up> C-x 
C-e C-x M-b <right> <up> O <escape> : <up> <up> <return> 
<down> <up> O <right> <right> <right> <right> <right> 
<right> <right> <right> <right> <right> <right> <right> 
<up> C-x b <return> g <right> <right> <right> <right> 
<right> <right> <right> <down> <end> <home> <down> 
<right> <right> <right> <right> <right> <right> <right> 
<right> <right> <right> <right> <right> <right> <right> 
<right> <right> <right> <right> <right> <right> <right> 
<right> <right> <right> <right> <right> <right> <right> 
<right> <right> <right> <up> <home> <right> <right> 
<right> <right> <right> <right> <right> <right> <right> 
<right> <right> <right> <right> <right> <right> <right> 
<right> <right> <right> <right> <right> <right> <right> 
<right> <right> <right> <right> <right> <right> <right> 
<right> <right> <right> <right> <right> <right> <right> 
<right> C-x 5 b * G r <tab> <return> <down-mouse-1> 
<mouse-1> C-x 5 b * C-g <down-mouse-1> <mouse-1> M-x 
r e p o r t - e m a c s - b u <tab> <return> <right> 
<right> <prior> <down> <down> <down> C-x k <return> 
y e s <return> M-x <up> <return>

Recent messages:
Checking 261 files in /usr/share/emacs/24.3.50/lisp/gnus...
Checking 57 files in /usr/share/emacs/24.3.50/lisp/eshell...
Checking 70 files in /usr/share/emacs/24.3.50/lisp/erc...
Checking 48 files in /usr/share/emacs/24.3.50/lisp/emulation...
Checking 153 files in /usr/share/emacs/24.3.50/lisp/emacs-lisp...
Checking 24 files in /usr/share/emacs/24.3.50/lisp/cedet...
Checking 57 files in /usr/share/emacs/24.3.50/lisp/calendar...
Checking 87 files in /usr/share/emacs/24.3.50/lisp/calc...
Checking 91 files in /usr/share/emacs/24.3.50/lisp/obsolete...
Checking for load-path shadows...done

Load-path shadows:
/usr/share/emacs/site-lisp/.el-get/package/elpa/vline-20120108.1245/vline hides /usr/share/emacs/site-lisp/.el-get/vline/vline
/usr/share/emacs/site-lisp/.el-get/full-ack/.dir-locals hides /usr/share/emacs/site-lisp/.el-get/el-get/.dir-locals
/home/nix/lisp/defaults hides /usr/share/emacs/site-lisp/defaults
/home/nix/lisp/emacs/site-wide/site-start hides /usr/share/emacs/site-lisp/site-start
/home/nix/lisp/emacs/site-wide/default hides /usr/share/emacs/site-lisp/default
/home/nix/lisp/emacs/site-wide/scroll-in-place hides /usr/share/emacs/site-lisp/scroll-in-place
/usr/share/emacs/site-lisp/el-get/recipes/emacswiki/ange-ftp hides /usr/share/emacs/24.3.50/lisp/net/ange-ftp
/usr/share/emacs/site-lisp/.el-get/full-ack/.dir-locals hides /usr/share/emacs/24.3.50/lisp/gnus/.dir-locals
/usr/share/emacs/site-lisp/emms/tq hides /usr/share/emacs/24.3.50/lisp/emacs-lisp/tq

Features:
(shadow gnus-cite nnir emacsbug vc-bzr image-file utf-7 debug misearch
multi-isearch gnus-topic mm-archive url-http url-gw url-cache url-auth
url-handlers nndraft nnrss xml gnus-agent gnus-srvr gnus-score
score-mode nnvirtual gnus-msg gnutls nnimap parse-time utf7 nnmh
nnfolder gnus-cache bbdb-gnus bbdb-snarf netrc gnus-demon nntp
dot-gnus-mail gnus-registry registry dot-gnus-splits nnmairix nnml
mm-url smtpmail gnus-art mm-uu mml2015 mm-view mml-smime smime dig
dot-gnus-articles dot-gnus-sa background gnus-sum nnoo gnus-group
gnus-undo nnmail mail-source dot-gnus-bbdb dot-gnus-colourization tc
mail-extr gnus-start gnus-spec gnus-int gnus-range gnus-win gnus
gnus-ems nnheader el-get el-get-autoloads el-get-list-packages
el-get-notify el-get-dependencies el-get-build el-get-status
el-get-recipes el-get-byte-compile el-get-methods el-get-fossil
el-get-svn el-get-pacman el-get-github-zip el-get-github-tar
el-get-http-zip el-get-http-tar el-get-hg el-get-git-svn el-get-fink
el-get-emacswiki el-get-http el-get-emacsmirror el-get-github el-get-git
el-get-elpa el-get-darcs el-get-cvs el-get-bzr el-get-brew
el-get-builtin el-get-apt-get el-get-custom el-get-core face-remap
server epa-file epa derived epg epg-config semantic/texi tex-info
texinfo semantic/tag-file semantic/imenu semantic/sb semantic/db-file
data-debug cedet-files semantic/bovine/c semantic/decorate/include
hideif semantic/bovine/c-by semantic/lex-spp semantic/bovine/gcc
semantic/dep semantic/bovine semantic/analyze/refs semantic/analyze
semantic/sort semantic/scope semantic/analyze/fcn cc-langs generic
ede/emacs vc-git checkdoc eldoc elisp-slime-nav etags ede/dired
jka-compr compilation-recenter-end-autoloads compile-bookmarks-autoloads
fold-dwim-autoloads fringe-helper-autoloads image+-autoloads
image-dired+-autoloads iresize-autoloads inflections-autoloads
mv-shell-autoloads vline-autoloads yasnippet-bundle-autoloads
site-default two-column icicles icicles-mode bookmark+ bookmark+-key
crosshairs col-highlight vline hl-line+ hl-line bookmark+-1
bookmark+-bmu bookmark+-lit bookmark dired+ dired-x dired-aux mb-depth+
mb-depth icicles-cmd2 icicles-cmd1 icicles-mcmd doremi icicles-fn
icicles-var apropos-fn+var icicles-opt fuzzy-match el-swank-fuzzy
levenshtein fuzzy cus-theme hexrgb icicles-face dot-emacs
dot-emacs-emacs savehist xemacs-compat add-log misc init-music
network-stream starttls tls emms-volume emms-volume-amixer emms-history
emms-bookmarks emms-metaplaylist-mode emms-browser sort
emms-playlist-sort emms-last-played emms-playing-time emms-stream-info
emms-streams emms-mode-line emms-cache emms-info later-do
emms-playlist-limit emms-playlist-mode emms-player-mpd tq
emms-player-simple emms-source-playlist emms-source-file emms
emms-compat init-message-modes ede/cpp-root bbdb-expire bbdb-hooks
bbdb-com silly-mail sendmail message rfc822 mml mml-sec mm-decode
mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums
mailabbrev mail-utils gmm-utils mailheader init-time-tracking
timeclock-visualize sgml-mode url url-proxy url-privacy url-expand
url-methods url-history url-cookie url-domsuf url-util mailcap
auto-edit-substitute init-prog-modes init-prog-modes-emacs filecache
diminish paren inversion semantic/db-global semantic/symref/global
semantic/symref semantic/db-find semantic/db-ref cedet-global
semantic/mru-bookmark semantic/db-mode semantic/db
semantic/decorate/mode semantic/idle srecode/mode semantic/senator
semantic/format semantic/ctxt semantic/wisent semantic/wisent/wisent
semantic/decorate pulse srecode/insert srecode/filters srecode/args
srecode/find srecode/map srecode/ctxt semantic/tag-ls semantic/find
srecode/compile srecode/dictionary srecode/table ede/speedbar ede/files
ede ede/base ede/auto ede/source eieio-base eieio-speedbar speedbar
sb-image ezimage dframe eieio-custom auto-complete-config auto-complete
popup yasnippet-bundle dropdown-list yasnippet assoc cwarn srecode
semantic/util-modes semantic/util semantic semantic/tag semantic/lex
semantic/fw mode-local cedet htmlfontify cus-edit cus-start cus-load
compile-bookmarks compile git-gutter-fringe fringe-helper git-gutter
gtags gpicker ffap url-parse url-vars font-latex latex edmacro kmacro
tex-style tex cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles
cc-align cc-engine cc-vars cc-defs miniedit wide-n icomplete+ icomplete
menu-bar+ apropos+ apropos help-fns+ help+ frame-fns avoid easy-mmode
info+ thingatpt+ thingatpt mouse3 naked undo-tree diff site-start-load
gawd-keys finder finder-inf find-func gawd-keys-emacs gawd-navigation
ace-jump-mode gawd-mode-frobs gawd-mode-frobs-emacs windmove tramp-cache
tramp-sh recentf tree-widget wid-edit mv-shell printing ps-print ps-def
lpr uptimes bbdb timezone timeclock term disp-table ehelp tramp
tramp-compat auth-source eieio eieio-core gnus-util mm-util mail-prsvr
password-cache tramp-loaddefs trampver shell pcomplete comint ansi-color
hideshow filladapt gawd-faces gawd-faces-emacs nix-dark-theme gawd-misc
gawd-misc-emacs which-func imenu winner time-date gawd-lists
bbdb-autoloads magit-autoloads desktop frameset generic-x time
scroll-in-place site-start-emacs site-autoloads .loaddefs image-dired+
byte-opt image-dired format-spec advice warnings cl-macs gv help-mode pp
autoload help-fns lisp-mnt bytecomp byte-compile cconv cl cl-loaddefs
cl-lib dired info auctex-autoloads tex-site package emms-auto w3m-load
ring filesets easymenu flash-paren saveplace tooltip electric uniquify
ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd
fontset image regexp-opt fringe tabulated-list newcomment lisp-mode
prog-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 nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote make-network-process
dbusbind inotify dynamic-setting system-font-setting font-render-setting
x-toolkit x multi-tty emacs)

-- 
NULL && (void)