Skip to content

PVF: consider spawning a new process per job #584

@mrcnski

Description

@mrcnski

Currently we spawn worker processes for PVF jobs (prepare/execute) and each incoming job gets its own thread within that process.

This works fine but there are potential security issues with this as described in paritytech/polkadot#7580 (comment). Namely, we can't fully sandbox the process because we have to have an allow-exception for the entire PVF artifact cache directory.

We should investigate the overhead of spawning a whole separate process for each job as opposed to a thread. It may be less overhead now that we are spawning processes from smaller worker binaries instead of polkadot. If the cost is low enough, we can switch to one-process-per-job which allows us to sandbox the process better.

This would probably also come with changes to the execution queue logic (most likely simplifications).

Metadata

Metadata

Assignees

Labels

I1-securityThe node fails to follow expected, security-sensitive, behaviour.

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions