Skip to content
This repository was archived by the owner on Sep 4, 2024. It is now read-only.
This repository was archived by the owner on Sep 4, 2024. It is now read-only.

Cygwin error during git push azure master #878

Closed

Description

@tjanczuk

/cc @davidebbo

  1. Create a new site from within an existing local repo azure site create --git. The local repo size is ~3.5MB
  2. Set the site mode to Standard (via portal) - not clear if this is relevant.
  3. Try to deploy with git push azure master.

Expected:

Kudu repo updated, files copied to wwwroot, site can be accessed in browser.

Actual:

C:\projects\libreweb>git push azure master
Password for 'https://mobilechapters@mobilechapters.scm.azurewebsites.net':
Counting objects: 2175, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (1925/1925), done.
Writing objects: 100% (2175/2175), 3.42 MiB | 501.00 KiB/s, done.
Total 2175 (delta 1407), reused 284 (delta 160)
remote:       0 [main] us 0 init_cheap: VirtualAlloc pointer is null, Win32 error 487
remote: AllocationBase 0x9D0000, BaseAddress 0xA00000, RegionSize 0x150000, State 0x2000
remote: D:\Program Files (x86)\Git\bin\sh.exe: *** Couldn't reserve space for cygwin's heap, Win32 error 0
To https://mobilechapters@mobilechapters.scm.azurewebsites.net/mobilechapters.git

Subsequent git push azure master claims the Kudu repo is up to date:

C:\projects\libreweb>git push azure master
Password for 'https://mobilechapters@mobilechapters.scm.azurewebsites.net':
Everything up-to-date

Yet navigating to the site in browser yields the autogenerated landing page - it is clear files have not been copied to wwwroot.
@gissues:{"order":77.88461538461526,"status":"backlog"}

Activity

  1. tjanczuk commented on Dec 2, 2013

    @tjanczuk
    ContributorAuthor

    Making a dummy change in local git repo and re-running git push azure master appears to complete the process of copying files from the Kudu repo to wwwroot.

  2. davidebbo commented on Dec 2, 2013

    @davidebbo
    Member

    This is an issue that we had a while back, and seems to be a general msysgit thing that people run into occasionally (not related to WAWS). e.g. see various references to it. From our experience, this happens at most once on a given server, so I suspect you won't hit this again (though you may get moved to a different server later).

    One advice given in a few places is to rebase msys-1.0.dll, though the exact rebase address varies depending on who you ask! e.g. see here vs there.

    At the time (around April I think), we ended up resolving the issue by rebasing using this command when the worker starts:

    "%ProgramFiles(x86)%\Git\bin\rebase.exe" -b 0x30000000 "%ProgramFiles(x86)%\Git\bin\msys-1.0.dll"
    

    And the issue completely disappeared at that point.

    Right now, I don't understand what is causing it to happen again. What makes it tricky is that it's very hard to repro, and no one truly seems to understand the root of the issue.

  3. tjanczuk commented on Dec 2, 2013

    @tjanczuk
    ContributorAuthor

    It ranks 387 on my list of problems to deal with (the preceding 386 are mostly about IE Mobile), so no big deal. I just thought you would want to know.

  4. davidebbo commented on Dec 2, 2013

    @davidebbo
    Member

    Yes, we do want to know since we thought we had it nailed. :(

  5. modified the milestones: S27, S26 on Feb 5, 2014
  6. davidebbo commented on Mar 10, 2014

    @davidebbo
    Member

    There have been no other reports of this. Closing it as a freak incident :)

  7. AlanParr commented on May 31, 2014

    @AlanParr

    I am now experiencing this issue on a website that was created just today, my first push was successful although the deployment failed for unrelated reasons (missing assemblies). I have attempted to push several more times after making arbitrary changes to the project and just get Everything up-to-date every time.
    Do you need me to open a new issue or can we re-use this one?

  8. suwatch commented on May 31, 2014

    @suwatch
    Member

    @AlanParr if you retry, is it successful?

  9. AlanParr commented on May 31, 2014

    @AlanParr

    Have retried several times with no success.

  10. davidebbo commented on May 31, 2014

    @davidebbo
    Member

    Do you mean that you get the cygwin error every time, or just the message saying it's up to date? If the latter, just try to push an empty commit, which should unblock it.

  11. AlanParr commented on May 31, 2014

    @AlanParr

    Just the everything up to date error. Sorry, didn't see that there was another error associated with this issue.

  12. davidebbo commented on May 31, 2014

    @davidebbo
    Member

    Yes, the primary issue here is the cygwin error, with the 'up to date' part being a secondary side effect (see initial post). So if you never saw the cygwin error, it is definitely not related and would be better discussed separately.

  13. AlanParr commented on May 31, 2014

    @AlanParr

    I'll open a new issue.

  14. 3 remaining items

  15. brainded commented on Sep 3, 2015

    @brainded

    What I ended up doing to resolve the issue is spinning up a new slot to swap with and deploying the whole app again. This was the one time I've ever encountered this with the last year of using azure to deploy almost every single day. So rare indeed.

  16. davidebbo commented on Sep 3, 2015

    @davidebbo
    Member

    We're hoping to move to the newest msysgit 2.5 in the coming months, and hopefully it will address this issue.

  17. Praburaj commented on Sep 9, 2015

    @Praburaj

    I'm running into this in our azure websites too.

  18. davidebbo commented on Sep 10, 2015

    @davidebbo
    Member

    Keeping issue open.

  19. davidebbo commented on Sep 10, 2015

    @davidebbo
    Member
  20. jeroenseegers commented on Nov 13, 2015

    @jeroenseegers

    Just ran into this issue while deploying as well. Any updates on the status of this?

    Edit: For good measure, below are the two errors I encountered;

    First push:

    Password for 'https://...@.............scm.azurewebsites.net:443':
    Counting objects: 42, done.
    Delta compression using up to 8 threads.
    Compressing objects: 100% (42/42), done.
    Writing objects: 100% (42/42), 9.62 KiB | 0 bytes/s, done.
    Total 42 (delta 30), reused 0 (delta 0)
    remote:       0 [main] us 0 init_cheap: VirtualAlloc pointer is null, Win32 error 487
    remote: AllocationBase 0xB40000, BaseAddress 0xBC0000, RegionSize 0x40000, State 0x2000
    remote: D:\Program Files (x86)\Git\bin\sh.exe: *** Couldn't reserve space for cygwin's heap, Win32 error 0
    To https://...@.............scm.azurewebsites.net:443/....git
       8e68cb4..235fed3  master -> master
    

    Second push after another commit:

    Password for 'https://...@.............scm.azurewebsites.net:443':
    Counting objects: 7, done.
    Delta compression using up to 8 threads.
    Compressing objects: 100% (7/7), done.
    Writing objects: 100% (7/7), 580 bytes | 0 bytes/s, done.
    Total 7 (delta 5), reused 0 (delta 0)
    remote: Updating branch 'master'.
    remote: Updating submodules.
    remote: Preparing deployment for commit id '792caf04d8'.
    remote: Running custom deployment command...
    remote: Running deployment command...
    remote:       0 [main] us 0 init_cheap: VirtualAlloc pointer is null, Win32 error 487
    remote: AllocationBase 0xA10000, BaseAddress 0xA20000, RegionSize 0x171000, State 0x1000
    remote: D:\Program Files (x86)\Git\bin\bash.exe: *** Couldn't reserve space for cygwin's heap, Win32 error 0
    remote:
    remote: Error - Changes committed to remote repository but deployment to website failed.
    To https://...@.............scm.azurewebsites.net:443/....git
       235fed3..792caf0  master -> master
    

    Using the "workaround" from the documentation seems to have worked.

  21. EddieFarah commented on Dec 8, 2015

    @EddieFarah

    It seems that restarting the website (through azure dashboard) and then pushing/deploying again worked for me.

  22. M-rc-l commented on Feb 10, 2016

    @M-rc-l

    FYI; deployment on our webapp started to act weird yesterday evening. In the late afternoon the deployments were still working, but eventually we got weird nmp errors (like Error: EPERM: operation not permitted, rename).

    We've decided to delete the node_modules folder and execute an npm cache clean (which first failed but then worked).

    However, after that the couldn't reserver space for cygwin's heap errors started showing up at various places in the deployment sequence (on executing bash deploy.sh, on updating submodules and even when executing a ls -a through kuduexec).

    Neither start/stop nor restart of the web app nor various re-deployments (both via azure cli deployment redeploy and pushing dummy commits), have solved this problem for us.

    Any advice on how to solve this will be much appreciated...

    Best regards,
    Marcel

    p.s. If there are no other steps we can try, we are planning to remove and recreate the wep app... no problem since we are still in the testfase. However getting stuck on deployment like this doesn't really gives us much confidence that we can use Azure for production...

  23. davidebbo commented on Feb 10, 2016

    @davidebbo
    Member

    Normally, this error happens once (or sometimes once per tool) and then goes away on retry.

    We're in the process of upgrading the version of git running in Web Apps, which hopefully will resolve this.

  24. M-rc-l commented on Feb 10, 2016

    @M-rc-l

    Thanks for the reply @davidebbo.

    I left the instance alone for a couple of hours and just tried again. No more cygwin errors - yay!

    The first try did fail however - with an 'xyz' appears as both a file and a directory, stackTrace: at LibGit2Sharp.Core.Ensure.HandleError(Int32 result) error. So I guess the previous failures must have left the repo in some inconsistent state.

    After removing everything in d:/home/site/repository and re-initializing an git repo, the deployment started perfectly fine. However midway of npm install we're back to the npm ERR! EINVAL: invalid argument, rename ... error (will post complete error below, just in case you're interested).

    So I'm writing this (web app) instance off and will create and switch to a new one.

    ------ fyi snippet from log ------

    npm ERR! Windows_NT 6.2.9200
    npm ERR! argv "d:\\Program Files (x86)\\nodejs\\4.2.4\\node.exe" "D:\\Program Files (x86)\\npm\\2.14.12\\node_modules\\npm\\bin\\npm-cli.js" "install"
    npm ERR! node v4.2.4
    npm ERR! npm  v2.14.12
    npm ERR! path D:\home\site\repository\node_modules\grunt-contrib-cssmin\node_modules\maxmin\node_modules\pretty-bytes\node_modules\meow\node_modules\redent\node_modules\indent-string\node_modules\repeating\node_modules\is-finite\package.json.f47e5fb9605e791b223dbeab8189d496
    npm ERR! code EINVAL
    npm ERR! errno -4071
    npm ERR! syscall rename
    
    npm ERR! EINVAL: invalid argument, rename 'D:\home\site\repository\node_modules\grunt-contrib-cssmin\node_modules\maxmin\node_modules\pretty-bytes\node_modules\meow\node_modules\redent\node_modules\indent-string\node_modules\repeating\node_modules\is-finite\package.json.f47e5fb9605e791b223dbeab8189d496' -> 'D:\home\site\repository\node_modules\grunt-contrib-cssmin\node_modules\maxmin\node_modules\pretty-bytes\node_modules\meow\node_modules\redent\node_modules\indent-string\node_modules\repeating\node_modules\is-finite\package.json'
    npm ERR!
    npm ERR! If you need help, you may report this error at:
    npm ERR!     <https://github.com/npm/npm/issues>
    
    npm ERR! Please include the following file with any support request:
    npm ERR!     D:\home\site\repository\npm-debug.log
    deploy.sh: line 106: 12064 Signal 112              (core dumped) "D:\Program Files (x86)\nodejs\4.2.4\node.exe" "D:\Program Files (x86)\npm\2.14.12\node_modules\npm\bin\npm-cli.js" install
    c:\Program Files (x86)\SiteExtensions\Kudu\51.50119.2041\bin\scripts\starter.cmd bash deploy.sh, stackTrace:    at Kudu.Core.Infrastructure.Executable.ExecuteInternal(ITracer tracer, Func`2 onWriteOutput, Func`2 onWriteError, Encoding encoding, String arguments, Object[] args)
       at Kudu.Core.Infrastructure.Executable.ExecuteWithProgressWriter(ILogger logger, ITracer tracer, String arguments, Object[] args)
       at Kudu.Core.Deployment.Generator.ExternalCommandBuilder.RunCommand(DeploymentContext context, String command, String message)
       at Kudu.Core.Deployment.Generator.CustomBuilder.Build(DeploymentContext context)
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
       at Kudu.Core.Deployment.DeploymentManager.<Build>d__29.MoveNext()
    
  25. davidebbo commented on Feb 10, 2016

    @davidebbo
    Member

    @M-rc-l That npm error is almost certainly unrelated to this issue, so it will be best to investigate it separately. It's probably an instance of #1757, which is a path length issue.

  26. kevintauber commented on Mar 17, 2016

    @kevintauber

    I also just experienced this issue today. My second push without any changes said everything was up-to-date, but the original changes were successfully updated after a small pseudo change and new push. Here's my original failed attempt errors:

    remote: 0 [main] us 0 init_cheap: VirtualAlloc pointer is null, Win32 error 487
    remote: AllocationBase 0x0, BaseAddress 0x68570000, RegionSize 0x120000, State 0x10000
    remote: D:\Program Files (x86)\Git\bin\sh.exe: *** Couldn't reserve space for cygwin's heap, Win32 error 0
    
  27. davidebbo commented on Nov 2, 2016

    @davidebbo
    Member

    We now have a much newer git, and hopefully this should no longer happen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      ⌂ 换网址