• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Highest Highest
    • None
    • 2.0.3, 2.2.4
    • General, Git
    • None
    • standalone; Java 7 Update 51; Mac OS X 10.7.5

    • Severity 2 - Major

      When SourceTree is running for a few days without being turned off, the number of descriptors of opened files becomes too large and eventually the system runs off file descriptors. Most of them are pipes, example output of lsof command is given below.

      iMac-Evgenia:scripts fedor$ lsof | grep "SourceTre" | wc -l
          3932
      iMac-Evgenia:scripts fedor$ lsof
      COMMAND     PID  USER   FD     TYPE             DEVICE   SIZE/OFF        NODE NAME
      ...
      SourceTre  3021 fedor 3574     PIPE 0xffffff801afcdd30       4096     
      SourceTre  3021 fedor 3575     PIPE 0xffffff801b0591b0       4096   
      SourceTre  3021 fedor 3576     PIPE 0xffffff8035715d60       4096 
      SourceTre  3021 fedor 3577     PIPE 0xffffff8029292310       4096 
      SourceTre  3021 fedor 3578     PIPE 0xffffff8025641c80       4096
      SourceTre  3021 fedor 3579     PIPE 0xffffff802c5a1210       4096
      SourceTre  3021 fedor 3580     PIPE 0xffffff80271e0000       4096
      SourceTre  3021 fedor 3581     PIPE 0xffffff801d400a70       4096
      ...

      After SourceTree is restarted, the number of file descriptors becomes normal. But as the time goes on, their number increases. The following commands are executed with the interval of about 1 - 5 minutes. It looks like some leakage of descriptors.

      iMac-Evgenia:scripts fedor$ lsof | grep "SourceTre" | wc -l
           111
      iMac-Evgenia:scripts fedor$ lsof | grep "SourceTre" | wc -l
           143
      iMac-Evgenia:scripts fedor$ lsof | grep "SourceTre" | wc -l
           158
      iMac-Evgenia:scripts fedor$ lsof | grep "SourceTre" | wc -l
           153
      iMac-Evgenia:scripts fedor$ lsof | grep "SourceTre" | wc -l
           171
      iMac-Evgenia:scripts fedor$ lsof | grep "SourceTre" | wc -l
           178
      iMac-Evgenia:scripts fedor$ lsof | grep "SourceTre" | wc -l
           181

            [SRCTREE-2058] Too many open file descriptors

            Hi, 06e932b7ec4e 

            Sad to hear that. We already received one report about reproducing this issue. Most probably it means this issue was not fully fixed OR fix got regressed in latest version.

            Does it happens regularly for you, or it was one time issue?

            Maybe there is chance that you will be able to provide answers to these questions:

            1. How many repositories you have added in Sourcetree?
            2. Are you using repositories with submodules?
            3. How long it takes for this issue to occur on your machine? (time from starting Sourcetree, till issue occurs, some estimated time, like 1hour or 1 day)
            4. Maybe you could notice, which operations in Sourcetree you are performing most frequently? Or this issue occurs even Sourctree is idle?
            5. Which macOS version is installed on your machine? 
            6. Which platform you are using (intel, arm)?
            7. Which git version is configured in Sourcetree settings: system or embedded?
            8. Maybe you have some observations, which you think could help to understand some sequence of appearing this issue?

            Raman Sidarakin (Inactive) added a comment - Hi, 06e932b7ec4e   Sad to hear that. We already received one report about reproducing this issue. Most probably it means this issue was not fully fixed OR fix got regressed in latest version. Does it happens regularly for you, or it was one time issue? Maybe there is chance that you will be able to provide answers to these questions: How many repositories you have added in Sourcetree? Are you using repositories with submodules? How long it takes for this issue to occur on your machine? (time from starting Sourcetree, till issue occurs, some estimated time, like 1hour or 1 day) Maybe you could notice, which operations in Sourcetree you are performing most frequently? Or this issue occurs even Sourctree is idle? Which macOS version is installed on your machine?  Which platform you are using (intel, arm)? Which git version is configured in Sourcetree settings: system or embedded? Maybe you have some observations, which you think could help to understand some sequence of appearing this issue?

            karptonite added a comment -

            I just ran into this issue in 4.2.7. Is it possibly not fully fixed? 

            karptonite added a comment - I just ran into this issue in 4.2.7. Is it possibly not fully fixed? 

            Confirming the issue appears fixed indeed, thanks!

            Petr Lefner added a comment - Confirming the issue appears fixed indeed, thanks!

            Fixed in 4.2.3

            Arati Mohanty added a comment - Fixed in 4.2.3

            @martinwinter Nemo iudex sine actore.

            Petr Lefner added a comment - @martinwinter Nemo iudex sine actore.

            martinwinter added a comment - - edited

            (I last commented almost three years ago, no change since)

            The point is that to my knowledge, no other Git client in existence has this issue. It is a matter of poor design. I can understand that fixing this bug might take some substantial effort, but this ticket still being in the “gathering impact” stage is comical.

            Edit: As written before, I happily switched to Fork and have not looked back.

            martinwinter added a comment - - edited (I last commented almost three years ago, no change since) The point is that to my knowledge, no other Git client in existence has this issue. It is a matter of poor design. I can understand that fixing this bug might take some substantial effort, but this ticket still being in the “gathering impact” stage is comical. Edit: As written before, I happily switched to Fork and have not looked back.

            For the record, I'm experiencing this issue for ages; right now I'm using the latest SourceTree 4.2.0 (246, no license) on macOS Monterey 12.6.

            In my case, I have added about 300> repositories within Sourcetree. By simple check within Activity Monitor, one can see how many files the app keeps open. With such a number of repo's, no wonder the app reaches the limit and crashes - supposed that the longer the app runs and the more repositories it's consistently tracking, the sooner it crashes.

            On the other hand, recent releases seem more stable, than e.g. those 2 years ago - at least in my case. 

             

            Petr Lefner added a comment - For the record, I'm experiencing this issue for ages; right now I'm using the latest SourceTree 4.2.0 (246, no license) on macOS Monterey 12.6. In my case, I have added about 300> repositories within Sourcetree. By simple check within Activity Monitor, one can see how many files the app keeps open. With such a number of repo's, no wonder the app reaches the limit and crashes - supposed that the longer the app runs and the more repositories it's consistently tracking, the sooner it crashes. On the other hand, recent releases seem more stable, than e.g. those 2 years ago - at least in my case.   

            m_gol added a comment -

            For the record, I haven't seen this issue for ages; right now I'm using the latest SourceTree 4.2.0 (246) on macOS Monterey 12.6.1.

            m_gol added a comment - For the record, I haven't seen this issue for ages; right now I'm using the latest SourceTree 4.2.0 (246) on macOS Monterey 12.6.1.

            This is really super annoying, please fix. It has been bugging me for years but recently it as gotten much worse.

            Eric Bodden added a comment - This is really super annoying, please fix. It has been bugging me for years but recently it as gotten much worse.

            Nikolas Mayr added a comment - - edited

            It would be good, if this was solved. Happens to me every few weeks. It is a real bug. It should not have medium priority.

            Sourcetree 4.2.0 (246)

             

            > ps ax | grep Sourcetree

              510   ??  S     35:05.79 /Applications/Sourcetree.app/Contents/MacOS/Sourcetree

             

            > lsof -p 510 | wc

                7209

            Nikolas Mayr added a comment - - edited It would be good, if this was solved. Happens to me every few weeks. It is a real bug. It should not have medium priority. Sourcetree 4.2.0 (246)   > ps ax | grep Sourcetree   510   ??  S     35:05.79 /Applications/Sourcetree.app/Contents/MacOS/Sourcetree   > lsof -p 510 | wc     7209

              43c951f935c6 Raman Sidarakin (Inactive)
              2bca40367604 Fedor Ermishin
              Affected customers:
              20 This affects my team
              Watchers:
              35 Start watching this issue

                Created:
                Updated:
                Resolved: