Bound the signal transport drain by signal count, not file size
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 51/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- c
調査の方向性
Start in src/syscall/proc.c at drain_signal_transport and read the review discussion linked from #505 for context. Trace how the transport file is read under flock and how drained records are handled after unlocking. Done when standard signals are collapsed to at most one pending record each, while real-time signals and reparent records remain individually handled, without memory use scaling with the transport file size.
索引モデルが issue の本文から書いたものです。
説明
Follow-up from #505 (review comment https://github.com/sysprog21/elfuse/pull/505#discussion_r4526279782).
drain_signal_transport in src/syscall/proc.c reads the whole transport file into one malloc(st_size) buffer while holding the file's flock. Another guest process can keep appending records to a stopped process's transport, and each record is one line, so the file and that single allocation can grow without limit. When malloc fails, the drain keeps the records and sets the drain flag again, so every vCPU exit retries the same allocation.
Standard signals (1 to 31) merge while pending, so a drain needs at most one record per standard signal. Real-time signals and reparent ("R") records are different: each one is handled separately. Proposed: while holding the flock, read the file in fixed-size chunks and collapse duplicate standard-signal records into a pending set. Then handle the set and the remaining records after the flock is released, as the drain does today. The memory a drain uses would then grow with the number of real-time and reparent records, not with the file size.
- 主要言語
- C
- スター
- 287
- フォーク
- 33
- 平均マージ
- 2日 17時間
- マージ済み PR(30日)
- 18
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
sysprog21/elfuse のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
メンテナーはふだん 2 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 80/100
メンテナーはふだん 2 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
メンテナーはふだん 2 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 2 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 2 日以内に返信
sysprog21/elfuse の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
libreswan/libreswan#3185 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
category:port-update
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 2 日以内に返信
-
llvm:instcombine
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
llvm/llvm-project#246503 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信