Skip to content

Locking up as of 0378e8e #156

Closed
Closed

Description

@claytonrcarter

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!

Activity

  1. tiennou commented on Sep 5, 2018

    @tiennou
    Contributor

    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.

  2. claytonrcarter commented on Sep 5, 2018

    @claytonrcarter
    CollaboratorAuthor

    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.

  3. tiennou commented on Sep 6, 2018

    @tiennou
    Contributor

    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…

  4. claytonrcarter commented on Sep 6, 2018

    @claytonrcarter
    CollaboratorAuthor

    Perfect! Thank you for your patience! I got a backtrace and posted it here: https://gist.github.com/claytonrcarter/44a7fb20366486d2a4dc05e9ef7594d8

    What I did:

    1. Pulled GitX & built in Xcode from master
    2. Lauched via debugger
    3. Opened the "refactor" repo I referred to earlier
    4. (I think) it opened in history view, so I switched to stage view
    5. it immediately went haywire: UI became sluggish, my cooling fan spun up, CPU usage went to ~250%
    6. I paused it in Xcode and did bt all

    I'm happy to get more backtraces if that's helpful. Thanks again.

  5. claytonrcarter commented on Sep 6, 2018

    @claytonrcarter
    CollaboratorAuthor

    FYI, I updated my gist with a second backtrace from when I tried to stage something.

    1. Lauched via debugger
    2. Opened the "refactor" repo I referred to earlier
    3. it opened in stage view and everything was fine for a while as I scrolled around
    4. I staged a .json file with only 1 short line changed
    5. it immediately went haywire
    6. I paused it in Xcode and did bt all
  6. tiennou commented on Sep 6, 2018

    @tiennou
    Contributor

    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.

  7. tiennou commented on Sep 6, 2018

    @tiennou
    Contributor

    That was it, reproducing locally.

  8. claytonrcarter commented on Sep 6, 2018

    @claytonrcarter
    CollaboratorAuthor

    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!

  9. claytonrcarter commented on Feb 9, 2022

    @claytonrcarter
    CollaboratorAuthor

    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.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions