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

[7.10] OSError: [Errno 22] Invalid argument #6429

Closed
sentry-for-tribler bot opened this issue Oct 7, 2021 · 10 comments · Fixed by #8099
Closed

[7.10] OSError: [Errno 22] Invalid argument #6429

sentry-for-tribler bot opened this issue Oct 7, 2021 · 10 comments · Fixed by #8099
Assignees

Comments

@sentry-for-tribler
Copy link

Sentry Issue: TRIBLER-8X

OSError: [Errno 22] Invalid argument
  File "asyncio/events.py", line 81, in _run
  File "aiohttp/web_protocol.py", line 221, in connection_made
  File "aiohttp/tcp_helpers.py", line 23, in tcp_keepalive
  File "asyncio/trsock.py", line 82, in setsockopt
@ichorid
Copy link
Contributor

ichorid commented Oct 7, 2021

@qstokkink , could you please look into this?

@qstokkink

This comment was marked as outdated.

@ichorid
Copy link
Contributor

ichorid commented Oct 7, 2021

@qstokkink thanks! We'll handle it from here 👍

@sentry-for-tribler
Copy link
Author

Sentry issue: TRIBLER-15C

@qstokkink
Copy link
Contributor

Actually, after reevaluating the source code of aiohttp/tcp_helpers.py, it may be more likely that the REST API port was blocked (by a firewall).

The error in the stack trace corresponds to a socket that has its access blocked. I can cause a similar (but not the same!) error on the same line by closing the REST API port immediately after opening an initial connection.

For reproduction, I'd recommend using the Mac firewall to block the REST API port that Tribler is using (after starting Tribler initially). Sadly, I (still) don't have a Mac to test this on myself.

@qstokkink qstokkink changed the title [7.10] OSError: [Errno 22] Invalid argument (IPv6-related) [7.10] OSError: [Errno 22] Invalid argument (Mac firewall related?) Nov 7, 2023
Copy link

This issue has not seen activity for 60 days. It is now marked as stale. Please provide additional information or this issue may be closed in the future. We value your contribution and would love to hear more!

Copy link

github-actions bot commented May 9, 2024

This issue has not seen activity for 60 days. It is now marked as stale. Please provide additional information or this issue may be closed in the future. We value your contribution and would love to hear more!

@drew2a
Copy link
Contributor

drew2a commented Jun 3, 2024

Still occuring in 7.14

@drew2a drew2a changed the title [7.10] OSError: [Errno 22] Invalid argument (Mac firewall related?) [7.10] OSError: [Errno 22] Invalid argument Jun 3, 2024
Copy link

github-actions bot commented Aug 5, 2024

This issue has not seen activity for 60 days. It is now marked as stale. Please provide additional information or this issue may be closed in the future. We value your contribution and would love to hear more!

@qstokkink
Copy link
Contributor

From the point of aiohttp, it makes sense to crash here: tcp_keepalive is requested and supported but the given socket cannot apply the tcp_keepalive.

From our point of view, tcp_keepalive is completely optional and Tribler works just fine without it.

Given the internal structure of aiohttp, the only realistic option I see is to wrap tcp_keepalive and catch the error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

4 participants