Skip to content

Terminated processes are never de-registered from WasiControlPlane #6787

Description

@marxin

WasiControlPlane::new_process has a long-standing FIXME:
(lib/wasix/src/os/task/control_plane.rs:132)](

/// Creates a new process
// FIXME: De-register terminated processes!
// Currently they just accumulate.
pub fn new_process(&self, module_hash: ModuleHash) -> Result<WasiProcess, ControlPlaneError> {
)

When a WasiProcess finishes (exits or is killed), its entry is never removed from the control plane's process table. Every process a program spawns over its lifetime leaves behind a permanent record, so long-running hosts that spawn many short-lived children (e.g. PHP's shell_exec, posix_spawn-heavy workloads) accumulate an ever-growing set of dead WasiProcess structs.

Once this gets implemented, we can remove the workaround introduced in #6639 (original issue: #6637) connected to the SharedMemory.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions