all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#43047: 28.0.50; Closing Gnus server then searching it results in unrecoverable breakage
@ 2020-08-25 18:12 Eric Abrahamsen
  2020-10-16  8:21 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 8+ messages in thread
From: Eric Abrahamsen @ 2020-08-25 18:12 UTC (permalink / raw)
  To: 43047


While fooling around with dbus and server closing, I discovered that the
"closed" state is a bit fragile: I close a server (in this case a
localhost IMAP server) then immediately try to search it, and instead of
the server opening, or me getting a polite error message, I get the
error at the bottom of this report.

That error is then permanent, the server can't be re-opened. Not only
that, when I `gnus-group-restart' the error persists, AND infects my
second IMAP server on localhost, though I guess that's to be expected.
Gnus has to be explicitly quit and then restarted in order to recover.

I note that, in `nnimap-open-server', when I'm trying to open a server
that was closed, the DEFS parameter is populated. But when we get to
`nnoo-change-server', none of the global nnimap-* variables get set
correctly: nnimap-stream should be 'network, but it's 'undecided, which
is why the backtrace below shows failure on an attempted ssl connection.

If I try to open a server that's already open, the DEFS parameter is
nil, but after we reach the `nnoo-change-server' call, all the nnimap-*
vars are set correctly.

That's as far as I've gotten now. I will continue debugging this, but
I'm hanging it here first to remind myself, and in case anyone else
wants to take a whack at it.

Debugger entered--Lisp error: (error "NPR/imaps Name or service not known")
  make-network-process(:name "*nnimap*" :buffer #<buffer  *nnimap NPR nil  *nntpd**> :host "NPR" :service "imaps" :nowait nil :tls-parameters nil :coding nil)
  open-network-stream("*nnimap*" #<buffer  *nnimap NPR nil  *nntpd**> "NPR" "imaps" :nowait nil :tls-parameters nil :coding nil)
  open-gnutls-stream("*nnimap*" #<buffer  *nnimap NPR nil  *nntpd**> "NPR" "imaps" (:type ssl :warn-unless-encrypted t :return-list t :shell-command "ssh %s imapd" :capability-command "1 CAPABILITY\15\n" :always-query-capabilities t :end-of-command "\15\n" :success " OK " :starttls-function #f(compiled-function (capabilities) #<bytecode -0xeb17a16a56719de>)))
  network-stream-open-tls("*nnimap*" #<buffer  *nnimap NPR nil  *nntpd**> "NPR" "imaps" (:type ssl :warn-unless-encrypted t :return-list t :shell-command "ssh %s imapd" :capability-command "1 CAPABILITY\15\n" :always-query-capabilities t :end-of-command "\15\n" :success " OK " :starttls-function #f(compiled-function (capabilities) #<bytecode -0xeb17a16a56719de>)))
  open-network-stream("*nnimap*" #<buffer  *nnimap NPR nil  *nntpd**> "NPR" "imaps" :type ssl :warn-unless-encrypted t :return-list t :shell-command "ssh %s imapd" :capability-command "1 CAPABILITY\15\n" :always-query-capabilities t :end-of-command "\15\n" :success " OK " :starttls-function #f(compiled-function (capabilities) #<bytecode -0xeb17a16a56719de>))
  nnimap-open-connection-1(#<buffer  *nntpd*>)
  nnimap-open-connection(#<buffer  *nntpd*>)
  nnimap-open-server("NPR" nil nil)
  nnimap-change-group("INBOX" "NPR")
  #f(compiled-function (group) #<bytecode -0x1990b256ae59c812>)("nnimap+NPR:INBOX")
  mapcar(#f(compiled-function (group) #<bytecode -0x1990b256ae59c812>) ("nnimap+NPR:INBOX"))
  nnir-run-imap(((query . "body \"searchy\"")) "nnimap:NPR" ("nnimap+NPR:INBOX"))





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

* bug#43047: 28.0.50; Closing Gnus server then searching it results in unrecoverable breakage
  2020-08-25 18:12 bug#43047: 28.0.50; Closing Gnus server then searching it results in unrecoverable breakage Eric Abrahamsen
@ 2020-10-16  8:21 ` Lars Ingebrigtsen
  2020-10-16 16:54   ` Eric Abrahamsen
  0 siblings, 1 reply; 8+ messages in thread
From: Lars Ingebrigtsen @ 2020-10-16  8:21 UTC (permalink / raw)
  To: Eric Abrahamsen; +Cc: 43047

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> That's as far as I've gotten now. I will continue debugging this, but
> I'm hanging it here first to remind myself, and in case anyone else
> wants to take a whack at it.
>
> Debugger entered--Lisp error: (error "NPR/imaps Name or service not known")
>   make-network-process(:name "*nnimap*" :buffer #<buffer *nnimap NPR
> nil *nntpd**> :host "NPR" :service "imaps" :nowait nil :tls-parameters
> nil :coding nil)

Reading this bug report, it's somewhat unclear what the problem is.  Is
"NPR" really the name of the server you're connecting to, or is that the
problem?  That Gnus is trying to connect to "NPR"?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

* bug#43047: 28.0.50; Closing Gnus server then searching it results in unrecoverable breakage
  2020-10-16  8:21 ` Lars Ingebrigtsen
@ 2020-10-16 16:54   ` Eric Abrahamsen
  2020-10-16 16:57     ` Lars Ingebrigtsen
  0 siblings, 1 reply; 8+ messages in thread
From: Eric Abrahamsen @ 2020-10-16 16:54 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 43047

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>
>> That's as far as I've gotten now. I will continue debugging this, but
>> I'm hanging it here first to remind myself, and in case anyone else
>> wants to take a whack at it.
>>
>> Debugger entered--Lisp error: (error "NPR/imaps Name or service not known")
>>   make-network-process(:name "*nnimap*" :buffer #<buffer *nnimap NPR
>> nil *nntpd**> :host "NPR" :service "imaps" :nowait nil :tls-parameters
>> nil :coding nil)
>
> Reading this bug report, it's somewhat unclear what the problem is.  Is
> "NPR" really the name of the server you're connecting to, or is that the
> problem?  That Gnus is trying to connect to "NPR"?

Yes, the server is correct: nnimap+NPR. Once I get that error above, I
can't reconnect, and get the same error for all nnimap backends.

I'm 90% sure the problem is that searching leads to a code path that
doesn't first check if the server is open, so `nnoo-change-server' is
never called, and the server variables for all imap servers get
cross-wired somehow. But I still haven't taken the time to step through
it in depth.





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

* bug#43047: 28.0.50; Closing Gnus server then searching it results in unrecoverable breakage
  2020-10-16 16:54   ` Eric Abrahamsen
@ 2020-10-16 16:57     ` Lars Ingebrigtsen
  2020-10-16 17:03       ` Eric Abrahamsen
  0 siblings, 1 reply; 8+ messages in thread
From: Lars Ingebrigtsen @ 2020-10-16 16:57 UTC (permalink / raw)
  To: Eric Abrahamsen; +Cc: 43047

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

>>> Debugger entered--Lisp error: (error "NPR/imaps Name or service not known")
>>>   make-network-process(:name "*nnimap*" :buffer #<buffer *nnimap NPR
>>> nil *nntpd**> :host "NPR" :service "imaps" :nowait nil :tls-parameters
>>> nil :coding nil)
>>
>> Reading this bug report, it's somewhat unclear what the problem is.  Is
>> "NPR" really the name of the server you're connecting to, or is that the
>> problem?  That Gnus is trying to connect to "NPR"?
>
> Yes, the server is correct: nnimap+NPR. Once I get that error above, I
> can't reconnect, and get the same error for all nnimap backends.

But is "NPR" the domain name of the server you're trying to connect to?
Or is it the Gnus server name?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

* bug#43047: 28.0.50; Closing Gnus server then searching it results in unrecoverable breakage
  2020-10-16 16:57     ` Lars Ingebrigtsen
@ 2020-10-16 17:03       ` Eric Abrahamsen
  2021-08-27 17:44         ` Lars Ingebrigtsen
  0 siblings, 1 reply; 8+ messages in thread
From: Eric Abrahamsen @ 2020-10-16 17:03 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 43047

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>
>>>> Debugger entered--Lisp error: (error "NPR/imaps Name or service not known")
>>>>   make-network-process(:name "*nnimap*" :buffer #<buffer *nnimap NPR
>>>> nil *nntpd**> :host "NPR" :service "imaps" :nowait nil :tls-parameters
>>>> nil :coding nil)
>>>
>>> Reading this bug report, it's somewhat unclear what the problem is.  Is
>>> "NPR" really the name of the server you're connecting to, or is that the
>>> problem?  That Gnus is trying to connect to "NPR"?
>>
>> Yes, the server is correct: nnimap+NPR. Once I get that error above, I
>> can't reconnect, and get the same error for all nnimap backends.
>
> But is "NPR" the domain name of the server you're trying to connect to?
> Or is it the Gnus server name?

It's just the label of the server:

(nnimap "NPR"
  (nnimap-address "localhost")
  (nnimap-stream network)
  (gnus-message-archive-group "nnimap+NPR:Sent")
  (nnimap-authenticator login)
  (nnimap-user "eric@paper-republic.org"))





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

* bug#43047: 28.0.50; Closing Gnus server then searching it results in unrecoverable breakage
  2020-10-16 17:03       ` Eric Abrahamsen
@ 2021-08-27 17:44         ` Lars Ingebrigtsen
  2021-08-27 18:33           ` Eric Abrahamsen
  0 siblings, 1 reply; 8+ messages in thread
From: Lars Ingebrigtsen @ 2021-08-27 17:44 UTC (permalink / raw)
  To: Eric Abrahamsen; +Cc: 43047

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

>>>>>   make-network-process(:name "*nnimap*" :buffer #<buffer *nnimap NPR
>>>>> nil *nntpd**> :host "NPR" :service "imaps" :nowait nil :tls-parameters
>>>>> nil :coding nil)

[...]

> It's just the label of the server:
>
> (nnimap "NPR"
>   (nnimap-address "localhost")
>   (nnimap-stream network)
>   (gnus-message-archive-group "nnimap+NPR:Sent")
>   (nnimap-authenticator login)
>   (nnimap-user "eric@paper-republic.org"))

Hm...  then it sounds like the defvoo machinery isn't restoring the
local variables (and just using "NPR" as the host name, which is the
default if nnimap-address is nil).

So...  I think...  this must mean that it thinks that NPR is the current
nnimap server even when it isn't, so something hasn't been reset
correctly somewhere...

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

* bug#43047: 28.0.50; Closing Gnus server then searching it results in unrecoverable breakage
  2021-08-27 17:44         ` Lars Ingebrigtsen
@ 2021-08-27 18:33           ` Eric Abrahamsen
  2021-08-27 18:45             ` Lars Ingebrigtsen
  0 siblings, 1 reply; 8+ messages in thread
From: Eric Abrahamsen @ 2021-08-27 18:33 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 43047

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>
>>>>>>   make-network-process(:name "*nnimap*" :buffer #<buffer *nnimap NPR
>>>>>> nil *nntpd**> :host "NPR" :service "imaps" :nowait nil :tls-parameters
>>>>>> nil :coding nil)
>
> [...]
>
>> It's just the label of the server:
>>
>> (nnimap "NPR"
>>   (nnimap-address "localhost")
>>   (nnimap-stream network)
>>   (gnus-message-archive-group "nnimap+NPR:Sent")
>>   (nnimap-authenticator login)
>>   (nnimap-user "eric@paper-republic.org"))
>
> Hm...  then it sounds like the defvoo machinery isn't restoring the
> local variables (and just using "NPR" as the host name, which is the
> default if nnimap-address is nil).

Oh! I think I already fixed this, in aae44a36f3. I just added a
`gnus-open-server' into the imap `gnus-search-run-search' -- that seems
sufficient to make this server the "current server". I just tested
it again (close and then search) and it seems to work fine. Maybe close
this out?





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

* bug#43047: 28.0.50; Closing Gnus server then searching it results in unrecoverable breakage
  2021-08-27 18:33           ` Eric Abrahamsen
@ 2021-08-27 18:45             ` Lars Ingebrigtsen
  0 siblings, 0 replies; 8+ messages in thread
From: Lars Ingebrigtsen @ 2021-08-27 18:45 UTC (permalink / raw)
  To: Eric Abrahamsen; +Cc: 43047

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> Oh! I think I already fixed this, in aae44a36f3. I just added a
> `gnus-open-server' into the imap `gnus-search-run-search' -- that seems
> sufficient to make this server the "current server". I just tested
> it again (close and then search) and it seems to work fine.

Great!

> Maybe close this out?

Sure; now done.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

end of thread, other threads:[~2021-08-27 18:45 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-25 18:12 bug#43047: 28.0.50; Closing Gnus server then searching it results in unrecoverable breakage Eric Abrahamsen
2020-10-16  8:21 ` Lars Ingebrigtsen
2020-10-16 16:54   ` Eric Abrahamsen
2020-10-16 16:57     ` Lars Ingebrigtsen
2020-10-16 17:03       ` Eric Abrahamsen
2021-08-27 17:44         ` Lars Ingebrigtsen
2021-08-27 18:33           ` Eric Abrahamsen
2021-08-27 18:45             ` Lars Ingebrigtsen

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.