From: Lars Ingebrigtsen <larsi@gnus.org>
To: emacs-devel@gnu.org
Subject: Re: gnutls infloop possibly fixed
Date: Sun, 12 Feb 2012 20:47:14 +0100 [thread overview]
Message-ID: <87fwefj0l9.fsf@gnus.org> (raw)
In-Reply-To: <87ehu0lqc7.fsf@lifelogs.com> (Ted Zlatanov's message of "Sat, 11 Feb 2012 21:48:08 -0500")
Ted Zlatanov <tzz@lifelogs.com> 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
next prev parent reply other threads:[~2012-02-12 19:47 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-11 17:10 gnutls infloop possibly fixed Lars Ingebrigtsen
2012-02-12 2:48 ` Ted Zlatanov
2012-02-12 19:47 ` Lars Ingebrigtsen [this message]
2012-02-12 21:34 ` Ted Zlatanov
2012-02-13 15:48 ` Tom Tromey
2012-02-13 19:11 ` Lars Ingebrigtsen
2012-02-13 19:39 ` Lars Ingebrigtsen
2012-02-13 20:46 ` Andreas Schwab
2012-02-13 20:47 ` Lars Ingebrigtsen
2012-02-13 21:41 ` Richard Stallman
2012-02-13 22:05 ` Andreas Schwab
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87fwefj0l9.fsf@gnus.org \
--to=larsi@gnus.org \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.