Skip to content

ValueError: filedescriptor out of range in select() #1379

Closed

Description

@zhenglilei

Checklist

  • The bug is reproducible against the latest release and/or master.
  • There are no similar issues or pull requests to fix it yet.

Describe the bug

ERROR:grpc._server:Exception calling application: filedescriptor out of range in select()
Traceback (most recent call last):
  File "/ldap_home/lilei.zheng/king-live/tools/../src/kingcrab_server.py", line 66, in get_blacklist
    response = httpx_client.get(req_url, headers=headers, cookies=cookies, timeout=2.0)
  File "/ldap_home/lilei.zheng/.conda/envs/crabs/lib/python3.6/site-packages/httpx/_client.py", line 812, in get
    timeout=timeout,
  File "/ldap_home/lilei.zheng/.conda/envs/crabs/lib/python3.6/site-packages/httpx/_client.py", line 641, in request
    request, auth=auth, allow_redirects=allow_redirects, timeout=timeout,
  File "/ldap_home/lilei.zheng/.conda/envs/crabs/lib/python3.6/site-packages/httpx/_client.py", line 671, in send
    request, auth=auth, timeout=timeout, allow_redirects=allow_redirects,
  File "/ldap_home/lilei.zheng/.conda/envs/crabs/lib/python3.6/site-packages/httpx/_client.py", line 700, in _send_handling_redirects
    request, auth=auth, timeout=timeout, history=history
  File "/ldap_home/lilei.zheng/.conda/envs/crabs/lib/python3.6/site-packages/httpx/_client.py", line 736, in _send_handling_auth
    response = self._send_single_request(request, timeout)
  File "/ldap_home/lilei.zheng/.conda/envs/crabs/lib/python3.6/site-packages/httpx/_client.py", line 770, in _send_single_request
    timeout=timeout.as_dict(),
  File "/ldap_home/lilei.zheng/.conda/envs/crabs/lib/python3.6/site-packages/httpcore/_sync/connection_pool.py", line 165, in request
    connection = self._get_connection_from_pool(origin)
  File "/ldap_home/lilei.zheng/.conda/envs/crabs/lib/python3.6/site-packages/httpcore/_sync/connection_pool.py", line 209, in _get_connection_from_pool
    if connection.is_connection_dropped():
  File "/ldap_home/lilei.zheng/.conda/envs/crabs/lib/python3.6/site-packages/httpcore/_sync/connection.py", line 137, in is_connection_dropped
    return self.connection is not None and self.connection.is_connection_dropped()
  File "/ldap_home/lilei.zheng/.conda/envs/crabs/lib/python3.6/site-packages/httpcore/_sync/http11.py", line 193, in is_connection_dropped
    return self.socket.is_connection_dropped()
  File "/ldap_home/lilei.zheng/.conda/envs/crabs/lib/python3.6/site-packages/httpcore/_backends/sync.py", line 84, in is_connection_dropped
    rready, _wready, _xready = select.select([self.sock], [], [], 0)
ValueError: filedescriptor out of range in select()

To reproduce

Expected behavior

Actual behavior

Debugging material

Environment

  • OS: Linux
  • Python version: 3.6.12
  • HTTPX version: 0.14.1
  • Async environment:
  • HTTP proxy:
  • Custom certificates:

Additional context

It is suggested using select.poll() instead of select.select(), please refer docker/docker-py#2278

Activity

  1. florimondmanca commented on Nov 4, 2020

    @florimondmanca
    Contributor

    Hey!

    This is very likely a duplicate of encode/httpcore#182.

    I'm working on issuing a release of HTTPCore with the fix for ^, will report back and close when done. :-)

  2. added
    duplicateThis issue or pull request already exists
    httpcoreIssues related to HTTPCore (core HTTP networking layer) - https://github.com/encode/httpcore
    on Nov 4, 2020
  3. florimondmanca commented on Nov 4, 2020

    @florimondmanca
    Contributor

    @zhenglilei Will be released via encode/httpcore#231, thanks!

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already existshttpcoreIssues related to HTTPCore (core HTTP networking layer) - https://github.com/encode/httpcore

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions