microsoft / microsoft/BuildXL

How to run multiple parallel SandboxProcesses

Open
#1,347 12 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.