[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gnutls infloop possibly fixed
From: |
Lars Ingebrigtsen |
Subject: |
Re: gnutls infloop possibly fixed |
Date: |
Sun, 12 Feb 2012 20:47:14 +0100 |
User-agent: |
Gnus/5.130002 (Ma Gnus v0.2) Emacs/24.0.93 (gnu/linux) |
Ted Zlatanov <address@hidden> writes:
> Thanks! I have just one question: can we, instead of aborting on
> EAGAIN, retry a few times? My suggestion is below.
That would make sense, I guess. I have no idea whether EAGAIN is a
common situation to be in when doing writes on a functioning network,
though.
That is, if EAGAIN "never" happens when the network is up, then adding
the loop doesn't help any. But it doesn't hurt, either, so...
> Maybe we could wait a millisecond, too. Or is all that handled at the
> Emacs process loop level?
The Emacs process loop will eventually try to write the stuff out again,
but how long it takes can be pretty random. If Emacs is idle, it
retries about once a second, I think? But if we've just said
`process-send-string' and then is in an `accept-process-output' loop
(which would be the common case), then it'll probably be retried sooner?
Perhaps?
Hey, I can just test that now by taking down the network and hitting
`g'... let's see...
Ok:
[pid 5621] 20:45:22 sendto(13,
"p`q\214\\\37\354\20QD\215\272$\t\241\347\273\343\316\322\247", 21, 0, NULL, 0)
= -1 EAGAIN (Resource temporarily unavailable)
[pid 5621] 20:45:22 sendto(13,
"p`q\214\\\37\354\20QD\215\272$\t\241\347\273\343\316\322\247", 21, 0, NULL, 0)
= -1 EAGAIN (Resource temporarily unavailable)
[pid 5621] 20:45:22 sendto(13,
"p`q\214\\\37\354\20QD\215\272$\t\241\347\273\343\316\322\247", 21, 0, NULL, 0)
= -1 EAGAIN (Resource temporarily unavailable)
(etc)
It seems to retry the GnuTLS sendto about 20 times a second in the `g'
test. I think that's probably more than good enough, and adding an
extra loop there isn't necessary.
--
(domestic pets only, the antidote for overdose, milk.)
http://lars.ingebrigtsen.no * Sent from my Rome
- gnutls infloop possibly fixed, Lars Ingebrigtsen, 2012/02/11
- Re: gnutls infloop possibly fixed, Ted Zlatanov, 2012/02/11
- Re: gnutls infloop possibly fixed,
Lars Ingebrigtsen <=
- Re: gnutls infloop possibly fixed, Ted Zlatanov, 2012/02/12
- Re: gnutls infloop possibly fixed, Tom Tromey, 2012/02/13
- Re: gnutls infloop possibly fixed, Lars Ingebrigtsen, 2012/02/13
- Re: gnutls infloop possibly fixed, Lars Ingebrigtsen, 2012/02/13
- Re: gnutls infloop possibly fixed, Andreas Schwab, 2012/02/13
- Re: gnutls infloop possibly fixed, Lars Ingebrigtsen, 2012/02/13
- Re: gnutls infloop possibly fixed, Richard Stallman, 2012/02/13
- Re: gnutls infloop possibly fixed, Andreas Schwab, 2012/02/13