-
Notifications
You must be signed in to change notification settings - Fork 1k
Description
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).