Skip to content

eats all memory and goes into swap #1087

@svpv

Description

@svpv

Recently I upgraded from tig-2.5.0 to tig-2.5.2. I can no longer view big commits: tig eats up all memory and goes into swap.

Steps to reproduce:

  1. Clone e.g. this repo.
  2. In another terminal, run top and press M to sort by memory usage.
  3. In yet another terminal, prepare killall tig.
  4. Run tig --all and position to the second to last commit, the one with 0ad-0.0.24b-alpha-unix-build.tar.xz.
  5. Now press Enter to view the commit.
  6. You'll only have a few seconds to peek at top and execute killall tig. After those few seconds, you won't be able to abort tig gracefully, it'll send the whole machine into swap.

The problem is exacerbated by the fact that tig traps signals. So by the time you realize that C-C doesn't work, and you want to open another terminal, it's already too late. I think it must be possible to trap signals in such a way that the first arrival resets the handler, so that the second C-C is a sure-fire way to kill the program.

I think I was able to bisect the problem to 484aa21.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions