From: "Mattias Engdegård" <mattiase@acm.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 49449@debbugs.gnu.org, larsi@gnus.org
Subject: bug#49449: 28: TLS connection never gets to "open" stage
Date: Sat, 10 Jul 2021 21:44:21 +0200 [thread overview]
Message-ID: <580679E8-B94D-4B46-A0CB-CA52B9D535EB@acm.org> (raw)
In-Reply-To: <83pmvqarua.fsf@gnu.org>
10 juli 2021 kl. 21.31 skrev Eli Zaretskii <eliz@gnu.org>:
> That's my question: why cannot the sentinel be called in this case?
> what prevents it from being called?
In the failing case, wait_reading_process_output calls gnutls_try_handshake early on, which succeeds and this leads to finish_after_tls_connection being called. Here, we have the condition
else if ((fd_callback_info[p->outfd].flags & NON_BLOCKING_CONNECT_FD) == 0)
which gates further progress, but this condition is false because the flags have NON_BLOCKING_CONNECT_FD set.
In the successful case, the first call to gnutls_try_handshake from wait_reading_process_output fails because things haven't had the time to be set up yet. This leads to a select being called on the socket for writing (since it's in a nonblocking connect), and when ready, the NON_BLOCKING_CONNECT_FD bit is cleared from the flags.
This is a simplified view. The state is clearly more complex and things need to be done in the proper order.
next prev parent reply other threads:[~2021-07-10 19:44 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-06 19:12 bug#49449: 28: TLS connection never gets to "open" stage Mattias Engdegård
2021-07-07 19:57 ` Lars Ingebrigtsen
2021-07-08 7:59 ` Mattias Engdegård
2021-07-08 12:54 ` Lars Ingebrigtsen
2021-07-08 16:47 ` Mattias Engdegård
2021-07-10 16:27 ` Lars Ingebrigtsen
2021-07-10 16:51 ` Mattias Engdegård
2021-07-10 16:57 ` Lars Ingebrigtsen
2021-07-10 17:07 ` Mattias Engdegård
2021-07-10 18:23 ` Mattias Engdegård
2021-07-10 18:54 ` Eli Zaretskii
2021-07-10 19:22 ` Mattias Engdegård
2021-07-10 19:31 ` Eli Zaretskii
2021-07-10 19:44 ` Mattias Engdegård [this message]
2021-07-11 6:49 ` Eli Zaretskii
2021-07-11 7:42 ` Mattias Engdegård
2021-07-11 10:14 ` Eli Zaretskii
2021-07-11 14:26 ` Mattias Engdegård
2021-07-11 15:01 ` Eli Zaretskii
2021-07-12 14:57 ` Mattias Engdegård
2021-07-12 15:02 ` Lars Ingebrigtsen
2021-07-13 17:08 ` Mattias Engdegård
2021-07-10 20:05 ` Mattias Engdegård
2021-07-11 11:31 ` Lars Ingebrigtsen
2021-07-11 11:29 ` Lars Ingebrigtsen
2021-07-11 14:28 ` Mattias Engdegård
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=580679E8-B94D-4B46-A0CB-CA52B9D535EB@acm.org \
--to=mattiase@acm.org \
--cc=49449@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=larsi@gnus.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.