Possible lost notification in threading.Condition when a waiter times out
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
Start by reading threading.Condition in Lib/threading.py and its tests under Lib/test; the report concerns timeout handling when multiple waiters share a condition and notify(1) is called. Reproduce the two-waiter timing scenario, then check whether a notification can be consumed after a waiter's timeout. Done means the behavior is clarified or corrected and covered by a regression test; the issue links PR 160503.
索引モデルが issue の本文から書いたものです。
説明
Bug report
Hi,
I noticed some unexpected behavior while testing threading.Condition on Python 3.14.4.
I created two threads waiting on the same condition. The first thread has a short timeout, while the second has a longer timeout. I then held the condition lock until the first waiter's timeout expired and called notify(1).
In my test, both wait() calls returned False, even though I called notify(1) while two waiters were still present in the internal wait queue. I observed the same result in 100 consecutive runs.
I'm not sure whether this is expected behavior or a race condition in how timed-out waiters are handled. Could someone clarify whether this behavior is expected? If not, it may be possible for a notification to be consumed by a waiter whose timeout has already expired, leaving another waiter waiting until its own timeout.
I can provide the minimal reproduction script and terminal output to help investigate.
CPython versions tested on:
3.14
Operating systems tested on:
Linux
Linked PRs
- gh-160503
- 主要言語
- Python
- スター
- 77.7k
- フォーク
- 38.3k
- 平均マージ
- 12時間 27分
- マージ済み PR(30日)
- 710
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
python/cpython のほかの issue
-
3.16 build type-bug
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
python/cpython#160829 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信
-
dependencies infra topic-ensurepip
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
メンテナーはふだん 1 日以内に返信
-
symtable: repr() of a Symbol raises TypeError under -X lazy_imports=all対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンstdlib topic-lazy-imports type-bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
python/cpython#160810 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
tarfile: extractfile(member).read() of a sparse member is slow due to repeated bytes concatenationオープンperformance stdlib triaged type-bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
python/cpython#160774 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
tests topic-profiling type-bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
python/cpython#160334 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
似ている issue
-
area/profiles comp/cli P3 type/feature
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
NousResearch/hermes-agent#146372 ·
メンテナーはふだん 1 日以内に返信
-
[BUG] OpenAI-compatible embedding model alias breaks embedder construction対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
[oblt-aw][autodoc] Document obs-aw-automerge contract and fix automerge doc inconsistencies対応中かも @github-actions が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
GeoSeries scale and skew tests fail with pytest 9.2.0対応中かも @jiayuasu が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
admission-deferred priority: medium status: ready work-class: scoped
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
melodic-software/claude-code-plugins#10887 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信