Gnus development mailing list
 help / color / mirror / Atom feed
* asynch prefetch backtrace
@ 2003-01-03 14:49 Simon Josefsson
  2003-01-03 20:14 ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 7+ messages in thread
From: Simon Josefsson @ 2003-01-03 14:49 UTC (permalink / raw)


䤠来琠瑨楳⁷桥渠瑲祩湧⁴漠癩敷慲来⁡牴楣汥献†坡楴楮朠愠晥眠獥捯湤猍੡湤⁰牥獳楮朠朠慧慩渠睯牫献†䤠桡癥⁡汷慹猠畳敤⁡獹湣栠灲敦整捨Ⱐ獯⁉ഊ瑨楮欠楴⁩猠捡畳敤⁢礠浹⁃噓⁵瀠污獴楧桴⸍਍੄敢畧来爠敮瑥牥搭ⵌ楳瀠敲牯爺
敲牯爠≂畦晥爠‪䅳祮挠偲敦整捨⁁牴楣汥⨠桡猠湯⁰牯捥獳∩ഊ†灲潣敳猭獴慴畳⡮楬⤍ਠ湴瀭慣捥灴⵰牯捥獳ⵯ畴灵琨湩氠ㄩഊ†批瑥ⵣ潤攨∈ऽƒ☀屮吒Å௾＀왜⋾＀茒þ＀윒屦„\0屮È㷾＀茀þ＀준쨀쭜⋾＀蠀찔‚\0Ň∠孡牴楣汥⁧湵猭慳祮挭捵牲敮琭灲敦整捨ⵡ牴楣汥⁴物敳⁰牯挠湮瑰⵨慶攭浥獳慧敤湴瀭慣捥灴⵰牯捥獳ⵯ畴灵琠ㄠ〠㌠杮畳⵭敳獡来‵•坡楴楮朠景爠慳祮挠慲瑩捬攮⸮∠瑝″⤍ਠ⁧湵猭慳祮挭睡楴ⵦ潲ⵡ牴楣汥⠳㔳㈩ഊ†杮畳ⵡ獹湣⵲敱略獴ⵦ整捨敤ⵡ牴楣汥⠢湮業慰⭹硡㩉乂佘⹸敭慣猭灡瑣桥猢″㔳㈠⌼扵晦敲‪䅲瑩捬攪㸩ഊ†杮畳⵲敱略獴ⵡ牴楣汥⵴桩猭扵晦敲⠳㔳㈠≮湩浡瀫祸愺䥎䉏堮硥浡捳⵰慴捨敳∩ഊ†杮畳ⵡ牴楣汥⵰牥灡牥⠳㔳㈠湩氩ഊ†杮畳⵳畭浡特ⵤ楳灬慹ⵡ牴楣汥⠳㔳㈩ഊ†杮畳⵳畭浡特⵮數琭慲瑩捬攨湩氠湩氩ഊ†杮畳⵳畭浡特⵮數琭畮牥慤ⵡ牴楣汥⠩ഊ†捡汬⵩湴敲慣瑩癥汹⡧湵猭獵浭慲礭湥硴⵵湲敡搭慲瑩捬攩ഊഊഊഊ

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

* Re: asynch prefetch backtrace
  2003-01-03 14:49 asynch prefetch backtrace Simon Josefsson
@ 2003-01-03 20:14 ` Lars Magne Ingebrigtsen
  2003-01-05 20:27   ` Simon Josefsson
  0 siblings, 1 reply; 7+ messages in thread
From: Lars Magne Ingebrigtsen @ 2003-01-03 20:14 UTC (permalink / raw)


Simon Josefsson <jas@extundo.com> writes:

> I get this when trying to view large articles.  Waiting a few seconds
> and pressing g again works.  I have always used asynch prefetch, so I
> think it is caused by my CVS up last night.
>
> Debugger entered--Lisp error: (error "Buffer  *Async Prefetch Article* has no process")
>   process-status(nil)
>   nntp-accept-process-output(nil 1)

Hm...  I seem to be unable to reproduce this bug.  I've had a look
over the code, and it seems safe enough...

Is there a particular group that triggers this?  Then I could try
that group, too.

-- 
(domestic pets only, the antidote for overdose, milk.)
   larsi@gnus.org * Lars Magne Ingebrigtsen



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

* Re: asynch prefetch backtrace
  2003-01-03 20:14 ` Lars Magne Ingebrigtsen
@ 2003-01-05 20:27   ` Simon Josefsson
  2003-01-06  2:28     ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 7+ messages in thread
From: Simon Josefsson @ 2003-01-05 20:27 UTC (permalink / raw)


Lars Magne Ingebrigtsen <larsi@gnus.org> writes:

> Simon Josefsson <jas@extundo.com> writes:
>
>> I get this when trying to view large articles.  Waiting a few seconds
>> and pressing g again works.  I have always used asynch prefetch, so I
>> think it is caused by my CVS up last night.
>>
>> Debugger entered--Lisp error: (error "Buffer  *Async Prefetch Article* has no process")
>>   process-status(nil)
>>   nntp-accept-process-output(nil 1)
>
> Hm...  I seem to be unable to reproduce this bug.  I've had a look
> over the code, and it seems safe enough...
>
> Is there a particular group that triggers this?  Then I could try
> that group, too.

Interestingly it happens only in nnimap groups.  Here is a backtrace
without bytecode.  It is probably a nnimap bug...

Debugger entered--Lisp error: (error "Buffer  *Async Prefetch Article* has no process")
  process-status(nil)
  nntp-accept-process-output(nil 1)
  (if (nntp-accept-process-output proc 1) (progn (setq tries 0)))
  (when (nntp-accept-process-output proc 1) (setq tries 0))
  (while (eq article gnus-async-current-prefetch-article) (incf tries) (when (nntp-accept-process-output proc 1) (setq tries 0)) (when (and ... ...) (gnus-message 5 "Waiting for async article...") (setq nntp-have-messaged t)))
  (condition-case nil (while (eq article gnus-async-current-prefetch-article) (incf tries) (when ... ...) (when ... ... ...)) (quit (when ... ...) (signal ... nil)))
  (let ((proc ...) (nntp-server-buffer ...) (nntp-have-messaged nil) (tries 0)) (condition-case nil (while ... ... ... ...) (quit ... ...)) (when nntp-have-messaged (gnus-message 5 "")))
  (save-excursion (gnus-async-set-buffer) (let (... ... ... ...) (condition-case nil ... ...) (when nntp-have-messaged ...)))
  gnus-async-wait-for-article(2630)
  (progn (gnus-async-wait-for-article article))
  (if (and (equal group gnus-async-current-prefetch-group) (eq article gnus-async-current-prefetch-article)) (progn (gnus-async-wait-for-article article)))
  (when (and (equal group gnus-async-current-prefetch-group) (eq article gnus-async-current-prefetch-article)) (gnus-async-wait-for-article article))
  (progn (when (and ... ...) (gnus-async-wait-for-article article)) (let (...) (when entry ...)))
  (if (numberp article) (progn (when ... ...) (let ... ...)))
  (when (numberp article) (when (and ... ...) (gnus-async-wait-for-article article)) (let (...) (when entry ...)))
  gnus-async-request-fetched-article("nnimap+yxa:INBOX.libc-alpha" 2630 #<buffer *Article*>)
  gnus-request-article-this-buffer(2630 "nnimap+yxa:INBOX.libc-alpha")
  gnus-article-prepare(2630 nil)
  gnus-summary-display-article(2630)
  gnus-summary-next-article(nil nil)
  gnus-summary-next-unread-article()
  call-interactively(gnus-summary-next-unread-article)




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

* Re: asynch prefetch backtrace
  2003-01-05 20:27   ` Simon Josefsson
@ 2003-01-06  2:28     ` Lars Magne Ingebrigtsen
  2003-01-06  4:23       ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 7+ messages in thread
From: Lars Magne Ingebrigtsen @ 2003-01-06  2:28 UTC (permalink / raw)


Simon Josefsson <jas@extundo.com> writes:

> Interestingly it happens only in nnimap groups.  Here is a backtrace
> without bytecode.  It is probably a nnimap bug...
>
> Debugger entered--Lisp error: (error "Buffer  *Async Prefetch Article* has no process")
>   process-status(nil)
>   nntp-accept-process-output(nil 1)

[...]

>   gnus-async-wait-for-article(2630)

It's calling the nntp function instead of the nnimap function, so I'm
guessing that the Gnus async function(s) just haven't been fixed to
rely on other backends than nntp.

*read code*

Yes, that seem to be the case.  (That's odd.  I really thought that
the async stuff should work for all backends.  Do I misremember
totally?  Am I misreading the code?  I have a suspicion that there's
something I'm not remembering...)

If that is, indeed, the case, then the following patch is the right
one.  :-/

*** nnimap.el.~6.56.~	Sat Dec 28 19:03:35 2002
--- nnimap.el	Mon Jan  6 03:26:37 2003
***************
*** 842,848 ****
  	  (cons group article))))))
  
  (deffoo nnimap-asynchronous-p ()
!   t)
  
  (deffoo nnimap-request-article (article &optional group server to-buffer)
    (if (imap-capability 'IMAP4rev1 nnimap-server-buffer)
--- 842,848 ----
  	  (cons group article))))))
  
  (deffoo nnimap-asynchronous-p ()
!   nil)
  
  (deffoo nnimap-request-article (article &optional group server to-buffer)
    (if (imap-capability 'IMAP4rev1 nnimap-server-buffer)


-- 
(domestic pets only, the antidote for overdose, milk.)
   larsi@gnus.org * Lars Magne Ingebrigtsen



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

* Re: asynch prefetch backtrace
  2003-01-06  2:28     ` Lars Magne Ingebrigtsen
@ 2003-01-06  4:23       ` Lars Magne Ingebrigtsen
  2003-01-08  3:28         ` Simon Josefsson
  0 siblings, 1 reply; 7+ messages in thread
From: Lars Magne Ingebrigtsen @ 2003-01-06  4:23 UTC (permalink / raw)


Lars Magne Ingebrigtsen <larsi@gnus.org> writes:

> Yes, that seem to be the case.  (That's odd.  I really thought that
> the async stuff should work for all backends.  Do I misremember
> totally?  Am I misreading the code?  I have a suspicion that there's
> something I'm not remembering...)

Ah, now I know.  Most gnus-async doesn't know anything about the
method the back end is using to fetch the articles (which is proper),
but the new function (well, from 1998) `gnus-async-wait-for-article'
does look deep into backend internals.  Which is a bug.

The point of that function is to see whether we're trying to select
the article which is just arriving in the async buffer, and if so,
wait until it's arrived.

The easy fix for this is to just move the function to the back end,
define a new back end interface function, and have gnus-async call
that instead.

-- 
(domestic pets only, the antidote for overdose, milk.)
   larsi@gnus.org * Lars Magne Ingebrigtsen



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

* Re: asynch prefetch backtrace
  2003-01-06  4:23       ` Lars Magne Ingebrigtsen
@ 2003-01-08  3:28         ` Simon Josefsson
  2003-01-08  4:19           ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 7+ messages in thread
From: Simon Josefsson @ 2003-01-08  3:28 UTC (permalink / raw)


Lars Magne Ingebrigtsen <larsi@gnus.org> writes:

> Lars Magne Ingebrigtsen <larsi@gnus.org> writes:
>
>> Yes, that seem to be the case.  (That's odd.  I really thought that
>> the async stuff should work for all backends.  Do I misremember
>> totally?  Am I misreading the code?  I have a suspicion that there's
>> something I'm not remembering...)
>
> Ah, now I know.  Most gnus-async doesn't know anything about the
> method the back end is using to fetch the articles (which is proper),
> but the new function (well, from 1998) `gnus-async-wait-for-article'
> does look deep into backend internals.  Which is a bug.
>
> The point of that function is to see whether we're trying to select
> the article which is just arriving in the async buffer, and if so,
> wait until it's arrived.
>
> The easy fix for this is to just move the function to the back end,
> define a new back end interface function, and have gnus-async call
> that instead.

But asynchronous prefetching has worked for ages, with nnimap too, and
now it normally works but not when there is a very large article in
the summary buffer.  Weird.

Is anyone else seeing this?  Maybe I have broken something locally.




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

* Re: asynch prefetch backtrace
  2003-01-08  3:28         ` Simon Josefsson
@ 2003-01-08  4:19           ` Lars Magne Ingebrigtsen
  0 siblings, 0 replies; 7+ messages in thread
From: Lars Magne Ingebrigtsen @ 2003-01-08  4:19 UTC (permalink / raw)


Simon Josefsson <jas@extundo.com> writes:

> But asynchronous prefetching has worked for ages, with nnimap too, and
> now it normally works but not when there is a very large article in
> the summary buffer.  Weird.

You basically only see the bug when the article after the one you
choose is very big, and you then hit `n' fast.
`gnus-async-wait-for-article' is only called if the article you're
trying to select has been requested, but hasn't arrived yet, I think.

-- 
(domestic pets only, the antidote for overdose, milk.)
   larsi@gnus.org * Lars Magne Ingebrigtsen



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

end of thread, other threads:[~2003-01-08  4:19 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-03 14:49 asynch prefetch backtrace Simon Josefsson
2003-01-03 20:14 ` Lars Magne Ingebrigtsen
2003-01-05 20:27   ` Simon Josefsson
2003-01-06  2:28     ` Lars Magne Ingebrigtsen
2003-01-06  4:23       ` Lars Magne Ingebrigtsen
2003-01-08  3:28         ` Simon Josefsson
2003-01-08  4:19           ` Lars Magne Ingebrigtsen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).