Skip to content

The output from the command could not fit into the allocated stdout buffer. Set options.maxBuffer to a larger value than 10485760 bytes #2449

Closed

Description

@mwp1990

Description

I used the github desktop to pull the code of linux repository from my github.and then issue it:
The output from the command could not fit into the allocated stdout buffer. Set options.maxBuffer to a larger value than 10485760 bytes

Version

GitHub Desktop version: 0.7.2

OS version: Microsoft Windows[version 6.1.7601]

Steps to Reproduce

  1. using the desktop to pull my respository from my github account.
  2. my github respository is https://github.com/torvalds/linux

The output from the command could not fit into the allocated stdout buffer. Set options.maxBuffer to a larger value than 10485760 bytes

Expected behavior: [What you expected to happen]

Actual behavior: [What actually happened]

Reproduces how often: [What percentage of the time does it reproduce?]

Logs

Additional Information

Activity

  1. added
    bug
    windows
    on Aug 11, 2017
  2. shiftkey commented on Aug 11, 2017

    @shiftkey
    Member

    I haven't tested this out on Windows 7 but a quick test on Windows 10 also fails, but in a slightly different way which I think is the same underlying issue as what you're seeing.

    There are known issues with cloning the linux repository down to a Windows filesystem - opening View | Toggle Developer tools shows me the end of a large error message:

    The interesting bit is these messages buried in the output:

    ...
    error: unable to create file drivers/gpu/drm/nouveau/nvkm/subdev/i2c/aux.c: No such file or directory
    error: unable to create file drivers/gpu/drm/nouveau/nvkm/subdev/i2c/aux.h: No such file or directory
    ... 
    error: unable to create file include/soc/arc/aux.h: No such file or directory
    

    These paths are problematic and not recommended for Windows (because they clash with device names from Ye Old Days™). From MSDN:

    Do not use the following reserved names for the name of a file:
    CON, PRN, AUX, NUL, COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9, LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, and LPT9. Also avoid these names followed immediately by an extension; for example, NUL.txt is not recommended. For more information, see Namespaces.

    To confirm this, try cloning the repository from the command line using Git for Windows - you should see the same behaviour.

  3. joshaber commented on Nov 13, 2017

    @joshaber
    Contributor

    From #3309:

    1. Generate 300,000 text files in a sub folder of around 100k each.
    2. Boom! you should have the problem.
  4. jera-sea commented on Mar 25, 2018

    @jera-sea

    I have the same problem,
    All I did was create an empty local repository and started getting this error immediately, it just keeps popping up in the app without me doing anything in the app.

  5. splorp commented on Apr 20, 2018

    @splorp

    I am seeing this same error in the current Mac release (version 1.1.1 running under Sierra 10.12.6) after moving a folder containing approximately 150,000 text files (each between 2–10kb in size) into my repo folder.

    The error message stopped appearing once I manually moved the folder containing the files out of the repo folder.

    screenshot 2018-04-20 15 31 13

  6. shiftkey commented on Apr 22, 2018

    @shiftkey
    Member

    @splorp could you attach the full log files? The Help | Show Logs in Finder menu items should open the logs folder, and inside those are the log files generated by day. This will provide some more information to help troubleshoot.

    I suspect this might be some limit we're encountering when having to deal with 150k untracked files in a new repository, but it'd be nice to get some additional clues about how to start digging.

  7. splorp commented on Apr 23, 2018

    @splorp

    @shiftkey Yes, I can do that, but it will have to wait a couple of weeks. I’m on the road for quite a while and that issue was on my desktop machine (where the log files reside).

  8. splorp commented on May 21, 2018

    @splorp

    O hai.

    Finally following up on this issue, I have attached the log files from the day I experienced the error (April 20th) as well as the previous and next days.

    2018-04-19.desktop.production.log
    2018-04-20.desktop.production.log
    2018-04-21.desktop.production.log

    I didn’t notice anything out of the ordinary in the logs, at least relating to the buffer.

    If you need me to generate a “fresh” error and log file, let me know.

  9. OMortensen commented on May 24, 2018

    @OMortensen

    I'm seeing this error on a new repository I just created for some code we've moved to github... How do I change the options.maxBuffer?

  10. shiftkey commented on May 27, 2018

    @shiftkey
    Member

    @OMortensen options.maxBuffer is set internally inside the Git library that we use:

    https://github.com/desktop/dugite/blob/0e951af6e73a7ffa536396a2f4f5a25af833fc0e/lib/git-process.ts#L160-L165

    Are you able to share a log file which triggers the issue? There's a couple of sets of repro steps here that we've been able to identify, and it'd be nice to see if yours is covered by those.

  11. OMortensen commented on May 29, 2018

    @OMortensen

    @shiftkey We were able to work around the issue by getting our .gitignore file configured properly (10K+ images and other support files that do not need to be source controlled). Seems like an issue with the number of files in a single repo...

  12. nerdneha commented on Jun 15, 2018

    @nerdneha
    Contributor

    I was able to reproduce this!!

    Steps:

    1. cd /
    2. git init
    3. Go to Desktop app
    4. Add root (/) as a local repository
    5. See the error pop up 👇
      max-buffer-error

    Log file:
    2018-06-15.desktop.production.log

    Some further evidence: I can easily do agit status in my command line, but if you see the console logs in the gif, we're doing a git status --untracked-files=all. When I do this in the command line, it stalls.

  13. shiftkey commented on Jun 22, 2018

    @shiftkey
    Member

    @nerdneha great work on reproducing it. We do git status --untracked-files=all so that we can list all the files under the Changes tab, but clearly we're encountering an upper bound about how many files we can list out from Node in 10MB of process output.

    We actually have an option for maxBuffer here on the operations we pass into dugite:

          const execOptions: ExecOptionsWithStringEncoding = {
            cwd: path,
            encoding: 'utf8',
            maxBuffer: options ? options.maxBuffer : 10 * 1024 * 1024,
            env
          }

    That's where the 10485760 bytes number in the error message comes from. I've opened #5011 to talk about a workaround and whether there are better solutions out there that leverage Git itself.

  14. added this to the 1.3.0 milestone on Jul 19, 2018
  15. locked as resolved and limited conversation to collaborators on Sep 18, 2018
  16. unlocked this conversation on Sep 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugwindows

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions