Out-of-process WSL plugin runtime
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- cpp
調査の方向性
Start by reading the WSL plugin loading and runtime entry points; the issue does not name specific files or tests. The proposal requires designing process isolation, lifecycle control, restart behavior, and plugin initialization events. Done would mean agreeing on an architecture that supports those capabilities without restarting the WSL service.
索引モデルが issue の本文から書いたものです。
説明
Problem
Currently, a WSL plugin is a DLL directly loaded into the wslservice.exe process when it starts. There is no way to manage the lifecycle of that library other than that, which is quite inconvenient.
Indeed, when installing the file at a certain path and then registering it in the right Registry key, then it is not possible to instruct the WSL runtime to load it immediately. Similarly, when updating it, there is no way to instruct the runtime to unload it and load the new one. This makes it hard to handle the basics of software integration.
Also, having the library directly loaded into a central process poses a few risks that cannot be managed externally:
- if some of its code crashes, then the WSL service crashes as well;
- if it gets stuck, then it is not possible to "unstick" it by for example killing it without actually killing the WSL service process;
- potentially-vulnerable code gets brought into the WSL service process, thus enabling some attack surface;
- ...
Solution
The ideal would be to move plugins into processes, one per plugin, dedicated to handling their execution with respect to the global runtime that would communicate with them. This would be effectively similar to COM servers in spirit. Some control over these service-like processes would be nice too.
This way, if a crash occurs in a plugin, then only its dedicated runtime process would crash, thus improving safety. Then, upon such an event, the global WSL runtime could detect that this process died and automatically restart it. Also, it would enable managing plugins externally: it would become possible to just stop a plugin process, update its library and instruct the runtime to load it again without restarting the entire WSL service.
Upon a load, it would be nice to also add some kind of event the plugin could react to in order to be able to call the API and perform any initialization/update of what it performs in the Linux space. Alternatively, an already-existing event or series of events recorded until load time could be fired at the newly-loaded plugin to achieve the same end result.
Alternatives
- Just some control over the load and unload of the plugins, but I'm not sure if that's really possible with loader APIs.
- Just restarting the WSL service upon installing or updating a plugin, but that is extremely aggressive and may very well result in data loss, especially considering how WSL2 and WSLG are used mostly interactively by end users.
- 主要言語
- C++
- スター
- 34.4k
- フォーク
- 1.9k
- 平均マージ
- 1日 23時間
- マージ済み PR(30日)
- 166
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/WSL のほかの issue
-
feature wsl2
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
microsoft/WSL#42306 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
feature
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
microsoft/WSL#42114 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
feature kernel wsl2
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
microsoft/WSL#41107 · コメント 3 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
feature kernel
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
microsoft/WSL#41054 · コメント 9 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
feature GPU
難易度 1/5 1〜3時間 初心者へのやさしさ 70/100
microsoft/WSL#13592 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
HarperFast/rocksdb-js#1131 ·
メンテナーはふだん 1 日以内に返信
-
area/daemon bug good first issue platform/linux priority/p2
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
ToshiNamura/Deimos#5 ·
-
needs-format
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
Niko1221/Strata#6251 · コメント 1 件 ·
メンテナーはふだん 5 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
metasequoiaime/msime#11666 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
patrick-hudson/put.gd-desktop#1679 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信