Timeout is doubled - socket.create_connection()
オープン
まだ誰も着手していません。
stdlib
topic-socket
type-bug
- 主要言語
- Python
- スター
- 77.2k
- フォーク
- 35.9k
- PR マージ指標
- PR 指標を取得中
説明
Bug report
Bug description:
import socket
import time
start = time.time()
sock = socket.create_connection(
address=("foobar", 10000),
timeout=5)
print(time.time() - start)
No matter what value you specify as a timeout, the timeout is always doubled. If you specify 5 seconds, an exception will only be thrown after 10 seconds; if you specify 10 seconds, then only after 20.
Tested on Debian 12 with Python 3.11.
CPython versions tested on:
3.11
Operating systems tested on:
Linux
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
socket.create_connection() のエントリーポイントから始め、Linux 上で Python 3.11 を使って提供されたスクリプトを再現し、複数の timeout 値について経過時間を測定します。timeout の処理を追跡し、関連する回帰テストの場所を特定します。観測された timeout が要求した値と一致し、その動作がテストでカバーされていれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- networking
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 42/100