PVF: ensure job processes are cleaned up, add tests (#2643)
Fixes a potential memory leak. `PR_SET_PDEATHSIG` is used to terminate children when the parent dies. Note that this is subject to a race. There seems to be a raceless alternative [here](https://stackoverflow.com/a/42498370/6085242), but the concern is small enough that a bit more complexity doesn't seem worth it. Left a bit more info in the code comment.
Showing
- polkadot/node/core/pvf/common/src/execute.rs 2 additions, 0 deletionspolkadot/node/core/pvf/common/src/execute.rs
- polkadot/node/core/pvf/execute-worker/src/lib.rs 9 additions, 0 deletionspolkadot/node/core/pvf/execute-worker/src/lib.rs
- polkadot/node/core/pvf/prepare-worker/src/lib.rs 9 additions, 0 deletionspolkadot/node/core/pvf/prepare-worker/src/lib.rs
- polkadot/node/core/pvf/src/worker_interface.rs 3 additions, 3 deletionspolkadot/node/core/pvf/src/worker_interface.rs
- polkadot/node/core/pvf/tests/it/process.rs 78 additions, 77 deletionspolkadot/node/core/pvf/tests/it/process.rs
Please register or sign in to comment