Skip to content

How to run multiple parallel SandboxProcesses #1347

@mwelsh1118

Description

@mwelsh1118

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions