GNU bug report logs -
#8963
24.0.50; gnus-no-server tries to connect to IMAP server
Previous Next
Reported by: Daiki Ueno <ueno <at> unixuser.org>
Date: Thu, 30 Jun 2011 07:00:05 UTC
Severity: normal
Tags: fixed
Found in version 24.0.50
Fixed in version 24.1
Done: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 8963 in the body.
You can then email your comments to 8963 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#8963
; Package
emacs
.
(Thu, 30 Jun 2011 07:00:05 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Daiki Ueno <ueno <at> unixuser.org>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Thu, 30 Jun 2011 07:00:05 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
I have been using M-x gnus-no-server to reduce Gnus startup time when
using it off-line. However, the current Gnus always tries to connect to
all the known servers on startup. Here is my configuration (host names
are masked):
(setq gnus-select-method '(nnnil "")
gnus-secondary-select-methods
'((nnimap "a"
(nnimap-address "a.example.org")
(nnimap-username "daiki")
(nnir-search-engine imap))
(nnimap "b"
(nnimap-address "b.example.com")
(nnimap-username "dueno")
(nnir-search-engine imap))))
Here is the log:
Reading /home/ueno/.newsrc.eld...
Checking new news...
Reading active file via nnnil...done
Reading active file from a via nnimap...
Opening nnimap server on a...
Opening connection to a.example.org via tls...
Opening nnimap server on a...done
Reading active file from a via nnimap...done
Reading active file from b via nnimap...
Opening nnimap server on b...
Opening connection to b.example.com via tls...
Opening nnimap server on b...done
Reading active file from b via nnimap...done
Reading active file via nndraft...done
Checking new news...done
In GNU Emacs 24.0.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.0.11)
of 2011-06-30 on localhost.localdomain
Windowing system distributor `Fedora Project', version 11.0.11002000
configured using `configure '--with-x-toolkit=gtk3''
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: nil
value of $LC_CTYPE: nil
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: en_US.UTF-8
value of $XMODIFIERS: @im=ibus
locale-coding-system: utf-8-unix
default enable-multibyte-characters: t
Major mode: Group
Minor modes in effect:
gnus-topic-mode: t
gnus-undo-mode: t
which-function-mode: t
recentf-mode: t
iswitchb-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
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:
<escape> x g n u s SPC n o SPC SPC <return> y <escape>
x r e p o r t SPC e m <tab> <return>
Recent messages:
Reading active file from daiki via nnimap...done
Reading active file from redhat via nnimap...
Opening nnimap server on redhat...
Opening connection to mail.corp.redhat.com via tls...
Opening nnimap server on redhat...done
Reading active file from redhat via nnimap...done
Reading active file via nndraft...done
Checking new news...done
No Gnus is good news
No more unread newsgroups
Load-path shadows:
~/.emacs.d/custom hides /usr/local/share/emacs/24.0.50/lisp/custom
~/.emacs.d/socks hides /usr/local/share/emacs/24.0.50/lisp/net/socks
Features:
(shadow sort gnus-cite flyspell ispell mail-extr emacsbug gnus-topic
nndraft nnmh utf-7 plstore epg gnutls network-stream auth-source eieio
byte-opt bytecomp byte-compile cconv assoc starttls nnimap parse-time
tls utf7 netrc nnnil gnus-agent gnus-srvr gnus-score score-mode
nnvirtual gnus-msg gnus-art mm-uu mml2015 epg-config mm-view mml-smime
smime password-cache dig mailcap nntp gnus-cache nnir gnus-sum macroexp
gnus-group gnus-undo nnmail mail-source nnoo gnus-start gnus-spec
gnus-int gnus-range message sendmail regexp-opt format-spec rfc822 mml
mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045
ietf-drums mailabbrev gmm-utils mailheader gnus-win gnus gnus-ems
nnheader gnus-util time-date mail-utils mm-util mail-prsvr uniquify
advice help-fns advice-preload deal which-func imenu recentf tree-widget
wid-edit easymenu iswitchb cus-start cus-load tooltip ediff-hook
vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image
fringe 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 loaddefs 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 dbusbind
dynamic-setting system-font-setting font-render-setting move-toolbar gtk
x-toolkit x multi-tty emacs)
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org
:
bug#8963
; Package
emacs,gnus
.
(Thu, 30 Jun 2011 16:57:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 8963 <at> debbugs.gnu.org (full text, mbox):
Daiki Ueno <ueno <at> unixuser.org> writes:
> I have been using M-x gnus-no-server to reduce Gnus startup time when
> using it off-line. However, the current Gnus always tries to connect to
> all the known servers on startup. Here is my configuration (host names
> are masked):
>
> (setq gnus-select-method '(nnnil "")
> gnus-secondary-select-methods
> '((nnimap "a"
> (nnimap-address "a.example.org")
> (nnimap-username "daiki")
> (nnir-search-engine imap))
> (nnimap "b"
> (nnimap-address "b.example.com")
> (nnimap-username "dueno")
> (nnir-search-engine imap))))
What `gnus-no-server' does is start Gnus on level 2 instead of the
default level 5 level. So if you have groups on level 1 and 2,
`gnus-no-server' will still contact the servers with groups on those
levels.
Is that the case?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog http://lars.ingebrigtsen.no/
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org
:
bug#8963
; Package
emacs,gnus
.
(Fri, 01 Jul 2011 01:46:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 8963 <at> debbugs.gnu.org (full text, mbox):
Lars Magne Ingebrigtsen <lmi <at> gnus.org> writes:
>> (setq gnus-select-method '(nnnil "")
>> gnus-secondary-select-methods
>> '((nnimap "a"
>> (nnimap-address "a.example.org")
>> (nnimap-username "daiki")
>> (nnir-search-engine imap))
>> (nnimap "b"
>> (nnimap-address "b.example.com")
>> (nnimap-username "dueno")
>> (nnir-search-engine imap))))
>
> What `gnus-no-server' does is start Gnus on level 2 instead of the
> default level 5 level. So if you have groups on level 1 and 2,
> `gnus-no-server' will still contact the servers with groups on those
> levels.
I'm not sure that gnus-secondary-select-methods actually works, but Gnus
in Emacs 23 (or earlier) doesn't contact to the server even if I have
the above gnus-secondary-select-methods setting.
My understanding is that levels are per-group and not per-server, and
all groups defined in ~/.newsrc.eld have level 3. So I'm wondering
which group Gnus is trying to open.
Regards,
--
Daiki Ueno
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org
:
bug#8963
; Package
emacs,gnus
.
(Fri, 01 Jul 2011 10:15:03 GMT)
Full text and
rfc822 format available.
Message #14 received at 8963 <at> debbugs.gnu.org (full text, mbox):
Daiki Ueno <ueno <at> unixuser.org> writes:
> My understanding is that levels are per-group and not per-server, and
> all groups defined in ~/.newsrc.eld have level 3. So I'm wondering
> which group Gnus is trying to open.
Could you try to `M-x debug-on-entry RET nntp-open-server RET'? The
backtrace should then possibly tell you what group is triggering this.
The code to retrieve the startup data has been totally reworked in No
Gnus, and there may be use cases that I don't have that's triggering
this buggy behaviour.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog http://lars.ingebrigtsen.no/
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org
:
bug#8963
; Package
emacs,gnus
.
(Sat, 02 Jul 2011 05:43:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 8963 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Lars Magne Ingebrigtsen <larsi <at> gnus.org> writes:
>> My understanding is that levels are per-group and not per-server, and
>> all groups defined in ~/.newsrc.eld have level 3. So I'm wondering
>> which group Gnus is trying to open.
>
> Could you try to `M-x debug-on-entry RET nntp-open-server RET'? The
> backtrace should then possibly tell you what group is triggering this.
Sure, please find below the backtrace. I did (1) load gnus-int.el and
nnimap.el, (2) M-x debug-on-entry RET nnimap-open-server RET, and M-x
gnus-no-server. There seems no specific group appeared in the log.
[nnimap-open-server.txt (text/plain, inline)]
Debugger entered--entering a function:
nnimap-open-server("a" ((nnimap-address "a.example.org")))
* funcall(nnimap-open-server "a" ((nnimap-address "a.example.org")))
(condition-case err (funcall open-server-function (nth 1 gnus-command-method) (nthcdr 2 gnus-command-method)) (error (gnus-message 1 "Unable to open server %s due to: %s" server (error-message-string err)) nil) (quit (if debug-on-quit (debug "Quit") (gnus-message 1 "Quit trying to open server %s" server)) nil))
(let* ((open-server-function (gnus-get-function gnus-command-method (quote open-server))) (result (condition-case err (funcall open-server-function (nth 1 gnus-command-method) (nthcdr 2 gnus-command-method)) (error (gnus-message 1 "Unable to open server %s due to: %s" server (error-message-string err)) nil) (quit (if debug-on-quit (debug "Quit") (gnus-message 1 "Quit trying to open server %s" server)) nil))) open-offline) (unless elem (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 (function 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)) (when (and (eq (cadr elem) (quote ok)) gnus-agent (gnus-agent-method-p gnus-command-method)) (save-excursion (gnus-agent-possibly-synchronize-flags-server gnus-command-method))) result))
(if (eq (nth 1 elem) (quote denied)) (progn (gnus-message 1 "Denied server %s" server) nil) (let* ((open-server-function (gnus-get-function gnus-command-method (quote open-server))) (result (condition-case err (funcall open-server-function (nth 1 gnus-command-method) (nthcdr 2 gnus-command-method)) (error (gnus-message 1 "Unable to open server %s due to: %s" server (error-message-string err)) nil) (quit (if debug-on-quit (debug "Quit") (gnus-message 1 "Quit trying to open server %s" server)) nil))) open-offline) (unless elem (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 (function 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)) (when (and (eq (cadr elem) (quote ok)) gnus-agent (gnus-agent-method-p gnus-command-method)) (save-excursion (gnus-agent-possibly-synchronize-flags-server 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 "Denied server %s" server) nil) (let* ((open-server-function (gnus-get-function gnus-command-method (quote open-server))) (result (condition-case err (funcall open-server-function (nth 1 gnus-command-method) (nthcdr 2 gnus-command-method)) (error (gnus-message 1 "Unable to open server %s due to: %s" server ...) nil) (quit (if debug-on-quit ... ...) nil))) open-offline) (unless elem (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)) (when (and (eq (cadr elem) (quote ok)) gnus-agent (gnus-agent-method-p gnus-command-method)) (save-excursion (gnus-agent-possibly-synchronize-flags-server gnus-command-method))) result))))
gnus-open-server((nnimap "a" (nnimap-address "a.example.org")))
(setq result (gnus-open-server method))
(prog1 (setq result (gnus-open-server method)) (unless silent (gnus-message (if result 5 3) "Opening %s server%s...%s" (car method) (if (equal (nth 1 method) "") "" (format " on %s" (nth 1 method))) (if result "done" (format "failed: %s" (nnheader-get-report-string (car method)))))))
(if (gnus-server-opened method) t (unless silent (gnus-message 5 "Opening %s server%s..." (car method) (if (equal (nth 1 method) "") "" (format " on %s" (nth 1 method))))) (gnus-run-hooks (quote gnus-open-server-hook)) (prog1 (setq result (gnus-open-server method)) (unless silent (gnus-message (if result 5 3) "Opening %s server%s...%s" (car method) (if (equal (nth 1 method) "") "" (format " on %s" (nth 1 method))) (if result "done" (format "failed: %s" (nnheader-get-report-string (car method))))))))
(let ((method (or method gnus-select-method)) result) (when (stringp method) (setq method (gnus-server-to-method method))) (if (gnus-server-opened method) t (unless silent (gnus-message 5 "Opening %s server%s..." (car method) (if (equal (nth 1 method) "") "" (format " on %s" (nth 1 method))))) (gnus-run-hooks (quote gnus-open-server-hook)) (prog1 (setq result (gnus-open-server method)) (unless silent (gnus-message (if result 5 3) "Opening %s server%s...%s" (car method) (if (equal (nth 1 method) "") "" (format " on %s" (nth 1 method))) (if result "done" (format "failed: %s" (nnheader-get-report-string ...))))))))
gnus-check-server((nnimap "a" (nnimap-address "a.example.org")))
gnus-read-active-file-1((nnimap "a" (nnimap-address "a.example.org")) nil)
gnus-get-unread-articles(2)
gnus-setup-news(nil 2 t)
byte-code("\204 \204 \306 \210\202L \307\310!\210\311\n!\f\204
\203! \312 \210\313\314#\210\307\315!\210\2036 \316\317\320\"\210\321 \210\322!\210\323 \210\324\325!\210\326 \210\307\327!\210\314\207" [dont-connect did-connect gnus-startup-file gnus-current-startup-file gnus-slave gnus-use-dribble-file gnus-group-quit gnus-run-hooks gnus-startup-hook gnus-make-newsrc-file gnus-dribble-read-file gnus-setup-news nil gnus-setup-news-hook gnus-request-create-group "queue" (nndraft "") gnus-start-draft-setup gnus-group-list-groups gnus-group-first-unread-group gnus-configure-windows group gnus-group-set-mode-line gnus-started-hook level gnus-agent] 4)
gnus-1(2 t nil)
gnus(2 t nil)
gnus-no-server-1(nil nil)
gnus-no-server(nil)
call-interactively(gnus-no-server t nil)
execute-extended-command(nil)
call-interactively(execute-extended-command nil nil)
[Message part 3 (text/plain, inline)]
Regards,
--
Daiki Ueno
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org
:
bug#8963
; Package
emacs,gnus
.
(Tue, 05 Jul 2011 06:00:04 GMT)
Full text and
rfc822 format available.
Message #20 received at 8963 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Daiki Ueno <ueno <at> unixuser.org> writes:
> gnus-read-active-file-1((nnimap "a" (nnimap-address "a.example.org")) nil)
> gnus-get-unread-articles(2)
OK, I'm trying to fix it by myself. The attached is a proposed patch.
I would appreciate if you could double-check since I'm not completely
sure what the original code intends to do.
[gnus-no-server.patch (text/x-patch, inline)]
=== modified file 'lisp/gnus/gnus-start.el'
--- lisp/gnus/gnus-start.el 2011-06-10 00:10:24 +0000
+++ lisp/gnus/gnus-start.el 2011-07-05 05:49:35 +0000
@@ -1043,7 +1043,7 @@
;; Find the number of unread articles in each non-dead group.
(let ((gnus-read-active-file (and (not level) gnus-read-active-file)))
- (gnus-get-unread-articles level))))
+ (gnus-get-unread-articles level dont-connect))))
(defun gnus-call-subscribe-functions (method group)
"Call METHOD to subscribe GROUP.
@@ -1606,7 +1606,7 @@
;; Go though `gnus-newsrc-alist' and compare with `gnus-active-hashtb'
;; and compute how many unread articles there are in each group.
-(defun gnus-get-unread-articles (&optional level)
+(defun gnus-get-unread-articles (&optional level dont-connect)
(setq gnus-server-method-cache nil)
(require 'gnus-agent)
(let* ((newsrc (cdr gnus-newsrc-alist))
@@ -1702,12 +1702,13 @@
;; If we have primary/secondary select methods, but no groups from
;; them, we still want to issue a retrieval request from them.
- (dolist (method (cons gnus-select-method
- gnus-secondary-select-methods))
- (when (and (not (assoc method type-cache))
- (gnus-check-backend-function 'request-list (car method)))
- (with-current-buffer nntp-server-buffer
- (gnus-read-active-file-1 method nil))))
+ (unless dont-connect
+ (dolist (method (cons gnus-select-method
+ gnus-secondary-select-methods))
+ (when (and (not (assoc method type-cache))
+ (gnus-check-backend-function 'request-list (car method)))
+ (with-current-buffer nntp-server-buffer
+ (gnus-read-active-file-1 method nil)))))
;; Start early async retrieval of data.
(let ((done-methods nil)
[Message part 3 (text/plain, inline)]
Regards,
--
Daiki Ueno
Added tag(s) fixed.
Request was from
Lars Magne Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Tue, 05 Jul 2011 15:02:02 GMT)
Full text and
rfc822 format available.
bug marked as fixed in version 24.1, send any further explanations to
8963 <at> debbugs.gnu.org and Daiki Ueno <ueno <at> unixuser.org>
Request was from
Lars Magne Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Tue, 05 Jul 2011 15:02:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org
:
bug#8963
; Package
emacs,gnus
.
(Tue, 05 Jul 2011 15:03:01 GMT)
Full text and
rfc822 format available.
Message #27 received at 8963 <at> debbugs.gnu.org (full text, mbox):
Daiki Ueno <ueno <at> unixuser.org> writes:
>
> OK, I'm trying to fix it by myself. The attached is a proposed patch.
> I would appreciate if you could double-check since I'm not completely
> sure what the original code intends to do.
Thanks; that looks correct, so I've applied it to git Gnus.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog http://lars.ingebrigtsen.no/
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Wed, 03 Aug 2011 11:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 13 years and 326 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.