test_gc: a sleeping thread is not woken on time while others make short sleeps
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 12/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
調査の方向性
Start with just conformance python test_gc and the GCTests.test_trashcan_threads case, then read schedcoop_schedule and the futex-backed condition variables used for the GIL handoff. The payload suggests the stall is in that handoff, and lib/posix-poll/poll.c is where a timing-dependent change showed up. Done means test_gc passes reliably on x86 in CI and locally, and it is removed from conformance/python/known_failures.toml.
索引モデルが issue の本文から書いたものです。
説明
A thread sleeping in time.sleep() is not woken on time while other threads keep running short sleeps, so CPython's test_gc (GCTests.test_trashcan_threads) runs out of guest memory.
The test sleeps for 1 s in its main thread while two worker threads allocate and call time.sleep(0.000001) in a loop. The main thread then sets a flag that stops them. When its sleep overruns, the workers keep allocating until the kernel kills the guest:
ERR: [libposix_process] <deliver.c @ 640> Out of memory: killed process 2 (...)
- On
main(f74bf3d) it is intermittent:conformance (windows)crashedtest_gcon #154, 16 s in. - With the kernel of #156 it fails every time on x86, in CI (Linux, Windows) and locally (
just conformance python test_gc). That kernel's change does not touch sleeping or scheduling; a debug print inlib/posix-poll/poll.cmakes it pass again, so the failure depends on timing. - Instrumented, the main thread's
time.sleep(1.0)took 1.166 s with #156's kernel and 1.000 s withmain's.
schedcoop_schedule wakes expired sleepers on every switch, so the stall is more likely in the GIL handoff (condition variables over futexes) between the workers and the main thread.
test_gc is in conformance/python/known_failures.toml (may-fix.threading) until this is fixed.
- 主要言語
- Rust
- スター
- 72
- フォーク
- 14
- 平均マージ
- 15時間 29分
- マージ済み PR(30日)
- 40
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
hyperlight-dev/hyperlight-unikraft のほかの issue
-
dependencies
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
hyperlight-dev/hyperlight-unikraft#136 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
ci/nightly
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
hyperlight-dev/hyperlight-unikraft#290 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
ci/nightly
難易度 3/5 1〜2日 初心者へのやさしさ 25/100
hyperlight-dev/hyperlight-unikraft#288 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
ci/nightly
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
hyperlight-dev/hyperlight-unikraft#285 ·
メンテナーはふだん 1 日以内に返信
-
ci/nightly
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
hyperlight-dev/hyperlight-unikraft#262 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
hyperlight-dev/hyperlight-unikraft の issue をすべて見る
似ている issue
-
area:compat area:operations documentation ready-for-agent type:afk
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
ZcashFoundation/zinder#552 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
storytold/vectorcraft#9229 ·
メンテナーはふだん 1 日以内に返信