Uploaded image for project: 'Sourcetree for Windows'
  1. Sourcetree for Windows
  2. SRCTREEWIN-8298

Sourcetree is spawning tonnes of child processes when a specific git repository is open

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: High High
    • None
    • 2.4.7.0, 2.4.8.0
    • None
    • Windows 10 Fall Creators Update

      Embedded Git 2.15.1 (LibGit2 disabled)

    • Severity 1 - Critical

      When I open the tab for one specific git repository in sourcetree, it starts spawning as many as a hundred child processes: console window host, git for windows (32 bit) and sh.exe (32 bit). This causes the antimalware service executable to go nuts and saturate the cpu usage to 100%. In sourcetree itself, there is a loading bar at the top of the left sidebar that doesn't go away. Switching to the tab for a different git repository causes all the child processes to go away and the cpu usage goes back to normal. Pretty sure it only started after updating from 2.3.5.0.

            [SRCTREEWIN-8298] Sourcetree is spawning tonnes of child processes when a specific git repository is open

            minnsey added a comment -

            neoscorpe we have made some changes to this in the current 3.0.0-beta. It would be useful if you were prepared to test this and see if it improves your situation.

            The beta tries to run in a sandboxed way, using its own configuration files, e.g. bookmarks and accounts,  but when opening the same repository it will change some of the per-repository configuration so it is worth making copy of problem repository and opening that with the beta.

            The installer can be downloaded here: https://bitbucket.org/atlassianlabs/sourcetree-betas/downloads/

             

            Alternatively closing all tabs a part from the problem one then opening the Tools/Process Viewer and reproducing the problem will list all the git commands being run, that information can be exported. If you exported that and, after doing a quick sanitization, posted it to the issue that would help.

            minnsey added a comment - neoscorpe we have made some changes to this in the current 3.0.0-beta. It would be useful if you were prepared to test this and see if it improves your situation. The beta tries to run in a sandboxed way, using its own configuration files, e.g. bookmarks and accounts,  but when opening the same repository it will change some of the per-repository configuration so it is worth making copy of problem repository and opening that with the beta. The installer can be downloaded here: https://bitbucket.org/atlassianlabs/sourcetree-betas/downloads/   Alternatively closing all tabs a part from the problem one then opening the Tools/Process Viewer and reproducing the problem will list all the git commands being run, that information can be exported. If you exported that and, after doing a quick sanitization, posted it to the issue that would help.

            Black Hat added a comment -

            Within SourceTree, you can see the Push changes immediately... checkbox flashes as it is enabled and disabled.

            mminns, I'm getting this happening again on a particular repository with Sourcetree 2.6.9. Unfortunately I can't share this repository with you. Is there any sort of logging that I can turn on in Sourcetree so I can provide you with more information to get this fixed?

            Black Hat added a comment - Within SourceTree, you can see the  Push changes immediately...  checkbox flashes as it is enabled and disabled. mminns , I'm getting this happening again on a particular repository with Sourcetree 2.6.9. Unfortunately I can't share this repository with you. Is there any sort of logging that I can turn on in Sourcetree so I can provide you with more information to get this fixed?

            I seem to be having the same issue. Sourcetree keeps becoming unusable (after a few minutes/hours using it) and starts using 95% cpu, I see the flickering of "Push changes immediately" and I see lots of command line / git processes, although I see at most four (maybe they simply go away faster because of my virus scanner doesn't interfere). 

            The repository where this happens isn't big at all. Its tiny and new. 

            I'm running 2.4.8.0 on Windows 10, with (this might be important) Visual Studio also running on the same folder with its own git integration. 

            Refresh automatically when files change is always off (as that never works). But still Sourcetree seems to be doing 'smart' things in the background. 

            Going to downgrade to v.2.3.5. 

             

             

            wouter_schut added a comment - I seem to be having the same issue. Sourcetree keeps becoming unusable (after a few minutes/hours using it) and starts using 95% cpu, I see the flickering of " Push changes immediately" and I see lots of command line / git processes, although I see at most four (maybe they simply go away faster because of my virus scanner doesn't interfere).   The repository where this happens isn't big at all. Its tiny and new.   I'm running 2.4.8.0 on Windows 10, with (this might be important) Visual Studio also running on the same folder with its own git integration.  Refresh automatically when files change is always off (as that never works). But still Sourcetree seems to be doing 'smart' things in the background.  Going to downgrade to v.2.3.5.     

            lpd added a comment -

            I think it might be proportional to the number of files in a submodule, cleaning out our biggest has helped immensely.

            lpd added a comment - I think it might be proportional to the number of files in a submodule, cleaning out our biggest has helped immensely.

            Black Hat added a comment -

            Is there any way that I can run two versions of SourceTree side-by-side? As you can imagine, this particular bug made SourceTree unusable, so I had to uninstall it and go back to v2.3.5.

            If I could keep 2.3.5 installed as the main version, but also install 2.4.7 where I encountered this bug, then I can try to reproduce it again.

            Black Hat added a comment - Is there any way that I can run two versions of SourceTree side-by-side? As you can imagine, this particular bug made SourceTree unusable, so I had to uninstall it and go back to v2.3.5. If I could keep 2.3.5 installed as the main version, but also install 2.4.7 where I encountered this bug, then I can try to reproduce it again.

            lpd added a comment - - edited

            It's the first tab open repository, about 8GB, git with a couple of submodules. Doesn't happen when I close all the other repository tabs and restart sourcetree.

            lpd added a comment - - edited It's the first tab open repository, about 8GB, git with a couple of submodules. Doesn't happen when I close all the other repository tabs and restart sourcetree.

            minnsey added a comment -

            Thanks for the information.

            Is it consistently 1 particular repository? Is there anything different about it?

            minnsey added a comment - Thanks for the information. Is it consistently 1 particular repository? Is there anything different about it?

            Black Hat added a comment -

            After upgrading to 2.4.7 on one of my PCs this started happening for a certain repository. Switch to a different tab and it stops. Switch back to that particular repo's tab and it starts again.

            Within SourceTree, you can see the Push changes immediately... checkbox flashes as it is enabled and disabled.

            It basically makes SourceTree unusable because any time you try to do some other operation (such as committing), you get an error along the lines on "Another git operation is in progress".

            For me it seemed a little bit different to what was shown in the attached screenshot. I was seeing the git processes being created, but they were also ending shortly after, so I had at most five or six git processes active at once, but you could see their process IDs changing in Task Manager.

            I'll see if I can reproduce this on a simple repository that I'm able to share with you.

            Black Hat added a comment - After upgrading to 2.4.7 on one of my PCs this started happening for a certain repository. Switch to a different tab and it stops. Switch back to that particular repo's tab and it starts again. Within SourceTree, you can see the  Push changes immediately... checkbox flashes as it is enabled and disabled. It basically makes SourceTree unusable because any time you try to do some other operation (such as committing), you get an error along the lines on "Another git operation is in progress". For me it seemed a little bit different to what was shown in the attached screenshot. I was seeing the git processes being created, but they were also ending shortly after, so I had at most five or six git processes active at once, but you could see their process IDs changing in Task Manager. I'll see if I can reproduce this on a simple repository that I'm able to share with you.

              Unassigned Unassigned
              25f5fcabbc91 lpd
              Affected customers:
              6 This affects my team
              Watchers:
              4 Start watching this issue

                Created:
                Updated: