Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement hard timeout #35

Open
thesamesam opened this issue Jun 26, 2024 · 0 comments
Open

Implement hard timeout #35

thesamesam opened this issue Jun 26, 2024 · 0 comments

Comments

@thesamesam
Copy link
Contributor

thesamesam commented Jun 26, 2024

Unfortunately, a098d83 (#26) appears insufficient. I've observed this a bunch of times and poked a tiny bit more yesterday. Users hit it when our sks instances on infra freeze up, etc.

It appears that gpg doesn't commit to having the timeout work in all cases, see https://dev.gnupg.org/T3893:

However if the server stops or some ugly proxy sending in the middle of a transaction we have no real way to set timeout; there are just too many ways a connection can be slowed down.

Accordingly, I think we need a hard timeout from the Python side when invoking gpg.

eli-schwartz added a commit to eli-schwartz/portage that referenced this issue Aug 27, 2024
If it takes more than 5 seconds to download a miniscule file from
https://gentoo.org/.well-known/openpgpkey/ then something has gone
dreadfully wrong. Most commonly, what went wrong is that the user has
broken ipv6 connectivity and requests simply hangs forever (no joke --
it doesn't implement Happy Eyeballs and closed the multiple bug reports
as "please use stackoverflow to ask questions about how to use requests,
we are not a support forum").

Pass a timeout so that we eventually give up and try ipv4 instead. This
is a crude hack and the proper solution is to make gemato handle this
better, but until gemato is fixed to use a better download library we do
the best we can.

Bug: psf/requests#6788
Bug: projg2/gemato#35
Bug: https://bugs.gentoo.org/779766
eli-schwartz added a commit to eli-schwartz/portage that referenced this issue Aug 27, 2024
If it takes more than 5 seconds to download a miniscule file from
https://gentoo.org/.well-known/openpgpkey/ then something has gone
dreadfully wrong. Most commonly, what went wrong is that the user has
broken ipv6 connectivity and requests simply hangs forever (no joke --
it doesn't implement Happy Eyeballs and closed the multiple bug reports
as "please use stackoverflow to ask questions about how to use requests,
we are not a support forum").

Pass a timeout so that we eventually give up and try ipv4 instead. This
is a crude hack and the proper solution is to make gemato handle this
better, but until gemato is fixed to use a better download library we do
the best we can.

Bug: psf/requests#6788
Bug: projg2/gemato#35
Bug: https://bugs.gentoo.org/779766
Signed-off-by: Eli Schwartz <eschwartz@gentoo.org>
eli-schwartz added a commit to eli-schwartz/portage that referenced this issue Aug 27, 2024
If it takes more than 5 seconds to download a miniscule file from
https://gentoo.org/.well-known/openpgpkey/ then something has gone
dreadfully wrong. Most commonly, what went wrong is that the user has
broken ipv6 connectivity and requests simply hangs forever (no joke --
it doesn't implement Happy Eyeballs and closed the multiple bug reports
as "please use stackoverflow to ask questions about how to use requests,
we are not a support forum").

Pass a timeout so that we eventually give up and try ipv4 instead. This
is a crude hack and the proper solution is to make gemato handle this
better, but until gemato is fixed to use a better download library we do
the best we can.

Bug: psf/requests#6788
Bug: projg2/gemato#35
Bug: https://bugs.gentoo.org/779766
Signed-off-by: Eli Schwartz <eschwartz@gentoo.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant