Skip to content

RunCmd() fails when invoked program writes a large amount to stdout (ex. greater than 770K) #129

Open
@singweeMsftGitHub

Description

@singweeMsftGitHub

This issue was discovered as part of a hang observed while running a Project Mu LicenseCheck.

The LicenseCheck plug-in calls RunCmd as follows:

return_buffer = StringIO()
params = "diff --unified=0 origin/master HEAD"
RunCmd("git", params, outstream=return_buffer)

RunCmd was found to hang if the diff generates a large amount of text (in my case, greater than 770K).

The following article suggests why this might be the case:
https://thraxil.org/users/anders/posts/2008/03/13/Subprocess-Hanging-PIPE-is-your-enemy/

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