Subject: Re: bug#22789: 25.1.50; In last master build https connections stop working

From: Eli Zaretskii <[email-masked]>
Date: Tue, 01 Mar 2016 05:35:13 +0200

> From: Lars Ingebrigtsen <[email-masked]>
> Cc: Alain Schneble <[email-masked]>,  [email-masked],  [email-masked]
> Date: Tue, 01 Mar 2016 08:22:35 +1100
> 
> Eli Zaretskii <[email-masked]> writes:
> 
> > I already tried increasing the limit, it doesn't help: the new limit
> > is reached.  Interestingly, when the initial connection is made, for
> > the page itself, the handshake completes within 10 attempts.  But the
> > subsequent connections, presumably for images, don't succeed, for some
> > reason.
> 
> For the images, it tried handshaking 100 times and then marked the
> connections as failed?

It tried as many times as I gave it (I even tried 1000), yes.  I
didn't check that it marks the connection as failed, but that's
deterministic, no?

> > Failing that, I came to a conclusion that I don't have a clear and
> > complete picture of what should happen when eww receives the page and
> > proceeds to downloading the images.  Lars, can you please describe
> > what eww does at this point, and how these downloads are expected to
> > work asynchronously?  You can describe what happens on GNU/Linux, if
> > that makes it easier.  In particular, what are the differences between
> > the initial connection to get the page (which works) and the
> > connections made to get the images (which don't work)?
> 
> As I said before, the images are fetched from `url-queue', which gives
> up if the image hasn't downloaded within five seconds.  Could that be
> the case for you?

Unlikely: I tried enlarging the limit to 120 sec, and the problem
wasn't fixed.

I feel that we don't really understand the problem, so we are trying
random things "just because they are there".  I think we should try to
understand what's not working first.

> > There is also some disturbing signs in retrying GnuTLS handshake from
> > wait_reading_process_output -- I'm not sure the way that function
> > works, at least on Windows, is according to you expectations.  The
> > while loop there doesn't really spin all the time, did you know that?
> 
> It runs every time something is available from poll, doesn't it?  Which
> is what we care about.  I think.

But something might not become available from the poll for prolonged
periods of time.  Why would we rely on the loop there to crank
frequently enough for the purposes of completing the TLS handshake?
E.g., does it work well for you if you disable cursor blinking before
invoking eww?