MagicStack / MagicStack/uvloop

RuntimeError: File descriptor 2877 is used by transport <TCPTransport closed=False reading=True 0x55b8dc9baa90>

Ouverte
#653 2 commentaires 2 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Langage dominant
Cython
Étoiles
11.9k
Forks
616
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

In our service we had aiohttp==3.8.5 and upgraded aiohttp to 3.10.5 version. That is all. In production now we have issues like issue below.
Maybe i should to write issue to another libs, tell me about it if so, or maybe you have your own fix then tell me uvloop version i need to upgrade in my service.

traceback:

```
RuntimeError: File descriptor 2877 is used by transport
File "our_service/app/client.py", line 204, in get_recommendations
async with self._session.get(
File "aiohttp/client.py", line 1353, in __aenter__
self._resp = await self._coro
File "aiohttp/client.py", line 657, in _request
conn = await self._connector.connect(
File "aiohttp/connector.py", line 564, in connect
proto = await self._create_connection(req, traces, timeout)
File "aiohttp/connector.py", line 975, in _create_connection
_, proto = await self._create_direct_connection(req, traces, timeout)
File "aiohttp/connector.py", line 1319, in _create_direct_connection
transp, proto = await self._wrap_create_connection(
File "aiohttp/connector.py", line 1073, in _wrap_create_connection
sock = await aiohappyeyeballs.start_connection(
File "aiohappyeyeballs/impl.py", line 104, in start_connection
raise first_exception
File "aiohappyeyeballs/impl.py", line 82, in start_connection
sock = await _connect_sock(
File "aiohappyeyeballs/impl.py", line 174, in _connect_sock
await loop.sock_connect(sock, address)
File "uvloop/loop.pyx", line 2631, in sock_connect
fut = self._sock_connect(sock, address)
File "uvloop/loop.pyx", line 1089, in uvloop.loop.Loop._sock_connect
self._add_writer(sock, handle)
File "uvloop/loop.pyx", line 837, in uvloop.loop.Loop._add_writer
self._ensure_fd_no_transport(fd)
File "uvloop/loop.pyx", line 764, in uvloop.loop.Loop._ensure_fd_no_transport
raise RuntimeError(
```

python version:
Python 3.10.15

os info:
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
ID=debian

other installed libs:
aiohttp==3.10.5
aiohttp_traversal==0.11.0
aiojobs==1.2.0
asyncpg==0.29.0
orjson==3.9.10
uvloop==0.19.0
yarl==1.12.1

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Piste de recherche

Commencez par les points d’entrée du traceback dans uvloop/loop.pyx, en particulier _ensure_fd_no_transport et _add_writer, puis comparez-les avec aiohttp/connector.py et aiohappyeyeballs/impl.py pour les versions de dépendances signalées. Reproduisez le conflit de file-descriptor avec Python 3.10.15 sur Debian 12, avec uvloop 0.19.0 et aiohttp 3.10.5 ; le travail est terminé lorsqu’une cause reproductible est identifiée et qu’un test de régression ou un correctif de compatibilité documenté est fourni.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
python
Domaine
networking
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
À clarifier
Accessibilité débutants
25/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.