Out-of-process WSL plugin runtime
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- cpp
- Ambito
- operating-systems
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- C++
- Stelle
- 34.4k
- Fork
- 1.9k
- Merge medio
- 1g 23h
- PR unite (30g)
- 166
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di microsoft/WSL
-
feature wsl2
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
microsoft/WSL#42306 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
feature
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
microsoft/WSL#42114 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
feature kernel wsl2
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
microsoft/WSL#41107 · 3 commenti · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
feature kernel
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
microsoft/WSL#41054 · 9 commenti · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
feature GPU
Difficoltà 1/5 1-3 ore Idoneità per principianti 70/100
microsoft/WSL#13592 · 4 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di microsoft/WSL
Issue simili
-
needs-format
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
Niko1221/Strata#6251 · 1 commento ·
I maintainer di solito rispondono entro 5 giorni
-
[Bug]: NP 管理器文件编辑器里删除键无效Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
metasequoiaime/msime#11666 ·
I maintainer di solito rispondono entro 1 giorno
-
DAE2 crashes on call.without.effects with a non ref.func expressionForse già presa @stevenfontanella l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
WebAssembly/binaryen#9404 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 65/100
CodeZombie/goodluckOS#178 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
CVO-Org/immersive-cigs-rewrite#313 ·
I maintainer di solito rispondono entro 1 giorno