You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yesterday, I pulled and built the latest commits (0378e8e, merge PR #103) and I've been experiencing frequent problems with the process going out of control. At first, I thought it was just a particularly gruesome refactoring I was working on with 1000s of changed files, but I just opened the gitx repo and it started doing it too. The process was using over 250% of the cpu and my load average got up to 120 at one point!
Unfortunately, I'm having a hard time figuring out how to reproduce it w/o knowing more about how GitX works. Sometimes it seems to be getting hung up while "Refreshing index..." but other times that seems to go fine only for it to hang up when I stage something. Even though it hung up in the gitx repo a few minutes ago, I can't figure out how to get it to happen again. In my "refactor" repo, though, opening it up and staging any change (a single line, a chunk, or a whole file) will immediately cause it start consuming 100%+ cpu (and climbing) and the entire mac UI becomes sluggish until I kill the process.
I tried a build from commit fe6f3e2 and that seems to not be affected, though, again, I'm having a hard time figuring out exactly what's happening. Regardless, I was able to navigate and stage a number of changes w/ no issue from that build, while the more recent build would hang on every stage.
I'll keep exploring and post more info if/as I find it. Thanks!
Try looking at the task, it has a debug mode that might help (a4102a3). ISTR there could be some runaway things that could cause CPU usage to go haywire (symptoms are a crazy amount of scheduled tasks when you pause in the debugger). But unless you were running a build from after #117, that might not be it…
If you can post a full backtrace of the lockup somewhere, that'd be helpful.
Sorry for being dense (I don't do any development for macOS or with Xcode) but how do I go about looking at the task and getting a backtrace? Would that be me running the app in the Xcode debugger? If so, I'll see what I can do, but that might be over my head.
Oh don't worry, that's fine. You should be able to run GitX under Xcode (big "play" button in the toolbar), which starts it under the debugger. You should be able to control the debugger via the little icons at the bottom of the text view (you might need to deploy it, that's one of the buttons to the right of the toolbar). Clicking the "play/pause" button down there will pause the application, interrupting whatever it's doing. Then you can bt all in the (lldb) console in the bottom right, and copy that. I hope that's clear enough…
Do you happen to have "Watch for changes in repositories" enabled in the preferences ? I actually have that disabled because it's causing concurrency issues (say when rebasing from the cli), because GitX will see something moving, trigger a refresh (which will lock something in the repo, likely the index) and then your cli action gets aborted.
This is no longer a problem for me. I've gotten used to cmd+R to refresh my view, and I suspect that something like #201 provides a nice workaround to this anyway.
Activity
tiennou commentedon Sep 5, 2018
Try looking at the task, it has a debug mode that might help (a4102a3). ISTR there could be some runaway things that could cause CPU usage to go haywire (symptoms are a crazy amount of scheduled tasks when you pause in the debugger). But unless you were running a build from after #117, that might not be it…
If you can post a full backtrace of the lockup somewhere, that'd be helpful.
claytonrcarter commentedon Sep 5, 2018
Sorry for being dense (I don't do any development for macOS or with Xcode) but how do I go about looking at the task and getting a backtrace? Would that be me running the app in the Xcode debugger? If so, I'll see what I can do, but that might be over my head.
tiennou commentedon Sep 6, 2018
Oh don't worry, that's fine. You should be able to run GitX under Xcode (big "play" button in the toolbar), which starts it under the debugger. You should be able to control the debugger via the little icons at the bottom of the text view (you might need to deploy it, that's one of the buttons to the right of the toolbar). Clicking the "play/pause" button down there will pause the application, interrupting whatever it's doing. Then you can
bt allin the (lldb) console in the bottom right, and copy that. I hope that's clear enough…claytonrcarter commentedon Sep 6, 2018
Perfect! Thank you for your patience! I got a backtrace and posted it here: https://gist.github.com/claytonrcarter/44a7fb20366486d2a4dc05e9ef7594d8
What I did:
bt allI'm happy to get more backtraces if that's helpful. Thanks again.
claytonrcarter commentedon Sep 6, 2018
FYI, I updated my gist with a second backtrace from when I tried to stage something.
tiennou commentedon Sep 6, 2018
Do you happen to have "Watch for changes in repositories" enabled in the preferences ? I actually have that disabled because it's causing concurrency issues (say when rebasing from the cli), because GitX will see something moving, trigger a refresh (which will lock something in the repo, likely the index) and then your cli action gets aborted.
tiennou commentedon Sep 6, 2018
That was it, reproducing locally.
claytonrcarter commentedon Sep 6, 2018
Why, yes I did. I de-selected that option and everything has been working just fine for the past couple of hours.
Thank you for the help and for all of your work on this app!
claytonrcarter commentedon Feb 9, 2022
This is no longer a problem for me. I've gotten used to
cmd+Rto refresh my view, and I suspect that something like #201 provides a nice workaround to this anyway.