How to run multiple parallel SandboxProcesses
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 1k
- Forks
- 167
- PR merge metrics
- No merged PRs in 30d
Description
I'm trying to run multiple MSBuild processes in parallel via SandboxedProcessFactory. Each process is given a different FileAccessManifest to block access to certain directories (which vary from process to process). I'm finding that the blocking is inconsistent such that it looks like the processes are stepping on each other. I get random blocks pretty reliably on some portion of the processes (always changing), but if I retry with the same manifests, they succeed. One other observation is that if I run the processes serially, everything works without issue.
My sandboxed process info looks like this:
var info = new SandboxedProcessInfo(
fileAccessManifest.PathTable,
null,
msbuildPath,
disableConHostSharing: true
loggingContext: new LoggingContext(nameof(BuildXLMSBuildInvoker)))
{
Arguments = arguments,
PipDescription = "Run MSBuild",
};
Is there a way to isolate the sandboxed processes from each other?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at SandboxedProcessFactory and SandboxedProcessInfo, using the reported setup to reproduce parallel MSBuild runs with distinct FileAccessManifest instances. Compare the parallel and serial cases; done means the isolation behavior is understood and the issue has a documented resolution or a confirmed reproducible defect.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100